Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

State Preservation not working - Help please

$
0
0

I have an iPad application targeting iOS 6.0. I cannot get state preservation to work and I do not know what is wrong. If someone could point it out, I'd appreciate it.

In the AppDelegate I have set:

    public override bool ShouldSaveApplicationState(UIApplication application, NSCoder coder)
    {
        return true;
    }

    public override bool ShouldRestoreApplicationState(UIApplication application, NSCoder coder)
    {
        return true;
    }

And in the two UIViewController classes that I want to preserve, in the constructor I set:

            this.RestorationIdentifier = "MyRestorationID";

I don't know what else to do. When I test the application with the simulator, when I switch to a different app, I can see that :

  1. App entering background state.
  2. App is terminating.

When I try to restore the App, all state is lost.

Any help will be greatly appreciated.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>