Next Page > Hide TOC

CBIdentityPicker Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/Collaboration.framework
Availability
Available in Mac OS X v10.5 and later.
Companion guide
Declared in
CBIdentityPicker.h

Overview

A CBIdentityPicker object allows a user to select identities—for example, user or group 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 Collaboration. If a selected record is not a user or group identity, then an identity picker prompts the end user for additional information—such as a password—to promote that record to a sharing account.

Tasks

Running an Identity Picker

Retrieving Identities

Setting and Getting Properties

Instance Methods

allowsMultipleSelection

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

- (BOOL)allowsMultipleSelection

Return Value

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

Availability
Declared In
CBIdentityPicker.h

identities

Returns an array of the identities selected using the identity picker.

- (NSArray *)identities

Return Value

An array of the selected identities.

Discussion

The array contains CBIdentity objects.

Availability
Declared In
CBIdentityPicker.h

runModal

Runs the receiver as an application-modal dialog.

- (NSInteger)runModal

Return Value

NSOKButton if the user selected OK; otherwise, NSCancelButton.

Discussion

The receiver may create identities for selected records if necessary.

Availability
Declared In
CBIdentityPicker.h

runModalForWindow:modalDelegate:didEndSelector:contextInfo:

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

- (void)runModalForWindow:(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 parameter is a selector that takes three arguments. The corresponding method should have a declaration modeled on the following example:

- (void)identityPickerDidEnd:(CBIdentityPicker *)identityPicker identities:(NSArray *)identities contextInfo:(void *)contextInfo;

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

Availability
Declared In
CBIdentityPicker.h

setAllowsMultipleSelection:

Allows a user to make select multiple identities.

- (void)setAllowsMultipleSelection:(BOOL)flag

Parameters
flag

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

Discussion

By default, you cannot select multiple records.

Availability
Declared In
CBIdentityPicker.h

setTitle:

Sets the title of the identity picker.

- (void)setTitle:(NSString *)title

Parameters
title

The title of the identity picker.

Availability
Declared In
CBIdentityPicker.h

title

Returns the title of the identity picker.

- (NSString *)title

Return Value

The title of the identity picker.

Availability
Declared In
CBIdentityPicker.h

Next Page > Hide TOC


© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-05-14)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.