I'm using the new CNContactViewController in my Swift 2/iOS 9 app, and have it working great as a contact picker. However, I can't get it work as a contact _editor_ for the simple reason that it doesn't have a "Done" button (only a "Cancel") button. I'd hoped that the new beta (6) of Xcode 7 would either add a "Done" button (or option for one) to the CNContactViewController(forNewContact...), but no such luck. Nor can I find anything in the newly-revised CNContactViewController docs indicating how to dismiss the controller and effect a save of the edited contact.
Here's how I present that controller:
func performContactEdit()
{
let currentContactViewController = CNContactViewController(forNewContact: suppliedContact!)
currentContactViewController.delegate = self
currentContactViewController.modalPresentationStyle = .FormSheet
presentViewController(currentContactViewController, animated: true, completion: nil)
}
This presents the editor just fine, and I can enter and edit information, I just can't save it! There's only a "Cancel" button in the presented form, no "Done" button.
Has anyone figured this out? Have I overlooked something (possibly obvious)?
Thanks!
Carl