Inherits from NSObject
Declared in AFPhotoEditorCustomization.h

Overview

This class provides a powerful interface for configuring an AFPhotoEditorController’s appearance and behavior. While changing values after presenting an AFPhotoEditorController instance is possible, it is strongly recommended that you make all necessary calls to AFPhotoEditorCustomization before editor presentation. Example of usage can be found in the Aviary iOS SDK Customization Guide.

Tasks

Class Methods

disableLocalization:

Configures the editor to use localization or not.

+ (void)disableLocalization:(BOOL)disableLocalization

Parameters

disableLocalization

YES disables localization, NO leaves it enabled.

Discussion

By default, Aviary enables localization.

Declared In

AFPhotoEditorCustomization.h

enableInAppPurchases:

Enables or disables in-app purchases in the editor.

+ (void)enableInAppPurchases:(BOOL)enableIAP

Parameters

enableIAP

YES enables IAPs, NO disables them.

Discussion

By default, in-app purchases are disabled. See the Aviary In-App Purchase guide for more information on setting up in app purchases.

Declared In

AFPhotoEditorCustomization.h

purgeGPUMemoryWhenPossible:

Configures the editor to free GPU memory when possible.

+ (void)purgeGPUMemoryWhenPossible:(BOOL)purgeGPUMemory

Parameters

purgeGPUMemory

YES purges GPU memory when possible, NO retains it.

Discussion

By default, Aviary keeps a small number of OpenGL objects loaded to optimize launches of Aviary products. Set this key to YES purge GPU memory when possible.

Declared In

AFPhotoEditorCustomization.h

setCropToolCellWidth:

This property sets the width of the crop preset selection cells.

+ (void)setCropToolCellWidth:(float)cropToolCellWidth

Parameters

cropToolCellWidth

The width of the crop option cell in points.

Declared In

AFPhotoEditorCustomization.h

setCropToolCustomEnabled:

Enables or disables the custom crop size.

+ (void)setCropToolCustomEnabled:(BOOL)cropToolEnableCustom

Parameters

cropToolEnableCustom

YES enables the custom crop size, NO disables it.

Discussion

The Custom crop preset does not constrain the crop area to any specific aspect ratio. By default, custom crop size is enabled.

Declared In

AFPhotoEditorCustomization.h

setCropToolInvertEnabled:

Enables or disables the invertability of crop sizes.

+ (void)setCropToolInvertEnabled:(BOOL)cropToolEnableInvert

Parameters

cropToolEnableInvert

YES enables the crop size inversion, NO disables it.

Discussion

By default, inversion is enabled. Presets with names, i.e. Square, are not invertible, regardless of whether inversion is enabled.

Declared In

AFPhotoEditorCustomization.h

setCropToolOriginalEnabled:

Enables or disables the custom crop size.

+ (void)setCropToolOriginalEnabled:(BOOL)cropToolEnableOriginal

Parameters

cropToolEnableOriginal

YES enables the original crop size, NO disables it.

Discussion

The Original crop preset constrains the crop area to photo’s original aspect ratio. By default, original crop size is enabled.

Declared In

AFPhotoEditorCustomization.h

setCropToolPresets:

Sets the availability and order of crop preset options.

+ (void)setCropToolPresets:(NSArray *)cropToolPresets

Parameters

cropToolPresets

An array of dictionaries. The dictionaries should

Discussion

The dictionaries should be of the form @{kAFCropPresetName: , kAFCropPresetWidth: , kAFCropPresetHeight: }. When the corresponding option is selected, the crop box will be constrained to a kAFCropPresetWidth:kAFCropPresetHeight aspect ratio.

If Original and/or Custom options are enabled, then they will precede the presets defined here. If no crop tool presets are set, the default options are Square, 3x2, 5x3, 4x3, 6x4, and 7x5.

Declared In

AFPhotoEditorCustomization.h

setLeftNavigationBarButtonTitle:

Sets the text of the editor’s left navigation bar button.

+ (void)setLeftNavigationBarButtonTitle:(NSString *)leftNavigationBarButtonTitle

Parameters

leftNavigationBarButtonTitle

An NSString value represented by one of the three kAFLeftNavigationTitlePreset keys.

Discussion

Attempting to set any string besides one of the kAFLeftNavigationTitlePresets will have no effect.

Declared In

AFPhotoEditorCustomization.h

setRightNavigationBarButtonTitle:

Sets the text of the editor’s right navigation bar button.

+ (void)setRightNavigationBarButtonTitle:(NSString *)rightNavigationBarButtonTitle

Parameters

rightNavigationBarButtonTitle

An NSString value represented by one of the three kAFRightNavigationTitlePreset keys.

Discussion

Attempting to set any string besides one of the kAFRightNavigationTitlePresets will have no effect.

Declared In

AFPhotoEditorCustomization.h

setSupportedIpadOrientations:

Configures the orientations the editor can have on the iPad form factor.

+ (void)setSupportedIpadOrientations:(NSArray *)supportedOrientations

Parameters

supportedOrientations

An NSArray containing NSNumbers each representing a valid UIInterfaceOrientation.

Discussion

On the iPhone form factor, orientation is always portrait.

Declared In

AFPhotoEditorCustomization.h

setToolOrder:

Sets the type and order of tools to be presented by the editor.

+ (void)setToolOrder:(NSArray *)toolOrder

Parameters

toolOrder

An NSArray containing NSString values represented by one of the tool keys

Discussion

The valid tool keys are:

kAFEnhance
kAFEffects
kAFStickers
kAFOrientation
kAFCrop
kAFBrightness
kAFContrast
kAFSaturation
kAFSharpness
kAFDraw
kAFText
kAFRedeye
kAFWhiten
kAFBlemish
kAFMeme
kAFFrames;
kAFFocus

Declared In

AFPhotoEditorCustomization.h

usePCNStagingEnvironment:

Configures the editor to point at the Premium Content Network’s staging environment.

+ (void)usePCNStagingEnvironment:(BOOL)usePCNStagingEnvironment

Parameters

usePCNStagingEnvironment

YES points the editor to staging, no points it to production.

Discussion

By default, the editor points at the production environment. Call this method with YES before editor to launch to view the content in the Premium Content Network staging environment.

Declared In

AFPhotoEditorCustomization.h