Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 ios4 中,当您使用主页按钮退出 iphone 应用程序时,它会进入后台。第二次进入应用程序(前台)时,我希望能够像第一次(ViewDidAppear)一样加载应用程序,而不是处于我离开它的状态。
只需找出程序何时被后台运行并结束它,然后在它没有后台运行时启动一个新实例。
在您的 Info.plist 中,有一个名为“应用程序不在后台运行”的条目。检查是的。这不是一个直接的答案,但如果您实际上不使用该背景时间来完成任务,它是最直接的。
尽管我尚未对其进行测试,但这应该会让您停止在后台运行。试试看,让我们知道。