I want to create a custom UINavigationBar
for CNContactViewController
in order to select single or multiple contact. The default UINavigationBar
consists of Cancel,Done and Group button which makes it look quite messy. Is there a workaround to customize
the UINavigationBar
of the CNContactViewController
?
Can Anyone answer this asap?
Your screenshot is CNContactPickerViewController
, not CNContactViewController
. But the answer is the same for both.
The Contacts view controllers each have a very specific purpose: choosing a contact, creating a contact, etc. They each have a navigation bar suited to that purpose — the contact pocket needs that Done button so the user can select a contact and return control to your app. And they're hosted out of process so that malicious apps can't dig inside to harvest contact info they're not supposed to.
Since it's out of process, you can't customize the navigation bar directly. Contacts would need to define an API for that, and it doesn't. Perhaps you should file a feature request for that? Then again, I'm not sure what the use case for removing any of those buttons is...