简体   繁体   English

ABPeoplePickerNavigationController自动关闭而不显示地址簿

[英]ABPeoplePickerNavigationController auto dismiss without showing addressbook book

I am using ABPeoplePickerNavigationController for selection of address book contact by user. 我正在使用ABPeoplePickerNavigationController来选择用户的地址簿联系方式。 With this code behind action of a button: 使用此代码后面的按钮操作:

ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];

picker.peoplePickerDelegate = self;
picker.view.frame=self.view.frame;
[self presentModalViewController:picker animated:YES];
[picker release];

When this code runs it rotates the Landscape UI to Portrait and eventually dismisses the controller that presents this ABPeoplePickerNavigationController. 当此代码运行时,它将Landscape UI旋转为Portrait,并最终解除显示此ABPeoplePickerNavigationController的控制器。

I am getting this problem only in iOS 5, iPad 2. It's working fine with iOS 6. 我只在iOS 5,iPad 2中遇到此问题。它适用于iOS 6。

I don't believe in 5.x that landscape is supported for this picker. 我不相信5.x这个选择器支持横向。 However, try doing it via a different PresentationStyle. 但是,尝试通过不同的PresentationStyle来做。 I believe it should then work in landscape, ie: 我相信它应该在景观中起作用,即:

ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
picker.modalPresentationStyle  = UIModalPresentationFormSheet;
[self presentModalViewController:picker animated:YES];

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 获取没有ABPeoplePickerNavigationController的联系人 - Get contacts without ABPeoplePickerNavigationController iOS 8:ABPeoplePickerNavigationController在实现人员选择器委托方法时被解雇 - ios 8 : ABPeoplePickerNavigationController dismiss on implementing people picker delegate methods 如何使用ABPeoplePickerNavigationController在通讯簿中选择多个条目 - How to select multiple entries in address book using ABPeoplePickerNavigationController 带有UITabBarController的ABPeoplePickerNavigationController在iOS8中无法正确显示 - ABPeoplePickerNavigationController with UITabBarController is not showing correctly in iOS8 iPhone ABPeoplePickerNavigationController - 如何从Addressbook中选择一个人的两个不同多值属性的两个单个条目 - iPhone ABPeoplePickerNavigationController - How to select two single entries of two different multivalue properties of a person from Addressbook 电话号码自动间隔,例如iPhone上的AddressBook - Phone Number Auto Spacing like AddressBook on iPhone 如何在 OSX 上自动关闭 NSAlert? - How to auto dismiss NSAlert on OSX? iOS:关闭视图控制器并推送新视图,而不在导航堆栈中显示当前视图 - iOS: Dismiss view controller and push new view without showing the current view in navigation stack 通讯簿检查通讯录中是否存在联系人,并因EXC_BAD_ACCESS崩溃 - Address Book check if Contact exist in addressbook Getting crashed with EXC_BAD_ACCESS iPhone AddressBook上显示空白字段,如何调试? - Blank field showing up on iPhone AddressBook, how to debug?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM