2014-08-28 65 views
1

您好,我正在iOS項目中使用Aviary SDK。我遵循這個documentation給出的所有步驟。現在我在viewDidAppear中調用以下方法(也嘗試在viewdidload中)。Aviary SDK問題導致應用程序在iOS中崩潰

- (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];  } 

但是當我運行該項目申請crashed.it不會顯示控制器和異常低於

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UINavigationBar setAf_backgroundColor:]: unrecognized selector sent to instance 0xcb1b950' 

我該如何解決problem.Please幫助我。

回答

6

你確定按照正確的文檔?

4. Add linker flags 

Update your target's (or project's) build settings to include the following "Other Linker Flags": 

-ObjC 
-all_load 

希望這對你有所幫助。

感謝, 強尼

+0

感謝ü非常 – Dhara 2014-09-16 09:34:15

+0

@Trinh陳其工作感謝您的幫助 – nivritgupta 2015-02-07 09:51:38

+0

真的感謝解決我的問題。 – atifali 2015-10-22 07:05:25