//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");
}
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.