---
title: "contactViewController(_:shouldPerformDefaultActionFor:)"
framework: contactsui
role: symbol
role_heading: Instance Method
path: "contactsui/cncontactviewcontrollerdelegate/contactviewcontroller(_:shouldperformdefaultactionfor:)"
---

# contactViewController(_:shouldPerformDefaultActionFor:)

Called when the user selects a property.

## Declaration

```swift
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

Return Value true to call the default action performed for the property, otherwise return false.

## Discussion

Discussion Implement this method to determine the resulting behavior when a property is selected. Return false if you do not want anything to be done or if you are handling the actions yourself.

## See Also

### Responding to User Events

- [contactViewController(_:didCompleteWith:)](contactsui/cncontactviewcontrollerdelegate/contactviewcontroller(_:didcompletewith:).md)
