UINavigation Controller Root View Change

我们两清 提交于 2019-12-10 16:36:36

问题


I recently encountered a small problem with Storyboards. I have a UINavigationController than has a relationship with the MainView RootViewController(This one has all the buttons leading to the rest of my app). However, I tried to change the RootViewController so that I could enable persistent login rather than a UIWebview Login. When I made the new Logon Form ViewController as the Root, the buttons on my MainView simply stop working.

I also have set the UINavigationController as the initial View Controller. Any ideas on what has to be done here?

I do know that I can simply have the logon screen in the storyboard and call it programmatically, set it to advance on a boolean condition(loginDidSucceed). However, I am confused on why this behavior happens in StoryBoard.

Solution Referred from: Present Splash/Login ViewController With StoryBoard

Thanks for the Help and Effort!


回答1:


I think the principal problem here is that the target of your butttons is the old view controller instance; when it goes out of scope their target no longer exists.



来源:https://stackoverflow.com/questions/11691259/uinavigation-controller-root-view-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!