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 7015217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:37:23+00:00 2026-05-27T22:37:23+00:00

I am trying to integrate the AddressBookUI API into my iOS 5 app to

  • 0

I am trying to integrate the AddressBookUI API into my iOS 5 app to display selected content in a table view. I have been able to implement the AddressBook Picker and set it so when a user selects a person from their address book, it populates the label of the cell in the TableView. I would also like it to be able to display the image of the selected person in the same cell if one exists and a default missing picture image if there is not one.

I can’t see to get my head around how to store both the name and the image data in the same TableView cell.

Anyone have any suggestions of how I might accomplish this. I have read the developer docs and know i should be using the ABPersonCopyImageDataWithFormat command. I just can’t seem to get it to implement into the tableview cell.

Here are the snippets of code I have so far:

// Store the name into memory when the user selects, then dismiss the view.
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person
{

    NSString *selectedPerson = (__bridge NSString *)ABRecordCopyCompositeName(person);


    [people insertObject:selectedPerson atIndex:0];

    if (ABPersonHasImageData(person) == TRUE) {
        NSLog(@"Person has an image!");
    } else {
        NSLog(@"Person does not have an image.");
    }

    [self dismissModalViewControllerAnimated:YES];

    [self.tableView reloadData];

    return NO;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    PartyCell *cell = (PartyCell *)[tableView dequeueReusableCellWithIdentifier:@"Cell"];
    cell.backgroundView = [[GradientView alloc] init];

    cell.personLabel.text = [people objectAtIndex:indexPath.row];
    cell.personImage.image = [UIImage imageNamed:@"missing.png"]; // THIS NEEDS TO DISPLAY THE SELECTED USERS PICTURE. CURRENTLY SHOWS A DEFAULT USER.

    return cell;
}

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-27T22:37:24+00:00Added an answer on May 27, 2026 at 10:37 pm

    Found a simple solution: store the image of the selected contact in a new NSMutableArray at index 0 each time.

    UIImage *image =[UIImage imageWithData:(__bridge NSData *)ABPersonCopyImageDataWithFormat(person, kABPersonImageFormatThumbnail)];
    
            [peopleImage insertObject:image atIndex:0];
    

    The images can then be loaded like normal into a cell by calling the array in the UITabelView

    cell.personImage.image = [peopleImage objectAtIndex:indexPath.row];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to integrate a Facebook send button into my site using Facebook app.
I am trying to integrate OpenFeint 2.12.5 into my app. I already read this
I am trying to integrate kiip in my android app . I have downloaded
I am trying to integrate the TestFlightSdk into an app I've made using MonoTouch
I am trying to integrate some OpenCV functionality into my application. Currently I have
I'm trying to integrate Django's comment app into my site but with no success.
I've been trying to integrate MD5 hashes to my WP7 app but I've noticed
I'm trying to integrate an accounting solution into a web app I am developing.
I am trying to integrate a Hibernate application into a proprietary framework. My problem
I am trying to integrate a site search feature into a client's site. I've

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.