I am using Aviary sdk in ios project. I added all frameworks and header files which is mentioned in documentation. Now i call below method in viewdidload.
- (void)displayEditorForImage:(UIImage *)imageToEdit
{
AFPhotoEditorController *editorController = [[AFPhotoEditorController alloc] initWithImage:imageToEdit];
[editorController setDelegate:self];
[self presentViewController:editorController animated:YES completion:nil];
}
but it gives warning below in log and not showing Aviary window.
Warning: Attempt to present <AFSDKViewController: 0x7e1aeb0> on <ViewController: 0x7934af0> whose view is not in the window hierarchy!
how can i integrate aviary sdk in my project
If you present Modal View Controller in ViewDidLoad the error will occur coz the view is still not loaded into widow hierarchy. you can call that method in viewDidAppear.
But if you do so every time the view is appear
displayEditorForImagemethod will be called.