SWRevealViewController
SWRevealViewController copied to clipboard
i cant come back from rear to front
Hello i need some little help.
for example right not im on the one number page or three doesnt matter and i open the reveal view menu then i clicked some cell and i want to open second controller
i want to open with navigation controller for example if i am here home page
when the second page opened the navigation bar back button must be home and when i click the back button then must be return to home page
it has been 3 mounts in swift this is my first project if you help me i'd be very happy
There are a lot of samples here. One of them I wrote:
If you want to come back to Home view controller, you have to push your controller from Home Navigation Controller, right? See LeftMenuTableViewController.swift.
but i have tab bar controller how can i connect between tab bar controller and navigation controller
also thanks for your help i'm waiting from yesterday that someone read anything
i just want to know i have one view controller that name is privacyviewcontroller its not connected with tab bar controller all tab bar controller pages have navigation controller for example right now i'm on home view controller ( home view controller in tab bar controller ) if i open the menu and click privacy cell i want to open privacy view controller with navigation bar and navigation bar must be have back button finally back button must be go to home view controller
revealViewController().revealToggle(animated: true)
let privacyPage = self.mainStoryBoard.instantiateViewController(withIdentifier: "PrivacyPolicyViewController")
let homePage = self.mainStoryBoard.instantiateViewController(withIdentifier: "HomeViewController")
homePage.navigationController?.pushViewController(privacyPage, animated: true)
i tried this
You can have a look here:
https://github.com/iDevelopper/PBRevealViewController/issues/30#issuecomment-318896654
Above code? SWTabNavSwift? If yes, can you upload it with what you tried to do in it?
And what did you try?
If you want a back button you have to push with a navigation controller, for example from front view controller's navigation controller. revealViewController.pushFrontViewController only show the new front view controller and close the menu. Can you upload here a sample?
Yes, I will this week-end, no time now
If you want a back button you must have a navigation controller, and his navigation bar must be visible, not hidden. Also I fixed the constraints for your collection and table view in code as you create them programmatically.
Thank u so much Patrick... u made my day.........i am struggled so much for that issue.......... now solved.........thank u once again...........
Ok, hope it help!
@alkincakiralar1996 can you please me with the same problem that you faced ? as i'm facing this issue too :/
On selecting home from menu list, my tab bar disappears from home screen which was there before selecting and i'm using navigation controller as well. I have the same hierarchy as yours.
if you have any solution to this then plsssss do share with me :)
The code I'm using in didSelectRowAtIndexPath is: if indexPath.row == 1 { let destinationVc = self.storyboard?.instantiateViewController(withIdentifier: "Home") let newFrontVc = UINavigationController.init(rootViewController:destinationVc!) revealViewController.pushFrontViewController(newFrontVc, animated: true) }