Hi friends,
Any Suggestion how can the pop up be shown in all views when used with sidebar menu like SWRevealController so that pop up can be shown in every view rear, front and right view.
override func viewDidLoad() {
super.viewDidLoad()
self.revealButtonItem.target = self.revealViewController()
self.revealButtonItem.action = #selector(PBRevealViewController.revealLeftView)
popContentVC = self.storyboard?.instantiateViewController(withIdentifier: "PopupContentViewController") as! PopupContentViewController
self.revealViewController()?.presentPopupBar(withContentViewController: popContentVC, animated: true, completion: {
popContentVC.popupItem.image = #imageLiteral(resourceName: "genre1")
popContentVC.popupItem.title = "Title"
popContentVC.popupItem.subtitle = "Subtitle"
})
}
Thank you so much.. @iDevelopper @LeoNatan for wonderful libraries..
Hi, @iDevelopper @LeoNatan,
i managed to show the LNPopup bar to everyview as shown in above code in Revelmenu. The popup bar shows correctly but, when i switched to other view from left menu, then the button in the bar action does not work in popup bar. How to get button instance work from every view when moved to all views via left menu. Is it possible?
I have attached the project file where i navigate to new views from left menu. The buttons action only work in main view. How to control button from all views.
Any suggestion?
Thanks
When the main view controller is ProfileVC for example, homeVC is dismissed then the selectors cannot be called. You can save a reference to homeVC for example in the left menu controller.
After that, when the selector is fired when you are in ProfileVC, homeVC has no parent (self.revealViewController is then nil. So you can retrieve the reveal view controller, it is in your case the application's root view controller.
Other solution, you can move the two selectors in the popup view controller. Search '// PB' in the project.
Thank you so much for response @iDevelopper . Grateful.
With pleasure! I think this issue (question) is relative to https://github.com/iDevelopper/PBRevealViewController not here.
Thanks,
Most helpful comment
PBRevealPopupBar.zip