您好我在我的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'
我该如何解决问题。请帮助我。
答案 0 :(得分:6)
您确定正确遵循文档吗?
4. Add linker flags
Update your target's (or project's) build settings to include the following "Other Linker Flags":
-ObjC
-all_load
希望这对你有所帮助。
谢谢, 尊利