Closed kgirl7 closed 5 years ago
Hi!
The equivalent code for setFrontViewPosition is revealLeftView() or revealRightView(). These functions will reveal the side view (left or right) or hide it if shown.
setMainViewController is for replacing the main view controller.
If you do not have a navigation bar, I think your segue destination is not a navigation controller, please check.
Ok thank you!, I checked and it works with the function revealRightView, showing the Section News View and now appears the navigation bar but when I clicked on the Back Button, returns to the Menu View which is the "pb_left" (covering all the screen) (with the SWRevealViewController send me to the MainViewController) and I want to back to the MainViewController which is the "pb_main". I will add and screenshot to explain me better. Hope you can understand and help me!
My storyboard
If you want to push a controller and come back to the main view controller, you have to push this controller with the navigation controller of the main view controller. That's all. When pushing use also revealLeftView(), so the left menu will be closed when coming back.
Hi! Hope you can help
I have a project with SWRevealViewController and I updated to PBRevealViewController. The menu show sections call from an api, when you click into the option, have to show you the section specific but in the Back button you have to go back to the MainViewcontrollerr and not the menu.
This is part of the code that I want to change:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
The equivalent of these two functions, what is it?
[SWRevealViewController] self.revealViewController().setFrontViewPosition(.rightMost, animated: false) self.revealViewController().setFrontViewPosition(.left, animated: true)
I couldn't find the equivalent .rightMost and .left in the PBRevealViewController
[PBRevealViewController] self.revealViewController()?.setMainViewController(self, animated: true) self.revealViewController()?.setMainViewController(self, animated: true)
Currently the code sends me to the section without navigation bar (does not show the return button)
Hope can you help me!!