ABPersonViewController Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AddressBookUI.framework
Availability
Available in iOS 2.0 and later.
Declared in
ABPersonViewController.h
Related sample code

Overview

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.

Tasks

Displaying Person Properties

Configuring Person Views

Properties

addressBook

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

@property(nonatomic, readwrite) 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.
Declared In
ABPersonViewController.h

allowsActions

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

@property(nonatomic) BOOL allowsActions
Availability
  • Available in iOS 4.0 and later.
Declared In
ABPersonViewController.h

allowsEditing

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

@property(nonatomic) BOOL allowsEditing
Discussion

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

Availability
  • Available in iOS 2.0 and later.
Related Sample Code
Declared In
ABPersonViewController.h

displayedPerson

The person displayed by the person view.

@property(nonatomic, readwrite) 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.
Related Sample Code
Declared In
ABPersonViewController.h

displayedProperties

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

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

Availability
  • Available in iOS 2.0 and later.
Declared In
ABPersonViewController.h

personViewDelegate

The person-view controller delegate.

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

The delegate must adopt the ABPersonViewControllerDelegate protocol.

Availability
  • Available in iOS 2.0 and later.
Related Sample Code
Declared In
ABPersonViewController.h

shouldShowLinkedPeople

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

@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.
Declared In
ABPersonViewController.h

Instance Methods

setHighlightedItemForProperty:withIdentifier:

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

- (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.
Declared In
ABPersonViewController.h