1 回答

TA貢獻(xiàn)1852條經(jīng)驗 獲得超1個贊
這個方法本來就是用來回寫緩存,保存裝態(tài)之類的吧。至于時間
“Your implementation of this method has approximately five seconds to perform any tasks and return. If you need additional time to perform any final tasks, you can request additional execution time from the system by calling beginBackgroundTaskWithExpirationHandler:. In practice, you should return from applicationDidEnterBackground: as quickly as possible. If the method does not return before time runs out your application is terminated and purged from memory.”
默認(rèn)有5秒,如果不夠可以用beginBackgroundTaskWithExpirationHandler:來延長,這個我沒用過,可以google一下。
一般5秒應(yīng)該夠吧了
- 1 回答
- 0 關(guān)注
- 167 瀏覽
添加回答
舉報