CosmicMind/Material SideMenu, how to change viewController?

╄→гoц情女王★ 提交于 2019-12-23 05:19:30

问题


I am using CosmicMind/Material with a SideMenu, like in this example: here, but I can not figure out how to change (load) another view controller when I push a cell of the Menu.

To illustrate, in the example Material/Example/App, I would like to click on "inbox" and load the InboxViewController.


回答1:


To change the mainViewController area of the SideNavigationViewController, use the

transitionFromMainViewController

method.

You would also need a reference to the SideNav... and to get one from any UIViewController, you can use the Optional property

sideNavigationViewController?.transitionFromMainViewController(InboxViewController())

That's all it takes.



来源:https://stackoverflow.com/questions/35613050/cosmicmind-material-sidemenu-how-to-change-viewcontroller

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