当显示ABPersonViewController时,我需要一个按钮让我关闭它并返回上一个屏幕。如何添加呢?

最佳答案

哦,我知道了。

ABPersonViewController *personViewController = [[ABPersonViewController alloc] init];
personViewController.addressBook = addr;
personViewController.displayedPerson = ABAddressBookGetPersonWithRecordID(addr, (ABRecordID)personID);
personViewController.allowsEditing = YES;
personViewController.personViewDelegate = self;
personViewController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Return",nil) style:UIBarButtonItemStylePlain target:self action:@selector(ReturnFromPersonView)];

关于iphone - 如何为Person ViewController的导航栏添加返回按钮?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3414561/

10-12 01:05