I can find mention of setting cropPresets in the web version of Aviary (and feather_crop_values in android), but nothing in the ios sdk. Is there anyway to set the crop presets/values in the ios version, or is this exclusive to the web and android versions?

There is an option to pass NSDictionary options, but the toolset order is the only example given. I tried doing an dictionary with the key "cropPresets" and a value that was an NSArray with an entry of "48x48" as NSString, but it seemed to ignore it and display the default crop presets. I suppose I could keep shooting in the dark, unless someone has a better idea?

有帮助吗?

解决方案

I had the same Problem just a view days ago.

So i wrote them an e-mail. They answered me following:

Customizing the crop options actually isn't yet officially supported on this platform (although we do support it for web and Android, which may be contributing to the confusion here). That said, we have this coming up soon in our roadmap and you should have no problem including only one crop size once that update is available.

So keep an eye out for the new update!

其他提示

Just following up for those who encounter the same problem: Aviary for iOS now supports custom crop presets so go right ahead and use it, as documented. I just coded up a test and it worked fine.

http://www.aviary.com/ios/documentation#customization

Just had to solve the same problem, so I thought I might share the code (it's included in their sample code: https://github.com/AviaryInc/Aviary-iOS-Sample-App/blob/master/AviaryDemo-iOS/AFSDKDemoViewController.m ) :

// Set Custom Crop Sizes
[AFPhotoEditorCustomization setOptionValue:@NO forKey:@"editor.tool.crop.enableOriginal"];
[AFPhotoEditorCustomization setOptionValue:@YES forKey:@"editor.tool.crop.enableCustom"];
NSDictionary * fourBySix = @{kAFCropPresetHeight : @(4.0f), kAFCropPresetWidth : @(6.0f)};
NSDictionary * fiveBySeven = @{kAFCropPresetHeight : @(5.0f), kAFCropPresetWidth : @(7.0f)};
NSDictionary * square = @{kAFCropPresetName: @"Square", kAFCropPresetHeight : @(1.0f), kAFCropPresetWidth : @(1.0f)};
[AFPhotoEditorCustomization setOptionValue:@[square, fourBySix, fiveBySeven] forKey:@"editor.tool.crop.presets"];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top