Q: How do I change the overall appearance of the Photo Editor to fit my app?
A: Use the AviarySDKCustomizer app, which is included in the distributed package. It allows you to customize the color of most elements and text.
Q: I understand that I can customize all colors with the Aviary SDK Customizer, but I want to use my own elements in certain places.
A: If you are a premium partner, you can override the following elements:
Navigation Bar Background Image
[AFPhotoEditorCustomization setNavBarImage:image];
Bar Button Background Images
[AFPhotoEditorCustomization setApplyButtonBackgroundImage:image];
[AFPhotoEditorCustomization setBackButtonBackgroundImage:image];
[AFPhotoEditorCustomization setCancelButtonBackgroundImage:image];
Back Button Image
[AFPhotoEditorCustomization setBackButtonForegroundImage:image];
Tool Icons
[AFPhotoEditorCustomization setIconImage:image forTool:kAFBrightness forState:AFPhotoEditorIconStateDefault];
[AFPhotoEditorCustomization setIconImage:image forTool:kAFBrightness forState:AFPhotoEditorIconStateSelected];
Q: I don't like the "Cancel" and "Apply" titles on the main Photo Editor screen. How do I change them?
A: You may choose from "Cancel", "Back", and "Exit" for the left button and "Done", "Save", "Next", and "Send" for the right button. Set your preferences as follows:
[AFPhotoEditorCustomization setLeftNavigationBarButtonTitle:kAFLeftNavigationTitlePresetExit];
[AFPhotoEditorCustomization setRightNavigationBarButtonTitle:kAFRightNavigationTitlePresetSave];
Q: I don't like the default tool order. I want to remove some tools control the order of the tools I want. How do I do this?
A: Make the following call:
// Set the tools to Contrast, Brightness, Enhance, and Crop (to be displayed in that order).
[AFPhotoEditorCustomization setToolOrder:@[kAFContrast, kAFBrightness, kAFEnhance, kAFCrop]];
Q: The crop tool's default configuration does not suit my app. Can I modify its settings?
A: Yes! Here's an example that includes all possible modifications to the crop tool:
// Disable the Custom and Original crop options, and do not allow the user to invert the settings.
[AFPhotoEditorCustomization setCropToolCustomEnabled:NO];
[AFPhotoEditorCustomization setCropToolInvertEnabled:NO];
[AFPhotoEditorCustomization setCropToolOriginalEnabled:NO];
// Create two custom presets displayed to the user as "Option1" and "Option2" with 3:7 and 4:11 aspect ratios, respectively.
[AFPhotoEditorCustomization setCropToolPresets:@[@{kAFCropPresetName:@"Option1", kAFCropPresetWidth:@3, kAFCropPresetHeight:@7},@{kAFCropPresetName:@"Option2", kAFCropPresetWidth:@4, kAFCropPresetHeight:@11}]];
// Set the display width of the cells for all of the presented options.
[AFPhotoEditorCustomization setCropToolCellWidth:150.f];
Q: I'm a Premium Content Network partner, and I want to preview the content that will be in the Photo Editor rather than look at the live content that is available now. Can I do this?
A: To point the Photo Editor at the Premium Content Network staging environment, make the following call:
[AFPhotoEditorCustomization usePCNStagingEnvironment:YES];
It is important that you don't deploy your app with this line of code, so the Photo Editor will warn you on each first launch within an app session that you are pointing at the staging environment.
Q: My app uses a lot of memory, and I don't anticipate a user using the Photo Editor all that often. Can I do anything to further reduce Aviary's memory footprint?
A: By default, the Photo Editor retains a small amount of GPU data (almost entirely shader programs) to optimize launch speed and user experience. You may disable this behavior as follows:
[AFPhotoEditorCustomization purgeGPUMemoryWhenPossible:YES];
Q: How do I change the supported orientations for the editor?
A: On the iPhone form factor, the Editor is restricted to Portrait presentation only. To change the orientations for iPad, make the following call:
[AFPhotoEditorCustomization setSupportedIpadOrientations:@[@(UIInterfaceOrientationLandscapeLeft), @(UIInterfaceOrientationLandscapeRight), @(UIInterfaceOrientationPortrait)]];
Q: How do I turn on in-app purchases?
A: In app purchases are currently only available to Premium partners. There are a number of steps you need to take. Please review the Aviary In-App Purchase guide. As it indicates, you will need to make the following customization call at some point in your code:
[AFPhotoEditorCustomization enableInAppPurchases:YES];