Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CNContactPickerViewController with UIToolbar

How do I implement same contact picker as in iOS Apple Maps?

As you can see from pictures, in Maps app you can switch between favourites places and your contacts. I want switching between picker and some custom table without dismissal animation and with common control like UISegmentedControl.

I have no problem with presenting CNContactPickerViewController nor with implementing UISegmentedControl. I have problem with adding toolbar to CNContactPickerViewController.

  • I've tried to push it into my UINavigationController with no success.

  • I've tried to add UIToolbar but CNContactPickerViewController doesn't have UINavigationController.

  • I also tried to add it to subviews and childViewControllers

Documentation doesn't say anything how to use it. This page claims:

Instances of the CNContactPickerViewController cannot be pushed to the stack.

Any advice is appreciated :)

enter image description here enter image description here

like image 342
jendan Avatar asked Oct 31 '22 15:10

jendan


1 Answers

I'm pretty sure that CNContactPickerViewController is highly secure and runs in a separate process. I'm trying to find documentation to support that theory, but I think that's the reason why there's no API that allow devs to augment its appearance.

The reason you're seeing it in the Apple Maps app is because ... Apple apps can use private APIs. They're doing something special for their app which they haven't made publicly available.

like image 184
Aaron Avatar answered Nov 13 '22 05:11

Aaron