Mac OS X Reference Library Apple Developer Connection spyglass button

ABIdentityPicker Class Objective-C Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AddressBook.framework
Declared in
ABIdentityPicker.h
Companion guides

Overview

An ABIdentityPicker object allows a user to select Address Book records—for example, group or person objects—that it wants one or more services or shared resources to have access to. An identity picker can be displayed either as an application-modal dialog or as a sheet attached to a document window. An identity picker returns the selected records to be added to access control lists using Identity Services. If a selected record is not a sharing account, then an identity picker prompts the end user for additional information—such as a password—to promote that record to a sharing account.

Tasks

Initializing

Setting and Getting Properties

Running an Identity Picker

Instance Methods

allowsMultipleSelection

Returns a Boolean value indicating whether the user is allowed to select multiple records.

- (BOOL)allowsMultipleSelection

Return Value

YES if the user can select multiple records; otherwise, NO.

See Also

beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:

Runs the receiver modally as a sheet attached to a specified window.

- (void)beginSheetModalForWindow:(NSWindow *)window modalDelegate:(id)delegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo

Parameters
window

The parent window for the sheet.

delegate

The delegate for the modal session.

didEndSelector

A message sent to the delegate after the user responds but before the sheet is dismissed.

contextInfo

Contextual data passed to the delegate in the didEndSelector message.

Discussion

The didEndSelector argument must be a selector that takes three arguments, and the corresponding method should have a declaration modeled on the following example:

- (void)identityPickerDidEnd:(ABIdentityPicker *)identityPickerController identities:(NSArray *)identities contextInfo:(void *)contextInfo;

where the identityPickerController argument is the identity picker object, the identities argument is an array containing ABPerson objects, and contextInfo is the same contextInfo that was passed in the original message.

See Also

init

Initializes the receiver immediately after memory for it has been allocated.

- (id)init

runModalIdentityPicker

Runs the receiver as an application-modal dialog and returns the selected records.

- (NSArray *)runModalIdentityPicker

Return Value

An array containing the ABRecord objects that the user selected in the panel.

Discussion

The receiver may create identities for selected records if necessary.

See Also

setAllowsMultipleSelection:

Allows a user to make multiple selections.

- (void)setAllowsMultipleSelection:(BOOL)flag

Parameters
flag

YES if you can select multiple records; otherwise, NO.

Discussion

By default, you cannot select multiple records.

See Also

Constants

Identity Constants

Constants used to identify objects.

extern NSString * const kABIdentityUIDProperty;
Constants
kABIdentityUIDProperty

The identity UID property.

Declared In
ABIdentityPicker.h

Last updated: 2006-08-23

Did this document help you? Yes It's good, but... Not helpful...