iOS Developer Library — Prerelease

Developer

Address Book UI Framework Reference for iOS ABPersonViewController Class Reference

Options
Deployment Target:

On This Page
Language:

ABPersonViewController

The ABPersonViewController class (whose instances are known as person view controllers) implements the view used to display a person record (ABPersonRef).

Subclassing Notes

The ABPersonViewController class does not support subclassing.

  • The person displayed by the person view.

    Declaration

    Swift

    var displayedPerson: ABRecord

    Objective-C

    @property(nonatomic, readwrite, nonnull) ABRecordRef displayedPerson

    Discussion

    The receiver displays the properties of this person record that are present in displayedProperties.

    Availability

    Available in iOS 2.0 and later.

    Deprecated in iOS 9.0.

  • Identifies the set of properties (such as name or telephone number) of displayedPerson the receiver displays.

    Declaration

    Swift

    var displayedProperties: [NSNumber]?

    Objective-C

    @property(nonatomic, copy, nullable) NSArray <NSNumber *> *displayedProperties

    Discussion

    The default value of this property is NULL.

    Name properties are always displayed.

    The properties are specified using an array of NSNumber objects representing ABPropertyID values.

    To have the receiver display a single property for displayedPerson, such as telephone number, set displayedProperties to an array with a single value, such as kABPersonPhoneProperty.

    Availability

    Available in iOS 2.0 and later.

    Deprecated in iOS 9.0.

  • Indicates whether the person view should display data from person records that are linked with the person record being displayed.

    Declaration

    Swift

    var shouldShowLinkedPeople: Bool

    Objective-C

    @property(nonatomic) BOOL shouldShowLinkedPeople

    Discussion

    Linked records represent the same actual person. They often come from different sources, but may also come from the same source.

    Availability

    Available in iOS 4.0 and later.

    Deprecated in iOS 9.0.

  • addressBook addressBook (iOS 9.0) Property

    Optional. The address book from which to obtain the contact to display.

    Declaration

    Swift

    var addressBook: ABAddressBook?

    Objective-C

    @property(nonatomic, readwrite, nullable) ABAddressBookRef addressBook

    Discussion

    When unset, an address book is created and assigned to this property when needed.

    Availability

    Available in iOS 2.0 and later.

    Deprecated in iOS 9.0.

  • Specifies whether the to display buttons for actions such as sending a text message or initiating a FaceTime call.

    Declaration

    Swift

    var allowsActions: Bool

    Objective-C

    @property(nonatomic) BOOL allowsActions

    Availability

    Available in iOS 4.0 and later.

    Deprecated in iOS 9.0.

  • Specifies whether the user can edit the person’s information.

    Declaration

    Swift

    var allowsEditing: Bool

    Objective-C

    @property(nonatomic) BOOL allowsEditing

    Discussion

    When editing a person’s information, all person properties are visible.

    Availability

    Available in iOS 2.0 and later.

    Deprecated in iOS 9.0.

  • Specifies whether to highlight a particular property of the displayed person.

    Declaration

    Swift

    func setHighlightedItemForProperty(_ property: ABPropertyID, withIdentifier identifier: ABMultiValueIdentifier)

    Objective-C

    - (void)setHighlightedItemForProperty:(ABPropertyID)property withIdentifier:(ABMultiValueIdentifier)identifier

    Parameters

    property

    The property to highlight.

    identifier

    When property is a multi-value property, the value to highlight.

    Availability

    Available in iOS 2.0 and later.

    Deprecated in iOS 9.0.

    See Also

    displayedPerson

  • The person-view controller delegate.

    Declaration

    Swift

    unowned(unsafe) var personViewDelegate: ABPersonViewControllerDelegate?

    Objective-C

    @property(nonatomic, assign, nullable) id< ABPersonViewControllerDelegate > personViewDelegate

    Discussion

    The delegate must adopt the ABPersonViewControllerDelegate protocol.

    Availability

    Available in iOS 2.0 and later.

    Deprecated in iOS 9.0.