`
lizhuang
  • 浏览: 904294 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

RHAddressBook

 
阅读更多
NSLog(@"person");
   
    RHAddressBook *ab = [[RHAddressBook alloc] init];
   
    RHPerson *person = [ab personForABRecordID:_recordId];
   
    ABPersonViewController *personViewController = [[ABPersonViewController alloc] init];
   
    //setup (tell the view controller to use our underlying address book instance, so our person object is directly updated)
    [person.addressBook performAddressBookAction:^(ABAddressBookRef addressBookRef) {
        personViewController.addressBook =addressBookRef;
    } waitUntilDone:YES];
   
    personViewController.displayedPerson = person.recordRef;
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 50000
    personViewController.allowsActions = YES;
#endif
    personViewController.allowsEditing = YES;
   
   
    [self.navigationController pushViewController:personViewController animated:YES];
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics