SLComposeVIEwController *fbController=[SLComposeVIEwController composeVIEwControllerForServiceType:SLServiceTypeTwitter];if([SLComposeVIEwController isAvailableForServiceType:SLServiceTypeTwitter]){ SLComposeVIEwControllerCompletionHandler __block completionHandler=^(SLComposeVIEwControllerResult result){ [fbController dismissVIEwControllerAnimated:YES completion:nil]; switch(result){ case SLComposeVIEwControllerResultCancelled: default: { NSLog(@"Cancelled....."); } break; case SLComposeVIEwControllerResultDone: { NSLog(@"Posted...."); UIAlertVIEw *alertVIEw = [[UIAlertVIEw alloc] initWithTitle:@"Success" message:@"Posted Successfully" delegate:self cancelbuttonTitle:@"OK" otherbuttonTitles:nil]; [alertVIEw show]; } break; }}; [fbController addImage:[UIImage imagenamed:@"1.jpg"]]; [fbController setinitialText:@"Check out this article."]; //[fbController addURL:[NSURL URLWithString:@"http://soulwithmobiletechnology.blogspot.com/"]]; [fbController setCompletionHandler:completionHandler]; [self presentVIEwController:fbController animated:YES completion:nil];}
如果用户没有设置推特帐户,则显示具有设置和取消按钮的提醒.但它没有在设备中显示警报?有人可以帮我吗.提前致谢 .
解决方法 Facebook分享也是如此.删除测试:if([SLComposeVIEwController isAvailableForServiceType:SLServiceTypeTwitter])
如果用户的Twitter帐户尚未在iOS 6中设置,则上述测试将评估为false,并且不会执行任何共享代码.
相反,如果您跳过检查并尝试呈现SLComposeVIEwController,iOS将提示用户设置他们的Twitter帐户.
总结以上是内存溢出为你收集整理的ios – SLCOmposeviewcontroller twitter共享警报问题全部内容,希望文章能够帮你解决ios – SLCOmposeviewcontroller twitter共享警报问题所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)