about 5 years ago
To show the list of contact in iPhone use the code Below:
1- import the ContactsUI framwork in viewController 2- Confrom the ViewController to the CNContactPickerDelegate 3- call the delegate method func contactPicker(picker: CNContactPickerViewController, didSelectContacts contacts: [CNContact])
import AddressBook import ContactsUI class ViewController: UIViewController, CNContactPickerDelegate @IBAction func showContactList(sender:UIButton) { let cnPicker = CNContactPickerViewController() cnPicker.delegate = self self.presentViewController(cnPicker, animated: true, completion: nil) } func contactPicker(picker: CNContactPickerViewController, didSelectContacts contacts: [CNContact]) { contacts.forEach { contact in for number in contact.phoneNumbers { let phoneNumber = number.value as! CNPhoneNumber print("number is = \(phoneNumber)") } } }
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)