uikit-state-preservation

How can I prevent SKAction sequence restarting after decoding?

隐身守侯 提交于 2020-01-13 16:20:26
问题 My app is a SpriteKit game with application state preservation and restoration. When application state is preserved, most of the nodes in my current SKScene are encoded. When a node running an SKAction is encoded and decoded, the action will restart from the beginning. This appears to be standard SpriteKit behavior. For me, this behavior is most noticeable for SKAction sequence . On decoding, the sequence restarts, no matter how many of its component actions have already completed. For

iOS state preservation and container views

扶醉桌前 提交于 2020-01-11 17:40:51
问题 I have a view controller in a storyboard that is using a container view. Both have restoration identifiers set. The parent is being saved and restored just fine. The child however is not. Neither -encodeRestorableStateWithCoder: or -decodeRestorableStateWithCoder: are being called on the child view controller. What's the correct way to save child view controllers that are created with a view container? I can save the child view controller in the parents -encodeRestorableStateWithCoder: ,

iOS preserve state of UIWebView?

大城市里の小女人 提交于 2020-01-01 03:24:15
问题 Is it possible to preserve the state of the UIWebView (e.g the current webpage, back/front list) in the current app launch ? For example, if I dealloc a webview, and at some point in the future, I want to recreate it - is it possible to give it the prior state? 回答1: Good Approach In iOS 6 and later, if you assign a value to this view’s restorationIdentifier property, it attempts to preserve its URL history, the scaling and scrolling positions for each page, and information about which page is

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

廉价感情. 提交于 2019-12-31 03:54:09
问题 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 Callback after Animation Here, an orc has been killed. It is animated to fade out and then remove itself from the node hierarchy: SKAction *fadeAction = [SKAction fadeOutWithDuration:3.0]; SKAction *removeAction = [SKAction removeFromParent];

State preservation and restoration strategies with Core Data objects in a UIManagedDocument

自闭症网瘾萝莉.ら 提交于 2019-12-23 20:13:23
问题 I'm starting to try and add support for state preservation and restoration to my iOS app, which has a Core Data component to it that I access via a UIManagedDocument. I'm starting to add the restoration identifiers to my view controllers, and have hooked up the required functions (currently empty) within my AppDelegate, and controllers. I have an object that could potentially be referenced by multiple view controllers so I plan to try and preserve and restore this within my AppDelegate and

State preservation and restoration strategies with Core Data objects in a UIManagedDocument

别等时光非礼了梦想. 提交于 2019-12-23 19:50:36
问题 I'm starting to try and add support for state preservation and restoration to my iOS app, which has a Core Data component to it that I access via a UIManagedDocument. I'm starting to add the restoration identifiers to my view controllers, and have hooked up the required functions (currently empty) within my AppDelegate, and controllers. I have an object that could potentially be referenced by multiple view controllers so I plan to try and preserve and restore this within my AppDelegate and

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

余生长醉 提交于 2019-12-11 07:14:53
问题 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 restored. Summary from that post - I can successfully modally present controllers from my restored VC, however, when I rotate the device orientation to display one of the modally presented view controllers then proceed to dismiss that controller, the

State Preservation for View Controllers with Custom Delegates or Data Sources

好久不见. 提交于 2019-12-05 01:45:45
问题 I am attempting to use iOS 6+ (my app is 7.0+) State Preservation to preserve a view that is presented modally from another View Controller. As such it, has the typical modal view controller dismissal pattern: TNTLoginViewController.h contains @protocol TNTLoginViewControllerDelegate <NSObject> - (void)TNTLoginViewControllerDismiss:(TNTLoginViewController *)controller; @end @interface TNTLoginViewControllerDelegate : NSObject @interface TNTLoginViewController : UIViewController @property

State Preservation for View Controllers with Custom Delegates or Data Sources

倾然丶 夕夏残阳落幕 提交于 2019-12-03 15:15:32
I am attempting to use iOS 6+ (my app is 7.0+) State Preservation to preserve a view that is presented modally from another View Controller. As such it, has the typical modal view controller dismissal pattern: TNTLoginViewController.h contains @protocol TNTLoginViewControllerDelegate <NSObject> - (void)TNTLoginViewControllerDismiss:(TNTLoginViewController *)controller; @end @interface TNTLoginViewControllerDelegate : NSObject @interface TNTLoginViewController : UIViewController @property (weak, nonatomic) IBOutlet id <TNTLoginViewControllerDelegate> delegate; - (IBAction)getStarted:(id)sender;

iOS preserve state of UIWebView?

試著忘記壹切 提交于 2019-12-03 08:27:38
Is it possible to preserve the state of the UIWebView (e.g the current webpage, back/front list) in the current app launch ? For example, if I dealloc a webview, and at some point in the future, I want to recreate it - is it possible to give it the prior state? codercat Good Approach In iOS 6 and later, if you assign a value to this view’s restorationIdentifier property, it attempts to preserve its URL history, the scaling and scrolling positions for each page, and information about which page is currently being viewed. During restoration, the view restores these values so that the web content