I just wanted to implement the iOS State-Restoration APIs in one of my Apps.
After finally getting it to work, I discovered that a ViewController that I present modally gets restored using an animation, which is not what I want. I would expect my app to just be in the state I left it, but not having the user to see hot he got there.
So I went ahead and downloaded Apple Sample Code on that: https://developer.apple.com/library/ios/samplecode/StateRestore/Introduction/Intro.html and wanted to see if it happens there as well. And it turns out that it does.
Further there is a warning in the Logs:
Unbalanced calls to begin/end appearance transitions for <UINavigationController: 0x7b0512b0>.
The following solution comes directly from Apple.
In your app delegate, you should be implementing
application:willFinishLaunchingWithOptions: (instead of or in addition to
didFinishLaunching). In your implementation, probably as the last line just before returning
true (or YES if this is Objective-C), insert this line:
Or, if this is Objective-C:
It turns out that this was always needed, but the documentation has never been clear about it.