Simple example
#516
-
It will be great to see some simple example for swift app. Like app consists of 2 View Controllers and Tab bar controller. I read the docs, looked at the examples provided and still struggle to implement it. |
Beta Was this translation helpful? Give feedback.
Answered by
LeoNatan
Sep 20, 2022
Replies: 1 comment 1 reply
-
Hi Victor, //Load the content controller by initializing it, from a storyboard, or any other way
let demoVC = DemoPopupContentViewController()
//Set the popup item, so that content appears on the popup bar:
demoVC.popupItem.title = "Hello World"
demoVC.popupItem.subtitle = "And a subtitle!"
demoVC.popupItem.progress = 0.34
//Present the popup bar from the tab bar controller, with content from the demoVC content view controller:
tabBarController?.presentPopupBar(withContentViewController: demoVC, animated: true, completion: nil) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
LeoNatan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Victor,
Do you mind sharing what you have attempted and failed?
The docs show you exactly what you need to do, in order to display a view controller as the popup content controller from a tab bar controller: