UIViewController lifecycle calls in combination with state restoration
I'm trying to implement state restoration in an app that uses iOS 6+ and storyboards, but I am having problems finding a way to prevent duplicate calls to heavy methods. If I simply start the app, then I need to setup the UI in viewDidLoad : - (void)viewDidLoad { [super viewDidLoad]; [self setupUI]; } This works fine in a normal, non-state-restoration world. Now I've added state restoration and after restoring some properties I need to update the UI with those properties: - (void)decodeRestorableStateWithCoder:(NSCoder *)coder { [super decodeRestorableStateWithCoder:coder]; // restore