<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ContactsUI",
  "identifier" : "/documentation/ContactsUI/CNContactViewControllerDelegate/contactViewController(_:shouldPerformDefaultActionFor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Contacts UI"
    ],
    "preciseIdentifier" : "c:objc(pl)CNContactViewControllerDelegate(im)contactViewController:shouldPerformDefaultActionForContactProperty:"
  },
  "title" : "contactViewController(_:shouldPerformDefaultActionFor:)"
}
-->

# contactViewController(_:shouldPerformDefaultActionFor:)

Called when the user selects a property.

```
optional func contactViewController(_ viewController: CNContactViewController, shouldPerformDefaultActionFor property: CNContactProperty) -> Bool
```

## Parameters

`viewController`

The view controller presenting the contact.

`property`

The property (<doc://com.apple.documentation/documentation/Contacts/CNContactProperty>)
selected by the user.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> to call the default
action performed for the property, otherwise return <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Implement this method to determine the resulting behavior when a property is selected.
Return <doc://com.apple.documentation/documentation/Swift/false> if you do not
want anything to be done or if you are handling the actions yourself.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)