IKPictureTaker Class Reference
| Inherits from | |
| Conforms to | |
| Framework | System/Library/Frameworks/Quartz.framework/ImageKit.framework |
| Availability | Available in OS X v10.5 and later. |
| Declared in | IKPictureTaker.h ImageKitDeprecated.h |
Overview
The IKPictureTaker class represents a panel that allows users to choose images by browsing the file system. The picture taker panel provides an Open Recent menu, supports image cropping, and supports taking snapshots from an iSight or other digital camera.
Tasks
Creating And Displaying The Picture Taker
-
+ pictureTaker -
– beginPictureTakerSheetForWindow:withDelegate:didEndSelector:contextInfo: -
– beginPictureTakerWithDelegate:didEndSelector:contextInfo: -
– popUpRecentsMenuForView:withDelegate:didEndSelector:contextInfo: -
– runModal
Getting and Setting Images
Getting and Setting Mirroring
Class Methods
pictureTaker
Returns a shared IKPictureTaker instance, creating it if necessary.
Return Value
An IKPictureTaker object.
Availability
- Available in OS X v10.5 and later.
Declared In
IKPictureTaker.hInstance Methods
beginPictureTakerSheetForWindow:withDelegate:didEndSelector:contextInfo:
Opens a picture taker as a sheet whose parent is the specified window.
Parameters
- aWindow
The parent window of the picture taker sheet.
- delegate
The object that will invoke the selector
didEndSelectorwhen the picture taker session terminates.- didEndSelector
The selector to invoke when the picture taker session terminates.
- contextInfo
Any data that must be passed as an argument to the delegate through
didEndSelectorafter the picture taker session terminates.
Discussion
The didEndSelector method should have the following signature:
- (void)pictureTakerDidEnd:(IKPictureTaker *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
The returnCode value is set to NSOKButton if the user validates, or to NSCancelButton if the user cancels.
Availability
- Available in OS X v10.5 and later.
Declared In
IKPictureTaker.hbeginPictureTakerWithDelegate:didEndSelector:contextInfo:
Opens a picture taker pane.
Parameters
- delegate
The object that will invoke the selector
didEndSelectorwhen the picture taker session terminates.- didEndSelector
The selector to invoke when the picture taker session terminates.
- contextInfo
Any data that must be passed as an argument to the delegate through
didEndSelectorafter the picture taker session terminates.
Discussion
The didEndSelector method should have the following signature:
- (void)pictureTakerDidEnd:(IKPictureTaker *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
The returnCode value is set to NSOKButton if the user validates, or to NSCancelButton if the user cancels.
Availability
- Available in OS X v10.5 and later.
Declared In
IKPictureTaker.hinputImage
Returns the input image associated with the picture taker.
Return Value
The input image.
Discussion
The input image is never modified by the picture taker.
Availability
- Available in OS X v10.5 and later.
See Also
Declared In
IKPictureTaker.hmirroring
Returns whether video mirroring is enabled during snapshots.
Return Value
Returns YES if video mirroring is enabled, NO otherwise.
Availability
- Available in OS X v10.5 and later.
Declared In
IKPictureTaker.houtputImage
Returns the edited image.
Return Value
The edited image.
Availability
- Available in OS X v10.5 and later.
Declared In
IKPictureTaker.hpopUpRecentsMenuForView:withDelegate:didEndSelector:contextInfo:
Displays the Open Recent popup menu associated with the picture taker.
Parameters
- delegate
The object that will invoke the selector
didEndSelectorwhen the picture taker session terminates.- didEndSelector
The selector to invoke when the picture taker session terminates.
- contextInfo
Any data that must be passed as an argument to the delegate through
didEndSelectorafter the picture taker session terminates.
Discussion
The didEndSelector method should have the following signature:
- (void)pictureTakerDidEnd:(IKPictureTaker *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
The returnCode value is set to NSOKButton if the user validates, or to NSCancelButton if the user cancels.
Availability
- Available in OS X v10.5 and later.
Declared In
IKPictureTaker.hrunModal
Opens a modal picture taker dialog.
Return Value
Returns NSOKButton if the user edits or chooses an image; NSCancelButton if the user cancels or does not change the default image.
Availability
- Available in OS X v10.5 and later.
Declared In
IKPictureTaker.hsetInputImage:
Set the image input for the picture taker.
Parameters
- image
An
NSImageobject.
Discussion
The input image is never modified by the picture taker.
Availability
- Available in OS X v10.5 and later.
See Also
Declared In
IKPictureTaker.hConstants
Picture Taker Keys
Keys for customizing the picture taker appearance and behavior. These values are set by sending the picture taker instance setValue:forKey.
NSString *const IKPictureTakerAllowsVideoCaptureKey; NSString *const IKPictureTakerAllowsFileChoosingKey; NSString *const IKPictureTakerShowRecentPictureKey; NSString *const IKPictureTakerUpdateRecentPictureKey; NSString *const IKPictureTakerAllowsEditingKey; NSString *const IKPictureTakerShowEffectsKey; NSString *const IKPictureTakerInformationalTextKey; NSString *const IKPictureTakerImageTransformsKey; NSString *const IKPictureTakerOutputImageMaxSizeKey; NSString *const IKPictureTakerCropAreaSizeKey; NSString *const IKPictureTakerShowAddressBookPictureKey; NSString *const IKPictureTakerShowEmptyPictureKey; NSString *const IKPictureTakerRemainOpenAfterValidateKey;
Constants
IKPictureTakerAllowsVideoCaptureKeyA key for allowing video capture. The associated value is an
NSNumbervalue (BOOL) whose default value isYES.Available in OS X v10.5 and later.
Declared in
IKPictureTaker.h.IKPictureTakerAllowsFileChoosingKeyA key for allowing the user to choose a file. The associated value is an
NSNumberobject that contains aBOOLvalue whose default value isYES.Available in OS X v10.5 and later.
Declared in
IKPictureTaker.h.IKPictureTakerUpdateRecentPictureKeyA key for allowing a recent picture to be updated. The associated value is an
NSNumberobject that contains aBOOLvalue whose default value isYES.Available in OS X v10.5 and later.
Declared in
IKPictureTaker.h.IKPictureTakerAllowsEditingKeyA key for allowing image editing. The associated value is an
NSNumberobject that contains aBOOLvalue whose default value isYES.Available in OS X v10.5 and later.
Declared in
IKPictureTaker.h.IKPictureTakerShowEffectsKeyA key for showing effects. The associated value is an
NSNumberobject that contains aBOOLvalue whose default value isNO.Available in OS X v10.5 and later.
Declared in
IKPictureTaker.h.IKPictureTakerInformationalTextKeyA key for informational text. The associated value is an
NSStringorNSAttributedStringobject whose default value is"Drag Image Here".Available in OS X v10.5 and later.
Declared in
IKPictureTaker.h.IKPictureTakerImageTransformsKeyA n image transformation key. The associated value is an
NSDictionaryobject that can be serialized.Available in OS X v10.5 and later.
Declared in
IKPictureTaker.h.IKPictureTakerOutputImageMaxSizeKeyA key for the maximum size of the output image. The associated value is an
NSValueobject (NSSize).Available in OS X v10.5 and later.
Declared in
IKPictureTaker.h.IKPictureTakerCropAreaSizeKeyA key for the cropping area size. The associated value is an
NSValueobject (NSSize).Available in OS X v10.5 and later.
Declared in
ImageKitDeprecated.h.IKPictureTakerShowAddressBookPictureKeyA key for showing the address book picture. The associated value is a Boolean value packages as an
NSNumberobject. The default value isNO. If set to YES, the picture taker automatically adds the address book image for the Me user at the end of the Recent Pictures pop-up menu.Available in OS X v10.5 and later.
Declared in
IKPictureTaker.h.IKPictureTakerShowEmptyPictureKeyA key for showing an empty picture. The associated value is an
NSImageobject. The default value isnil. If set to an image, the picture taker automatically shows an image at the end of the Recent Pictures pop-up menu. that means "no picture."Available in OS X v10.5 and later.
Declared in
IKPictureTaker.h.IKPictureTakerRemainOpenAfterValidateKeyA key that determines if the picture taker should remain open after the user selects done. This allows the application to programmatically dismiss the panel. The associated value is an
NSNumberobject that contains aBOOLvalue whose default value isNOAvailable in OS X v10.6 and later.
Declared in
IKPictureTaker.h.
© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-03-24)