Skip to content

How to access LNPopupCustomBarHostingController on LNPopupContentHostingController or in rootView #53

Closed Answered by LeoNatan
pareshios asked this question in Q&A
Discussion options

You must be logged in to vote

Since you are working with UIViewControllers, you need to look at the documentation for LNPopupController:

https://github.com/LeoNatan/LNPopupController
https://github.com/LeoNatan/LNPopupController/blob/master/LNPopupController/LNPopupController/UIViewController%2BLNPopupSupport.h

You are mixing UIKit and SwiftUI. You can always cast self.tabBarController?.popupBar to LNPopupCustomBarHostingController, but notice it is a generic class, so figuring out the exact cast is difficult. And what would that help you? Instead, use SwiftUI concepts such as EnvironmentObject to share state between UIKit and SwiftUI.

For example, something like:

self.tabBarController?.popupBar.customBarViewController =

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by LeoNatan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #52 on August 09, 2024 10:36.