0
嗨在我的iPhone應用程序中,我需要在ABPeoplePickerNavigationController中設置barButtonItems。在iOS 6工作正常:在ABPeoplePickerNavigationController中添加barButtonItems在ios 7中
-(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中有默認按鈕。我怎樣才能解決這個問題?