相关疑难解决方法(0)

Twitter发布iOS6'取消'按钮问题

我正在改变我的iOS6和iPhone使用的应用程序,我似乎无法弄清楚为什么当我使用新的社交框架从Twitter发帖时我必须按两次"取消"关闭,其他任何人都有这个问题还是修复?这是按钮的代码.

- (IBAction)twitterPost:(id)sender
{
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
{
    mySLComposerSheet = [[SLComposeViewController alloc] init];
    mySLComposerSheet = [SLComposeViewController   composeViewControllerForServiceType:SLServiceTypeTwitter];
    [mySLComposerSheet setInitialText:[NSString stringWithFormat:@"This is my tweet, hello!",mySLComposerSheet.serviceType]];
    [self presentViewController:mySLComposerSheet animated:YES completion:nil];
}
[mySLComposerSheet setCompletionHandler:^(SLComposeViewControllerResult result) {
    NSLog(@"dfsdf");
    switch (result) {
        case SLComposeViewControllerResultCancelled:
            break;
        case SLComposeViewControllerResultDone:
            break;
        default:
            break;
    }
}];


}
Run Code Online (Sandbox Code Playgroud)

iphone xcode ios ios6 xcode4.5

14
推荐指数
3
解决办法
3208
查看次数

标签 统计

ios ×1

ios6 ×1

iphone ×1

xcode ×1

xcode4.5 ×1