Instance Method

indexForSubKeyPath:

The index into the array at the specified portion of the key path.

Declaration

- (NSUInteger)indexForSubKeyPath:(NSString *)subKeyPath;

Parameters

subKeyPath

The key path to a property containing an array or ordered set. For example, when retrieving a message from a set of search results, specify the string messages.

Return Value

The index of the item in the array.

Discussion

For intents or responses that contain an array of values, use this method to determine which object in the array was specified. For example, if a parameter represented the first object in an array of messages returned by a search, specifying the string messages would return the value 0.

See Also

Managing Indexed Values

- setIndex:forSubKeyPath:

Specifies which item of an array or ordered set to use for the parameter.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software