Programmatically add contact in Swift
问题 I want to add a contact (just the name and phone number) programatically in Swift. I've found some Objective-C examples but I didn't get them to work, not even in Objective-C. I don't want this to involve AddressBookUI, because I want to get the values from my own UI. 回答1: Here's a quick method to add a contact in Swift. I verified it on my iPhone 5 iOS 7.1 as I've found the simulator doesn't always match the same results as my phone does for AB stuff. You can add a button and point to this