How to add contact from within an iPhone app?

后端 未结 3 968
天命终不由人
天命终不由人 2021-01-15 06:34

I am looking to keep track of people in my iPhone app - either adding them from existing contact data, or prompting the user to enter a new contact which will be saved to th

3条回答
  •  伪装坚强ぢ
    2021-01-15 07:16

    Apple provides ABNewPersonViewController. If you'd like some sample code, see Quick Contacts, in particular, this section:

    ABNewPersonViewController *picker = [[ABNewPersonViewController alloc] init];
    picker.newPersonViewDelegate = self;
    
    UINavigationController *navigation = [[UINavigationController alloc] initWithRootViewController:picker];
    [self presentModalViewController:navigation animated:YES];
    
    [picker release];
    [navigation release];
    

提交回复
热议问题