title: contactPickerDidCancel and contactPicker Functions are never called
body: <p>Hello I'm new to iOS design and Swift and I'm trying to implement a simple Contact picker that allows the user to simply select a contact. I have a button in a view controller and the view controller conforms to the CNContactPickerDelegate, but when I run the app and use the picker, my contactPickerDidCancel function and my contactPicker function never get called no matter what I press inside the picker. As far as I understand, the picker should call the functions I wrote when I click not he cancel button or a contact inside the picker. Is this wrong? Any help or ideas would be great! Thanks!</p>
  
  <p>UPDATE: Solved. It was a simple syntax error. In both functions, I didn't put an underscore before "picker".</p>
  
  <pre><code>@IBAction func addContactPressed(_ sender: Any) {
  
      let contactPickerViewController = CNContactPickerViewController()
  
      contactPickerViewController.delegate = self
  
      contactPickerViewController.predicateForEnablingContact = NSPredicate(format: "phoneNumbers.@count &gt; 0", argumentArray: nil)
  
      contactPickerViewController.predicateForSelectionOfProperty =
          NSPredicate(format: "key == 'phoneNumbers'", argumentArray: nil)
  
      contactPickerViewController.displayedPropertyKeys = [CNContactEmailAddressesKey, CNContactPhoneNumbersKey]
  
      self.present(contactPickerViewController, animated: true, completion: nil)
  
  }
  
  
  func contactPickerDidCancel(picker: CNContactPickerViewController) {
      print("Cancelled picking a contact.")
  }
  
  func contactPicker(picker: CNContactPickerViewController, didSelectContact contact: CNContact) {
      print("Selected a contact.")
      if contact.isKeyAvailable(CNContactPhoneNumbersKey) {
          print(contact.phoneNumbers)
      }
      else {
          print("No phone numbers are available.")
      }
  }
  </code></pre>