hey all
I'm trying to build an app with multiple view controllers and story boards, however when changing controllers my story board clearing all values like if i just launched the app
thats my code to change views is there a way to prevent it from resetting everything every time i switch view controllers?
I'm trying to build an app with multiple view controllers and story boards, however when changing controllers my story board clearing all values like if i just launched the app
thats my code to change views is there a way to prevent it from resetting everything every time i switch view controllers?
Code:
NSString * storyboardName = @"Main";
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle: nil];
UIViewController * vc = [storyboard instantiateViewControllerWithIdentifier:@"MainView"];
[[UIApplication sharedApplication].keyWindow setRootViewController:vc];
[self.view.window.rootViewController presentViewController:vc animated:YES completion:nil];