如何在 SWRevealViewController 之前设置 Viewcontroller
How to set Viewcontroller before SWRevealViewController
我想在我的 V1 和 V2 控制器之前添加 SWRevealViewController
。我不知道如何启动 reveal-controlle
。我添加了故事板的屏幕截图,因此很容易理解。
关注这个link
http://www.appcoda.com/ios-programming-sidebar-navigation-menu/
按照它说的去做。在你想要滑出菜单的视图控制器中使用这个
[menuBtn addTarget:self.revealViewController action:@selector(revealToggle:) forControlEvents:UIControlEventTouchUpInside];
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
将显示视图控制器设置为初始视图控制器。
首先在任何 class.than 中扩展你的 vc3 在 vc3 中应用故事板标识符名称。
在vc2中编写代码按钮点击动作方法
vc3 *secondViewController =
[self.storyboard instantiateViewControllerWithIdentifier:@"storyboardidentifier name"];
[self presentViewController:second animated:YES completion:NULL];
我想在我的 V1 和 V2 控制器之前添加 SWRevealViewController
。我不知道如何启动 reveal-controlle
。我添加了故事板的屏幕截图,因此很容易理解。
关注这个link
http://www.appcoda.com/ios-programming-sidebar-navigation-menu/
按照它说的去做。在你想要滑出菜单的视图控制器中使用这个
[menuBtn addTarget:self.revealViewController action:@selector(revealToggle:) forControlEvents:UIControlEventTouchUpInside];
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
将显示视图控制器设置为初始视图控制器。
首先在任何 class.than 中扩展你的 vc3 在 vc3 中应用故事板标识符名称。 在vc2中编写代码按钮点击动作方法
vc3 *secondViewController =
[self.storyboard instantiateViewControllerWithIdentifier:@"storyboardidentifier name"];
[self presentViewController:second animated:YES completion:NULL];