没有网络时SLComposeViewControllerResultDone

时间:2013-05-27 04:41:52

标签: ios

当我在没有网络时检查twitter(iOS5和6)时,它会在完成处理程序中返回SLComposeViewControllerResultDone。是否有任何解决方案显示成功的结果? 任何帮助都可以得到赞赏。

1 个答案:

答案 0 :(得分:2)

根据文件

The handler has a single parameter that indicates whether the user finished or cancelled composing the post. This block is not guaranteed to be called on any particular thread.

参数的值可以是

  • SLComposeViewControllerResultCancelled :表示视图控制器在不发送帖子的情况下被解除。例如,用户选择取消或帐户不可用。

  • SLComposeViewControllerResultDone :视图控制器被关闭,消息正在后台发送。当用户选择完成时会发生这种情况。

因此,在您的情况下,我认为您需要在完成处理程序内或在显示SLComposeViewController之前检查可达性,并显示相应的消息。

相关问题