Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7166543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:25:51+00:00 2026-05-28T14:25:51+00:00

I am customizing my table cells. I have this code (simplified) which is giving

  • 0

I am customizing my table cells. I have this code (simplified) which is giving me an EXC_BAD_ACCESS when trying to access [indexPath row]

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *CellIdentifier = @"WCFPictureCell";
    static NSString *CellNib = @"WCFPictureCell";
    WCFPictureCell *cell = (WCFPictureCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:CellNib owner:self options:nil];
        cell = (WCFPictureCell *)[nib objectAtIndex:0];
    }
    NSLog(@"iph    %@", indexPath);
    NSLog(@"iphrow %@", [indexPath row]);
    return cell;
}

What am I doing wrong?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:25:52+00:00Added an answer on May 28, 2026 at 2:25 pm

    The row method of NSIndexPath returns a NSInteger.
    That’s a primitive type, not an object.

    So you can’t print it using %@.

    What you want is:

    NSLog( @"iphrow %i", [ indexPath row ] );
    

    You are getting a segmentation fault because %@ is used for a pointer to an object.
    As you are passing an integer, NSLog will try to print an object at the memory address specified by the integer value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying out this nice way of customizing grouped UITableViewCell backgrounds: http://code.coneybeare.net/how-to-make-custom-drawn-gradient-backgrounds I've implemented
I have a table view that I am customizing and I am adding a
Hello I have a trouble customizing a background of the grouped table view.. Here's
I'm customizing a color picker's default showing colors which will be used as background
We are customizing workflow approval form to display the associated list item fields. This
i have a tableview which has image and a text behind, i create the
I am customizing the insert SQL generated by hibernate and have hit an issue.
I have an application in mind which dicates database tables be append-only; that is,
I'm currently customizing the bluescale theme for Magento. I have moved the position of
I tried the new Customizing API for iOS 5 and have some problems I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.