I've been looking for a solution on this for a while now and can't find a thing on implementing this (screenshot provided below).
I'm creating a custom ContactsViewController
which uses the CNContact
framework for CRUD functionalities. All is clear on how to implement them, aside from choosing a phone number label. Is there such a thing as a picker view controller for this or should I implement it manually?
You should implement that screen manually. The screen on your screenshot is a
UITableViewController
with a groupedUITableView
and a checkmark accessory indicator for the selected cell.Here is the list for predefined phone number labels (from the Apple Developer Documentation):
To display the localized names of these constants, use
CNLabeledValue.localizedString(forLabel:)
(thanks, OOPer):Swift
Objective-C
If you want to create a custom label for a contact, just use an arbitrary string for the label's name: