嗨,在我的 iPhone 应用程序中,我需要在 ABPeoplePickerNavigationController 中设置 barButtonItems。在 ios 6 中它工作正常:
-(void) manageContacts
{
peopleNavigationController = [[PeoplePickerNavigationController alloc] init];
peopleNavigationController.peoplePickerDelegate = self;
[peopleNavigationController.navigationBar setBarStyle:UIBarStyleBlack];
peopleNavigationController.delegate = self;
peopleNavigationController.topViewController.navigationItem.leftBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"back",nil)
style:UIBarButtonItemStyleBordered
target:self
action:@selector(pressBack)];
peopleNavigationController.topViewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addPerson)];
[self.navigationController presentModalViewController:peopleNavigationController animated:YES];
}
但是在 ios 7 中有默认按钮。我怎样才能解决这个问题?