当前位置: 动力学知识库 > 问答 > 编程问答 >

ios - SWRevealViewController BackButton in each ViewController

问题描述:

I have a question with making SWRevealViewController BackButton.

There has a main LoginViewController.

LoginVC

After I login I have VC_A and VC_B in the menu and each VC all have menuButton on the navigation.

1.

When I transit from VC_A to VC_B, how can I back to VC_A when I tap the BackButton in the VC_B's toolBar?

2.

And I tap on some of the transit Button in VC_B,then goto VC_C(also have menu button,so can't use push method),how can I go back from VCC to where I come from?

VC_C

@IBAction func showVC_CfromVC_B(sender: AnyObject) {

 let storyBoard = UIStoryboard(name: "Main", bundle: nil)

let revealViewController: SWRevealViewController = self.revealViewController()

let vc_c = storyBoard.instantiateViewControllerWithIdentifier("showVC_C") as! UINavigationController

revealViewController.pushFrontViewController(vc_c, animated: false)

}

when I use dismissViewControllerAnimated(),It always back to Login VC,but not last VC,can anyone help me? THANKS!

分享给朋友:
您可能感兴趣的文章:
随机阅读: