我正在尝试添加一个 Twitter 视图,以便我可以看到它正在被调用,并且该帐户已连接,但 Twitter 工作表不存在......它位于CCScene
.(cocos2d)
if ([TWTweetComposeViewController canSendTweet])
{
//we can log here
TWTweetComposeViewController *tweetViewController = [[TWTweetComposeViewController alloc] init];
[tweetViewController setInitialText:@"message"];
tweetViewController.completionHandler = ^(TWTweetComposeViewControllerResult result)
{
if(result == TWTweetComposeViewControllerResultDone)
{
} else if(result == TWTweetComposeViewControllerResultCancelled)
{
}
[viewController dismissViewControllerAnimated:YES completion:nil];
};
// present view controller
[[[CCDirector sharedDirector] view] addSubview:viewController.view];
[viewController presentViewController:tweetViewController animated:YES completion:nil];
}
else
{
NSLog(@"NO TWITTER ");
}