我有app需要从xml列表加载数据。我想知道如何:
我的挑战是在没有互联网时关闭应用程序。我不能使用Exit(x)对吗?但是,我有其他选择,任何建议都非常感激。
提前致谢
答案 0 :(得分:0)
首先,您需要检查是否存在互联网连接。如需帮助,您可以运行下一个示例: http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html 要退出应用程序,您可以阅读下一篇文章: How to close an application programmatically when the user taps on a button