iOS   发布时间:2022-05-04  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了iphone – Twitter发布iOS6“取消”按钮问题大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

我正在更改iOS6和iPhone使用的应用程序,我似乎无法弄清楚为什么当我使用新的社交框架从Twitter发布时,我必须按“取消”两次关闭,其他人都有问题或修复?这是按钮的代码. - (IBACtion)twitterPost:(id)sender { if([SLComposeViewController isAvailableForserviCEType:SLserviCETypeTwitte
我正在更改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;
    }
}];


}

解决方法

如果您使用R_32_11845@ySLComposerSheet这个功能很好…

[mySLComposerSheet setCompletionHandler:^(SLComposeViewControllerResult result) {
[mySLComposerSheet dismissviewControllerAnimated:YES completion:nil];

大佬总结

以上是大佬教程为你收集整理的iphone – Twitter发布iOS6“取消”按钮问题全部内容,希望文章能够帮你解决iphone – Twitter发布iOS6“取消”按钮问题所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。