Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Restoring view controllers in a paged UI
- (void)encodeRestorableStateWithCoder:(NSCoder *)coder {
[super encodeRestorableStateWithCoder:coder];
[coder encodeObject:self.firstViewController forKey:@"viewController1"];
[coder encodeObject:self.secondViewController forKey:@"viewController2"];
- (void)decodeRestorableStateWithCoder:(NSCoder *)coder {
[super decodeRestorableStateWithCoder:coder];
self.firstViewController = [coder decodeObjectForKey:@"viewController1"];
self.secondViewController = [coder decodeObjectForKey:@"viewController2"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.