[英]How to hide the default options of ABPeoplePickerNavigationController in IOS
I am using ABPeoplePickerNavigationController
to display contacts. 我正在使用ABPeoplePickerNavigationController
来显示联系人。
I also used UISearchDisplayController
for searching of contacts. 我还使用UISearchDisplayController
搜索联系人。
I want to hide the options of ABPeoplePickerNavigationController
like Groups, All Contacts and cancel options 我想隐藏ABPeoplePickerNavigationController
的选项(例如组,所有联系人)并取消选项
Is there any default properties to hide this.As I don't want these options in my app. 是否有任何默认属性可以隐藏它。因为我不想在我的应用中使用这些选项。
Please suggest any ideas. 请提出任何想法。 Thanks in Advance. 提前致谢。
Try this: 尝试这个:
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.delegate = self
[self presentViewController:picker animated:YES completion:nil];
- (void)navigationController:(UINavigationController*)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
if([navigationController isKindOfClass:[ABPeoplePickerNavigationController class]]){
navigationController.topViewController.navigationItem.rightBarButtonItem = nil;
navigationController.topViewController.title = @"";
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.