저는 cocoa2d에서 새로 왔습니다. 현재 FacebookView 공유 용으로 presentViewController를 사용하려고합니다.CCDirector가 presentviewcontroller : animation에 응답하지 않을 수 있습니다. animation
-(void)shareFB:(NSString *)text
{
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {
SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[controller setInitialText:text];
[[CCDirector sharedDirector]presentViewController:controller animated:YES completion:nil];
}
else
{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Sorry!" message:@"Please add Facebook account in settings menu" delegate:Nil cancelButtonTitle:@"OK" otherButtonTitles:Nil, nil];
[alert show];
}
}
그것은에 경고를 제공합니다 : 여기
코드입니다
[[CCDirector sharedDirector]presentViewController:controller animated:YES completion:nil];
그건 : CCDirector는 응답하지 않을 수 있습니다 'presentviewcontroller : 애니메이션 : 완료 :'
작동 중이거나 앱이 손상되고 있습니다. – Blisskarthik
예, 충돌했습니다. 오류 : NSInvalidArgumentException ', [CCDirectorTimer presentViewController : animated : completed :] : 인스턴스에 알 수없는 선택자가 전송 됨 – iBhavin
대답을 시도하고 알려주세요. – Blisskarthik