I have two views in my Xcode Storyboard:
Login Screen -> UITableView
Is it possible to launch my app so that the UITableView is the first screen to display, and have an unwind segue that will take the user back to the Login Screen?
I am currently able to set the self.window.rootViewController
in the App Delegate to set the first screen, but none of the unwind segues work.
Here's How I Got it to Work I had to make sure my Login Screen had a Navigation Controller, then in the .m file for the Login Screen I used this code:
SecondViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"SecondViewControllerStoryboardId"];
[self.navigationController pushViewController:vc animated:NO];
无需将第二个视图显式设置为rootViewController,只需将其从第一个视图的viewDidload方法中推送,然后尝试展开搜索即可。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.