Closed JayeshPoriya closed 6 years ago
@JayeshPoriya
you can use FAPanels from a UIViewController but for that you need to understand working of FAPanels.
In your signin view controller, Add these :
let leftMenuVC = LeftViewController(nibName: "LeftViewController", bundle: nil)
let centerVC = HomeViewController(nibName: "HomeViewController", bundle: nil)
let centerNavVC = UINavigationController(rootViewController: centerVC)
let panelVC = FAPanelController()
_ = panelVC.center(centerNavVC)
UIApplication.shared.keyWindow?.rootViewController = panelVC
UIView.transition(from: self.view, to: centerVC.view, duration: 0.5, options: UIViewAnimationOptions.transitionCrossDissolve) { (finished) in _ = panelVC.center(centerNavVC) UIApplication.shared.keyWindow?.rootViewController = panelVC }
Please let me know in case you need any further help. Thanks for using FAPanels 👍
Hi, i'm trying to use FAPanels. i have installed pods and in my root view controller given it class to FAPanelController, and written the code in app delegate as u have said but getting this error "Use of undeclared type 'FAPanelController'".How i can fix this? Another thing is that how can i access the same panel from another view controller? Is this panel will run fine if i want LeftMenu and tab bar in my application?
Import the FAPanles framework in your app delegate class.
You can simply access by panel property of any UIViewController.
i.e : self.panel
@fahidattique55 Thank you for replay! Now it's working.
let panelVC = FAPanelController()
Thanks! This is useful.
Hi, This is not an issue, I need your help.
How can I use FAPanel from another view controller. I don't want to use FAPanel from appDelegate. I have Signin View Controller after successfully signin I want to use FAPanel. I already set root view controller is signin view controller. How can I use FAPanels after user signin? I want to use FAPanel in my signin view controller.
my view controller name is 1) LeftViewController 2) HomeViewController 3) not use right view controller so I passed nill
My Code is which is used in a signin view controller
// let appDelegate = UIApplication.shared.delegate as! AppDelegate
But this code is not working.
Can you please help me!
I face this type of issue as well
Could not cast value of type 'UINavigationController' (0x10b719ed8) to 'appname.FAPanelController' (0x106fc41f8). 2018-03-09 16:05:07.504574+0530 appname[28149:682526] Could not cast value of type 'UINavigationController' (0x10b719ed8) to 'appname.FAPanelController' (0x106fc41f8).