简体   繁体   English

如何在IOS中隐藏ABPeoplePickerNavigationController的默认选项

[英]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.

相关问题 ABPeoplePickerNavigationController隐藏取消按钮 - ABPeoplePickerNavigationController hide cancel button ABPeoplePickerNavigationController随iOS8变化? - ABPeoplePickerNavigationController changes with iOS8? iOS 8 ABPeoplePickerNavigationController多项选择 - iOS 8 ABPeoplePickerNavigationController Multiple Selection 如何在iOS / iPhone的选择菜单中隐藏选项 - How to hide options in select menu for iOS / iPhones 在iOS 7中的ABPeoplePickerNavigationController中添加barButtonItems - Add barButtonItems in ABPeoplePickerNavigationController in ios 7 在iOS 8中自定义ABPeoplePickerNavigationController的导航栏 - Customizing ABPeoplePickerNavigationController's navigationbar in iOS 8 在iOS8上将ABPersonViewController推送到ABPeoplePickerNavigationController - Pushing ABPersonViewController to ABPeoplePickerNavigationController on iOS8 如何使用可用的共享选项显示默认的iOS 6共享操作表? - How to display the default iOS 6 share action sheet with available share options? 当应用程序在ios中显示默认图像时,如何隐藏状态栏? - How to hide status bar when a application show the default image in ios? 如何在xamarin应用程序中隐藏Windows,android和ios选项卡的默认键盘 - how to hide default keyboard of windows,android and ios tab in xamarin app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM