iOS Developer Library — Pre-Release

Developer

AddressBookUI Framework Reference ABPersonViewController Class Reference

Options
Deployment Target:

On This Page
Language:

ABPersonViewController

Inheritance


Conforms To


Import Statement


Swift

import AddressBookUI

Objective-C

@import AddressBookUI;

Availability


Available in iOS 2.0 and later.

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) ABRecordRef displayedPerson

    Discussion

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

    Import Statement

    Objective-C

    @import AddressBookUI;

    Swift

    import AddressBookUI

    Availability

    Available in iOS 2.0 and later.

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

    Declaration

    Swift

    var displayedProperties: [AnyObject]!

    Objective-C

    @property(nonatomic, copy) NSArray *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.

    Import Statement

    Objective-C

    @import AddressBookUI;

    Swift

    import AddressBookUI

    Availability

    Available in iOS 2.0 and later.

  • 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.

    Import Statement

    Objective-C

    @import AddressBookUI;

    Swift

    import AddressBookUI

    Availability

    Available in iOS 4.0 and later.

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

    Declaration

    Swift

    var addressBook: ABAddressBook!

    Objective-C

    @property(nonatomic, readwrite) ABAddressBookRef addressBook

    Discussion

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

    Import Statement

    Objective-C

    @import AddressBookUI;

    Swift

    import AddressBookUI

    Availability

    Available in iOS 2.0 and later.

  • 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

    Import Statement

    Objective-C

    @import AddressBookUI;

    Swift

    import AddressBookUI

    Availability

    Available in iOS 4.0 and later.

  • 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.

    Import Statement

    Objective-C

    @import AddressBookUI;

    Swift

    import AddressBookUI

    Availability

    Available in iOS 2.0 and later.

  • 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.

    Import Statement

    Objective-C

    @import AddressBookUI;

    Swift

    import AddressBookUI

    Availability

    Available in iOS 2.0 and later.

    See Also

    displayedPerson

  • The person-view controller delegate.

    Declaration

    Swift

    unowned(unsafe) var personViewDelegate: ABPersonViewControllerDelegate!

    Objective-C

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

    Discussion

    The delegate must adopt the ABPersonViewControllerDelegate protocol.

    Import Statement

    Objective-C

    @import AddressBookUI;

    Swift

    import AddressBookUI

    Availability

    Available in iOS 2.0 and later.