我已经搜索过,但什么也没有,有人对如何做到这一点有一些想法吗?我不会使用故事板,因为他们使用的是 sourcetree git 和 bitbucket,他们更喜欢 xib 而不是故事板来完成任务,好吧,我被 xib 困住了,欢迎任何帮助
问问题
76 次
1 回答
0
window = UIWindow(frame: UIScreen.mainScreen().bounds)
var mainController = ViewController(nibName:"MainView", bundle:nil)
var menuController = MenuViewController(nibName:"MenuViewController", bundle:nil)
var mainNav = UINavigationController(rootViewController: mainController)
mainNav.navigationBar.barTintColor = UIColor.orangeColor()
mainContainer = MMDrawerController(centerViewController: mainNav, leftDrawerViewController: menuController)
mainContainer!.openDrawerGestureModeMask = MMOpenDrawerGestureMode.PanningCenterView;
mainContainer!.closeDrawerGestureModeMask = MMCloseDrawerGestureMode.PanningCenterView;
mainContainer!.setDrawerVisualStateBlock(MMDrawerVisualState.swingingDoorVisualStateBlock()!)
window?.rootViewController = mainContainer
window?.makeKeyAndVisible()
return true
于 2015-10-28T08:59:50.807 回答