您好,我在iOS项目中使用Aviary SDK。我遵循了documentation中给出的所有步骤。现在我在viewDidAppear中调用以下方法(也可以在viewdidload中尝试)。
- (void)displayEditorForImage:(UIImage *)imageToEdit {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[AFPhotoEditorController setAPIKey:kAFAviaryAPIKey secret:kAFAviarySecret];
});
AFPhotoEditorController *editorController = [[AFPhotoEditorController alloc] initWithImage:imageToEdit];
[editorController setDelegate:self];
[self presentViewController:editorController animated:YES completion:nil]; }
但是当我运行项目应用程序时崩溃了。它将不显示控制器并且异常在下面
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UINavigationBar setAf_backgroundColor:]: unrecognized selector sent to instance 0xcb1b950'
我该如何解决问题。请帮助我。
最佳答案
您确定正确遵循文档吗?
4. Add linker flags
Update your target's (or project's) build settings to include the following "Other Linker Flags":
-ObjC
-all_load
希望这对您有所帮助。
谢谢,
强尼