Hello guys,
I'm pretty much new to iOS development. Recently I started using "LNPopupController" (Using swift examples in the repo). Everything works fine but for what ever reason the "Tap" event is not firing on my popupBar, the default drag works fine though!
here's my code that launches the popupBar :
IBAction func showPlayer(_ sender: Any) {
let popupContentController = storyboard?.instantiateViewController(withIdentifier: "PlayerViewController") as! PlayerViewController
popupContentController.popupItem.accessibilityHint = NSLocalizedString("Double Tap to Expand the Mini Player", comment: "")
tabBarController?.popupContentView.popupCloseButton.accessibilityLabel = NSLocalizedString("Dismiss Now Playing Screen", comment: "")
tabBarController?.presentPopupBar(withContentViewController: popupContentController, animated: true, completion: nil)
tabBarController?.popupBar.tintColor = UIColor(white: 55.0 / 255.0, alpha: 1.0)
tabBarController?.popupBar.imageView.layer.cornerRadius = 5
tabBarController?.popupBar.backgroundColor = UIColor.green
tabBarController?.popupBar.popupItem?.title = "Test Music"
}
Am I missing something here ?
Thanks in advance guys :)
I don't see anything inherently wrong in your code.
Does it work as expected in the example project?
In your Swift demo project, it works fine. Is there any other piece of code missing to make it work ? other than the initialisation process ?
My view hierarchy looks like this :
---- TabBarController
-- First View (Where I initiated the Popupbar)
-- Second View
---- PlayerView Controller (Which is referenced in my First View)
I am not sure what is going on.
Could you please set a break point here: https://github.com/LeoNatan/LNPopupController/blob/682470ae8762bcdd26beaaf3783b9fcf2555b208/LNPopupController/LNPopupController/Private/LNPopupController.m#L502
And see if tapping the bar brings you there.
It's weird, tapping on popupBar doesn't hit the break-point. Is there anything I need to check/uncheck on the storyboard side ? and here's my project if you want to take a glance.
I will have a look when I have time.
In your project you add right bar button items to the popupItem (in PlayerViewController), but the images does not exist. After adding the images in the project, all is working and the tap event is firing.
Thanks @iDevelopper for taking a look.
I will keep the issue open until we hear feedback.
Wow! thats all I needed, It works perfectly now 馃憤 As I didn't have any complier error with those missing images, I didn't event relate it with my issue. Anyway Thank you @LeoNatan and @iDevelopper
for your help 馃檹
Great
Most helpful comment
In your project you add right bar button items to the popupItem (in PlayerViewController), but the images does not exist. After adding the images in the project, all is working and the tap event is firing.