0
//import contacts by using contact picker
        CNContactPickerViewController *contactPicker = [CNContactPickerViewController new];
        contactPicker.delegate = self;



        NSPredicate *filterPredicate = [NSPredicate predicateWithFormat:@"phoneNumbers.@count >= 1"];

        contactPicker.predicateForEnablingContact = filterPredicate;


        [self presentViewController:contactPicker animated:YES completion:nil];

- (void) contactPicker:(CNContactPickerViewController *)picker
     didSelectContacts:(NSArray<CNContact *> *)contacts {
    //code for selecting multiple contacts

}


-(void)contactPickerDidCancel:(CNContactPickerViewController *)picker {
    NSLog(@"Cancell");
}

enter image description here

I am using the above code to import the contacts, i am able to import the contacts. But i need to remove the searchbar from the CNContactPickerViewController. I have already tried the below solution provided in the stack overflow but its not working. Any help will be really appreciated.

How to hide/Remove the search bar on Contact Picker

Madhu
  • 439
  • 2
  • 14

1 Answers1

0

As the CNContactPickerViewController is a UIRemoteView you have no access to it. As such this is not possible.

Chris Byatt
  • 3,689
  • 3
  • 34
  • 61