我在ios项目中使用了Aviary sdk。我添加了文档中提到的所有框架和头文件。现在我在viewdidload中调用下面的方法。
- (void)displayEditorForImage:(UIImage *)imageToEdit
{
AFPhotoEditorController *editorController = [[AFPhotoEditorController alloc] initWithImage:imageToEdit];
[editorController setDelegate:self];
[self presentViewController:editorController animated:YES completion:nil];
}但它会在日志中给出下面的警告,并且不显示Aviary窗口。
Warning: Attempt to present <AFSDKViewController: 0x7e1aeb0> on <ViewController: 0x7934af0> whose view is not in the window hierarchy!如何将aviary sdk集成到我的项目中
发布于 2013-01-23 19:27:05
如果您在ViewDidLoad中呈现Modal View Controller,则会出现错误,因为视图仍未加载到窗口层次结构中。您可以在viewDidAppear中调用该方法。
但是,如果每次出现视图时都这样做,则会调用displayEditorForImage方法。
https://stackoverflow.com/questions/14478360
复制相似问题