SaveState in MvvmCross is not being called in an iOS application

≯℡__Kan透↙ 提交于 2019-12-12 05:49:50

问题


I am using MvvmCross v3.5 to build an iOS application. Whenever the application goes into the background I am expecteing SaveState to be called in the view model.

However it never gets called. I have tried this both on the simulator and a device. Am I missing something.

This works in the Android version of the app, so I think I have set it up correctly.

Has anyone else got this issue? Any help would be appreciated.


回答1:


I think in Xamarin you need to implement UIApplicationDelegate.ShouldRestoreApplicationState and ShouldSaveApplicationState to return true.



来源:https://stackoverflow.com/questions/29901027/savestate-in-mvvmcross-is-not-being-called-in-an-ios-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!