macbook で XCode 5 と iOS 7 に切り替えたところ、何も特別なことをしていないので、すべてが正しく機能すると思いますが、機能しません。
私は6.1アプリにFacebookを統合していましたが、これは私がしていたことです:
- (IBAction)facebookTapped:(UIButton *)sender {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//Check if the net is reachable
SLComposeViewController * faceSheet=[self.socialIntegration showFacebook:@"text" andImage:nil andLink:@"link" andView:self];
dispatch_sync(dispatch_get_main_queue(), ^{
//[self netConnectionTrue:cell Connected:answer];
//[tempAlertView show];
[self presentViewController:faceSheet animated:YES completion:NO];
});
});
}
ボタンを押すと、次のようになります。
+[SocailIntegration modalTransitionStyle]: 認識されないセレクターがクラス 0x49b30 に送信されました
アプリは次の行で中断します。 [self presentViewController:faceSheet animated:YES completion:NO];
なぜこれが起こるのか誰にも分かりますか?
EDIT:これはsocialIntegrationクラスの私のコードです:
-(SLComposeViewController *) showFacebook:(NSString *) initialText andImage:(NSString *) imageName andLink:(NSString *) link andView:(UIViewController *) controller {
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
{
SLComposeViewController *faceSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[faceSheet setInitialText:initialText];
if (imageName.length!=0)
{
[faceSheet addImage:[UIImage imageNamed:imageName]];
}
if (link.length!=0)
{
[faceSheet addURL:[NSURL URLWithString:link]];
}
return faceSheet;
//[controller presentViewController:faceSheet animated:YES completion:nil];
}
else
{
UIAlertView *alertView = [[UIAlertView alloc]
initWithTitle:@"Sorry"
message:@"You can't send a status right now, make sure your device has an internet connection and you have at least one Facebook account setup"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
}