1

좋아요, 그렇다면 앱 설치 방법에 관한 Aviary Documentation Tutorial을 따르고 있지만 두 가지 오류가 있습니다. 오류가 위의 오류를 반환 라인 [editorController setDelegate:self];입니다Aviary SDK, 위임 문제

- (void)displayEditorForImage:(UIImage *)image 
{ 
static dispatch_once_t onceToken; 

dispatch_once(&onceToken, ^{ 
    [AFPhotoEditorController setAPIKey:kAFAviaryAPIKey secret:kAFAviarySecret]; 
}); 

AFPhotoEditorController *editorController = [[AFPhotoEditorController alloc] initWithImage:image2]; 

[editorController setDelegate:self]; //error is here 

[self presentViewController:editorController animated:YES completion:nil];} 

을 다음과 같이

Errors
코드는, 나는이 문제를 해결하는 방법을 모르겠어요. documentation에 제공된 예제에는 동일한 코드가 있으며 심지어 sample app에도 동일한 코드가 있지만 제대로 작동하는 것 같습니다. 내가 잘못하고있는 것이 있습니까?

답변

0

대리인 클래스가 AFPhotoEditorControllerDelegate 프로토콜을 준수 함을 나타내야합니다.

보통, @implemenation 라인 바로 앞에 .m이 있습니다. 클래스 확장을 추가하십시오 (이미있을 수 있습니다). 거기에 프로토콜을 추가하십시오.

@interface ThirdViewController() <AFPhotoEditorControllerDelegate> 

@end 

@implementation ThirdViewController 

// all your existing stuff 

@end