下面是我如何展示我的 ABPickerNavigationController 的代码:
AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
CGRect rect = delegate.window.frame;
address = [[ABPeoplePickerNavigationController alloc] init];
address.addressBook = ABAddressBookCreateWithOptions(nil, nil);
[address setPeoplePickerDelegate:self];
//[self presentViewController:address animated:YES completion:nil];
appWindow = [[UIWindow alloc] initWithFrame:rect];
appWindow.rootViewController=address;
[appWindow makeKeyAndVisible];
它没有在 iOS 9 的顶部导航栏上显示取消和组按钮。如果我取消注释上面的注释行,它可以正常工作。由于我的应用程序有许多导航,我编写了这个通用代码来从任何地方(甚至从视图)呈现这样的视图控制器。这有什么问题?