Lnpopupcontroller: How can I achive this?

Created on 14 Mar 2021  路  23Comments  路  Source: LeoNatan/LNPopupController

Tabbar code.

  let customMapBar = exploreStoryBoard.instantiateViewController(withIdentifier: "PopUpSongsInfo") as? PopUpSongsInfo
        customMapBar?.view.backgroundColor = .clear
        tabBarController?.popupBar.customBarViewController = customMapBar
        tabBarController?.popupContentView.popupCloseButtonStyle = .none
        tabBarController?.popupContentView.isTranslucent = false
        tabBarController?.popupInteractionStyle = .default

        popupContentVC = exploreStoryBoard.instantiateViewController(withIdentifier: "SongsQueueVC") as? SongsQueueVC
        tabBarController?.popupBar.barStyle = .custom
        customMapBar?.lblArtistname.text = "maulik"
        tabBarController?.presentPopupBar(withContentViewController: self.popupContentVC, animated: false, completion: nil)

Push issue.

  1. push from here
    Screenshot 2021-03-14 at 9 45 21 AM

  2. push from open window

Hope you can help me.@leoNatan . if you can help me via Skype then I will share my Skype id.

question

All 23 comments

To configure the properties (popupBar, popupContentView, etc ...), you have to use those of the container which will present the popupBar, tabBarController in your case:

Replace:

popupBar.customBarViewController = customMapBar
popupContentView.popupCloseButtonStyle = .none
popupContentView.backgroundStyle = .regular
popupInteractionStyle = .default

By

tabBarController?.popupBar.customBarViewController = customMapBar
tabBarController?.popupContentView.popupCloseButtonStyle = .none
tabBarController?.popupContentView.backgroundStyle = .regular
tabBarController?.popupInteractionStyle = .default

@iDevelopper already solved from my side.. but I want push how can I do that?

@LeoNatan please help me I spent 3 days for this and client so angry please help me. Just now I have only push issue. How can I push view controller from mini view controller and opened view controller.

When I push it dismiss this controller.

I鈥檓 sorry, I don鈥檛 understand what you want. Slow down and explain in detail what you are trying to do.

When I tap on yellow button how can I push view controller ?

In your bar content controller, listen to the button tap and notify somehow the external controller to push.

can you help me more.. I tired all delegate, Notification Center all not work...

Same thing I want from open view controller.

You just need an IBAction, no ? Or an action method to this button (if programmatically), no?:

https://developer.apple.com/documentation/uikit/uicontrol/1618259-addtarget

@iDevelopper @LeoNatan I already make action it calls the action.. but I don't know how to push from there.. if I set delegate then where to set. every view controller shows that container.so where to set my delegate.

Screenshot 2021-03-14 at 2 08 32 PM

@iDevelopper @LeoNatan Please help me to sort out this issue... I am stuck here.

Find your navigation controller in self.popupPresentationContainer and push.

So, it should look like this:

if let vc = loginStoryBoard.instantiateViewController(withIdentifier: LoginContainerVC.className) as? LoginContainerVC {
    if let tbc = self.popupPresentationContainer as? UITabBarController {
        if let viewController = tbc.selectedViewController as? UIViewController {
            viewController.navigationContontroller?.pushViewController(vc, animated: true)
        }
    }
}

Most likely, the selected view controller is the navigation controller.

@iDevelopper it go to push line but not pushing view controller.

Read my comment above. Anyway, this is not a support forum. Please play around with your code.

@LeoNatan I already tried but it is nil.

@LeoNatan closing Question is not solution please help me I waste 4 days but there is no output please help me.

The issue section is about reporting issues of LNPopupController, not helping you learn how to code. It is clear you don鈥檛 fully understand ios development. Try Stack Overflow.

@LeoNatan Sir I know iOS development I checked all view controller deletgates, tabbar, Notification Center but nothing helps.

@LeoNatan @iDevelopper Thanks for Help ..

This is the final answer.

if let vc = exploreStoryBoard.instantiateViewController(withIdentifier: StartMeditationVC.className) as? StartMeditationVC { if let tbc = self.popupPresentationContainer as? UITabBarController { if let viewController = tbc.selectedViewController as? UINavigationController { viewController.topViewController?.navigationController?.pushViewController(vc, animated: true) } } }

Do not say thank you especially!

Was this page helpful?
0 / 5 - 0 ratings