Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Aviary SDK

I have added the aviary sdk to my project, but when i click to present the image editor nothing is happening. Here is the basic usage guide http://developers.aviary.com/docs/ios/setup-guide#photo-editor This is the code I have

  • (void)displayEditorForImage:(UIImage *)imageToEdit {

    static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ [AFPhotoEditorController setAPIKey:kAFAviaryAPIKey secret:kAFAviarySecret]; });

    NSArray * toolOrder = @[kAFEnhance, kAFEffects, kAFAdjustments, kAFFocus, kAFStickers, kAFOrientation, kAFCrop, kAFSplash, kAFDraw, kAFText, kAFRedeye, kAFWhiten, kAFBlemish, kAFMeme , kAFFrames]; [AFPhotoEditorCustomization setToolOrder:toolOrder];

    AFPhotoEditorController *editorController = [[AFPhotoEditorController alloc] initWithImage:editImagePub];

    [editorController setDelegate:self]; [self presentViewController:editorController animated:YES completion:nil]; }

  • (void)photoEditor:(AFPhotoEditorController *)editor finishedWithImage:(UIImage *)imageEdited { [fotoView setImage:imageEdited]; editImagePub = imageEdited;

    [self dismissViewControllerAnimated:YES completion:nil]; }

  • (void)photoEditorCanceled:(AFPhotoEditorController *)editor { // Handle cancelation here [self dismissViewControllerAnimated:YES completion:nil]; }