简体   繁体   English

Aviary SDK问题

[英]Aviary SDK issue

I am using Aviary sdk in ios project. 我在ios项目中使用Aviary sdk。 I added all frameworks and header files which is mentioned in documentation. 我添加了文档中提到的所有框架和头文件。 Now i call below method in viewdidload. 现在,我在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 我如何将鸟巢sdk集成到我的项目中

If you present Modal View Controller in ViewDidLoad the error will occur coz the view is still not loaded into widow hierarchy. 如果在ViewDidLoad中显示Modal View Controller,则会发生错误,因为该视图仍未加载到寡妇层次结构中。 you can call that method in viewDidAppear. 您可以在viewDidAppear中调用该方法。

But if you do so every time the view is appear displayEditorForImage method will be called. 但是,如果您每次都执行此操作,则将调用displayEditorForImage方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM