| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AddressBook.framework |
| Availability | Available in Mac OS X v10.3 and later |
| Companion guide | |
| Declared in | ABPeoplePickerView.h |
| Related sample code |
The ABPeoplePickerView class allows you to customize the behavior of people-picker views in an application’s user interface.
– addProperty:
– columnTitleForProperty:
displayedProperty property
– properties
– removeProperty:
– setColumnTitle:forProperty:
valueSelectionBehavior property
allowsGroupSelection property
allowsMultipleSelection property
– deselectAll:
– deselectGroup:
– deselectIdentifier:forPerson:
– deselectRecord:
selectedGroups property
– selectedIdentifiersForPerson:
selectedRecords property
– selectedValues
– selectGroup:byExtendingSelection:
– selectIdentifier:forPerson:byExtendingSelection:
– selectRecord:byExtendingSelection:
accessoryView property
– clearSearchField:
– editInAddressBook:
groupDoubleAction property
nameDoubleAction property
– selectInAddressBook:
target property
autosaveName property
For more about Objective-C properties, see “Properties” in The Objective-C Programming Language.
The view that is placed to the left of the search field.
@property (nonatomic, retain) NSView* accessoryView
If accessory is nil, the accessory view is removed.
ABPeoplePickerView.hA Boolean value that specifies whether the user can select entire groups in the group column.
@property (nonatomic, assign) BOOL allowsGroupSelection
If YES, the user can to select entire groups. If NO, the user is required to select at least one person in the group.
ABPeoplePickerView.hA Boolean value that specifies whether multiple groups, records, or values of multivalue properties can be selected at a time.
@property (nonatomic, assign) BOOL allowsMultipleSelection
ABPeoplePickerView.hThe name under which the column positions and the filter selection are saved.
@property (nonatomic, retain) NSString* autosaveName
ABPeoplePickerView.hThe property currently displayed in the record list.
@property (nonatomic, retain) NSString* displayedProperty
ABPeoplePickerView.hThe action to be invoked when a group is double-clicked.
@property (nonatomic, assign) SEL groupDoubleAction
ABPeoplePickerView.hThe action to be invoked when a name is double-clicked.
@property (nonatomic, assign) SEL nameDoubleAction;
ABPeoplePickerView.hThe groups selected in the group list. (read-only)
@property (readonly) NSArray* selectedGroups
The selected groups are returned as an array of ABGroup objects.
ABPeoplePickerView.hThe selection in the records list. (read-only)
@property (readonly) NSArray* selectedRecords
The selection is returned as an array of ABGroup or ABPerson objects.
ABPeoplePickerView.hThe target for double-click actions.
@property (nonatomic, assign) id target
The target is the object on which the action specified by groupDoubleAction and nameDoubleAction is invoked.
ABPeoplePickerView.hThe current selection behavior.
@property (nonatomic, assign) ABPeoplePickerSelectionBehavior valueSelectionBehavior
The default behavior is ABSingleValueSelection.
ABPeoplePickerView.hAdds a property to the group of properties whose values are shown in the record list.
- (void)addProperty:(NSString *)property
The property to add.
For additional information about properties see “Constants” in ABPerson Class Reference.
ABPeoplePickerView.hClears the search field and resets the list of displayed records.
- (void)clearSearchField:(id)sender
The object sending this message.
ABPeoplePickerView.hReturns the title of a custom property.
- (NSString *)columnTitleForProperty:(NSString *)property
The property whose title will be returned.
The title of the custom property.
ABPeoplePickerView.hDeselects all selected groups, records, and values in multivalue properties.
- (void)deselectAll:(id)sender
The object sending this message.
ABPeoplePickerView.hDeselects a group selected in the group list.
- (void)deselectGroup:(ABGroup *)group
The group to deselect.
ABPeoplePickerView.hDeselects a value selected in a multivalue property.
- (void)deselectIdentifier:(NSString *)identifier forPerson:(ABPerson *)person
The identifier of the value that will be deselected.
The person whose value will be deselected.
ABPeoplePickerView.hDeselects a record selected in the record list.
- (void)deselectRecord:(ABRecord *)record
The record to deselect.
ABPeoplePickerView.hLaunches Address Book to edit the item selected in the people picker.
- (void)editInAddressBook:(id)sender
The object sending this message.
ABPeoplePickerView.hReturns an array of the properties whose values are shown in the record list.
- (NSArray *)properties
For additional information about properties see “Using Property Lists” in Address Book Programming Guide for Mac OS X.
ABPeoplePickerView.hRemoves a property from the group of properties whose values are shown in the record list.
- (void)removeProperty:(NSString *)property
The property to remove.
For additional information about properties see “Using Property Lists” in Address Book Programming Guide for Mac OS X.
ABPeoplePickerView.hReturns the identifiers of the selected values in a multivalue property.
- (NSArray *)selectedIdentifiersForPerson:(ABPerson *)person
The person whose identifiers for selected values will be returned.
Returns nil if the property displayed is a single-value property.
ABPeoplePickerView.hReturns an array of all the values selected in the displayed multivalue property.
- (NSArray *)selectedValues
ABPeoplePickerView.hSelects a group or a set of groups in the group list.
- (void)selectGroup:(ABGroup *)group byExtendingSelection:(BOOL)extend
The group to be selected, or to be added to the current selection.
YES to extend the current selection; otherwise, NO.
ABPeoplePickerView.hSelects a value or a set of values in a multivalue property.
- (void)selectIdentifier:(NSString *)identifier forPerson:(ABPerson *)person byExtendingSelection:(BOOL)extend
The identifier to be selected, or to be added to the current selection.
The person that the value to be selected is associated with.
YES to extend the current selection; otherwise, NO.
ABPeoplePickerView.hLaunches Address Book and selects the item selected in the people picker.
- (void)selectInAddressBook:(id)sender
The object sending this message.
ABPeoplePickerView.hSelects a record or a set of records in the record list.
- (void)selectRecord:(ABRecord *)record byExtendingSelection:(BOOL)extend
The record to be selected, or to be added to the current selection.
YES to extend the current selection; otherwise, NO.
ABPeoplePickerView.hSets the title displayed in the people picker for a property.
- (void)setColumnTitle:(NSString *)title forProperty:(NSString *)property
The title to be set.
The property being titled.
ABPeoplePickerView.hThese constants are of the type Selection Behavior and are used by valueSelectionBehavior.
typedef enum {
ABNoValueSelection = 0,
ABSingleValueSelection = 1,
ABMultipleValueSelection = 2
} ABPeoplePickerSelectionBehavior;
ABNoValueSelectionThe user cannot select individual values.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerView.h.
ABSingleValueSelectionThe user can select a single value.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerView.h.
ABMultipleValueSelectionThe user can select multiple values.
Available in Mac OS X v10.3 and later.
Declared in ABPeoplePickerView.h.
Posted when the selection in the group list is changed.
ABPeoplePickerView.hPosted when the selection in the name list is changed.
ABPeoplePickerView.hPosted when the selection in a multivalue property is changed.
ABPeoplePickerView.hPosted when the displayed property in the record list is changed.
ABPeoplePickerView.hLast updated: 2009-08-06