Questions tagged [uikit-state-preservation]

The state preservation system in UIKit provides a simple but flexible infrastructure for preserving and restoring the state of your app’s view controllers and views.

37 questions
2
votes
1 answer

Restore and preserve UIViewController pushed from UINavigationController, no storyboard

I try to restore a simple UIViewController that I pushed from my initial view controller. The first one is preserved, but the second one just disappear when relaunched. I don't use storyboard. I implement the protocol in every view controller and…
2
votes
2 answers

IOS state preservation: can I display a launch image instead of a snapshot

Question: When working with IOS state preservation, how can I display a custom launch image instead of the snapshot during the launching process Description: I am working on IOS state preservation. Everything works fine except that every time I…
ukim
  • 2,395
  • 15
  • 22
2
votes
0 answers

iOS state preservation for an application needing login

My app has four states each using its own root view controller and I only need to restore the views for the online state but need to go through the three other states on startup for doing the login and loading the app content. I have it working for…
Chris
  • 728
  • 7
  • 28
2
votes
1 answer

How to persist temporary NSManagedObjectContext without saving it to the parent context

I use CoreData to manage my application data model. I use child managed object context in my editing view controller so that I can ether save or discard the changes made by the user. I create the child context as follows: NSManagedObjectContext*…
2
votes
3 answers

UIViewController state restoration without storyboard not working

I'd like to implement state preservation and restoration in my iOS 6 app that doesn't use storyboards. My main view controller that I want to save state and restore is a UIViewController that's part of the UINavigationController. My view controller…
Jonas Gardner
  • 2,458
  • 5
  • 22
  • 28
1
vote
0 answers

Why isn't my navigation stack being preserved upon restoring the app?

So as per my post here: Why is changing my app's orientation dismissing my parent view controller after state restoration? I had a discussion going with another user and we concluded that this issue has to do with my navigation stack not being…
Michael McKenna
  • 811
  • 1
  • 11
  • 24
1
vote
1 answer

What are good ways to work around the encoding limitation of SKAction code blocks during application state preservation?

Problem When the node hierarchy is encoded, as is common during application state preservation or a “game save”, nodes running SKAction actions with code blocks must be handled specially, since the code blocks cannot be encoded. Example 1: Delayed…
Karl Voskuil
  • 750
  • 6
  • 19
1
vote
0 answers

State restoration and preservation , encoding UILabel

-(void)encodeRestorableStateWithCoder:(NSCoder *)coder { NSLog(@"Start encode"); for (int index = 1; index <= [self.view.subviews count]-1; index++) { NSString *encodeKey = [NSString stringWithFormat:@"%dnumber",index]; UILabel *label = …
1
vote
2 answers

State Preservation and Restoration UIImageView added from button event

I am adding UIImageView on a button click. I want to restore it using UIKit. I am getting restoration identifier in: - (void)decodeRestorableStateWithCoder:(NSCoder *)coder; How can I decode this UIImageView?
Jawad Ali
  • 13,556
  • 3
  • 32
  • 49
1
vote
2 answers

UIViewControllers being created but not shown in state restoration

I have an app that is not working properly with state restoration. It previously did, but as I started moving away from the storyboard it stopped. My app starts with a LoginViewController that is the starting view controller in my storyboard. If the…
1
vote
1 answer

Preservation and Restoration for Tabbar without Storyboard

I am using iOS 6 Preservation and Restoration (without Storyboard), it is working fine with navigation controller , but if i manually add Tabbar controller on main window , i am not getting selected tab. eg. ListViewController *list =…
PJR
  • 13,052
  • 13
  • 64
  • 104
1
vote
2 answers

What is the best way to restore the state of ViewController

I would like to ask some suggestion about how to restore a viewControllers state. Like in the app called "Pic Collage" when you create a card and save it and later restore it.
Anand
  • 864
  • 10
  • 31
1
vote
2 answers

Application state preservation and restoration without using storyboard?

I have added uinavigationcontroller in AppDelegate.m like this self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; UINavigationController *nav = [[UINavigationController…
I_User
  • 325
  • 3
  • 18
1
vote
1 answer

How to manage state preservation and restoration in iOS 5

I've been having a look at the "State Preservation and Restoration" section in iOS App Programming Guide, and the process described there seems to be available only from iOS 6. Since I need to make my app compatible from iOS 5, I don´t find a, let's…
AppsDev
  • 12,319
  • 23
  • 93
  • 186
1
vote
1 answer

iOS State Restoration

I am fairly new to iOS development and I am trying to understand the State Restoration API. Without implementing the APIs in my application, when the application is exited and resumed it does restore the state of the application to the way it was…
Joe Duncan
  • 33
  • 3