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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:38:32+00:00 2026-05-28T06:38:32+00:00

I think I’m not getting the handle on address book and UITableView, or maybe

  • 0

I think I’m not getting the handle on address book and UITableView, or maybe I’m just making it simpler than it is.

here is my .h file:

@interface Contacts : UITableViewController <ABPeoplePickerNavigationControllerDelegate> {

NSMutableArray *menuArray;
NSString *firstName;
NSString *lastName;
UIButton *addcontact;
}

@property (nonatomic, retain) NSMutableArray *menuArray;
@property (nonatomic, strong) UIButton *addcontact;
@property (nonatomic, strong) NSString *firstName;
@property (nonatomic, strong) NSString *lastName;

-(void)showPeoplePickerController;
@end

And my .m file:

 -(IBAction)addcontact:(id)sender {

ABPeoplePickerNavigationController *peoplePicker=[[ABPeoplePickerNavigationController alloc] init];

[peoplePicker setPeoplePickerDelegate:self];



[self presentModalViewController:peoplePicker animated:YES];  }
- (void)viewDidLoad
{
menuArray = [[NSMutableArray alloc] init];

[super viewDidLoad];

} 

- (BOOL)peoplePickerNavigationController:

(ABPeoplePickerNavigationController *)peoplePicker

  shouldContinueAfterSelectingPerson:(ABRecordRef)person {

    firstName = (__bridge NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty);
    [menuArray addObject:firstName]; 
    lastName = (__bridge NSString *)ABRecordCopyValue(person, kABPersonLastNameProperty);
    [menuArray addObject:lastName];



[self dismissModalViewControllerAnimated:YES];
return NO;}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

return [menuArray count];
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) {
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}

NSString *cellValue = [menuArray objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;

return cell;

}

I hope someone could help me with it, I’m fairley new to UITableViews and Addressbooks 🙂

  • 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-28T06:38:33+00:00Added an answer on May 28, 2026 at 6:38 am

    For performance purposes (not to mention animation purposes), UITableView does not automatically update itself whenever the data source changes.

    Try adding [myTableView reloadData]; after you add the first and last name to the arrays (or in viewWillAppear:

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

Sidebar

Related Questions

I think I know how to handle this case, but I just want to
Think about the following: Your ISP offers you a dynamic ip-address (for example 123.123.123.123).
I think the file that is produced is an .asm file, any idea how
I think most people here understand the importance of fully automated builds. The problem
Think of the following code: static int Main() { byte[] data = File.ReadAllBytes(anyfile); SomeMethod(data);
I think I have found a bug when setting or getting the Me.Top property
I think this has probably been asked, but after reading a lot, I'm not
I think I'm missing something basic here. Why is the third IF condition true?
I think my question revolves around me not having a comfortable grasp of page
I think I'm missing something basic here. Any explanation or pointers to previously asked

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.