scenee / FloatingPanel

A clean and easy-to-use floating panel UI component for iOS
MIT License
5.6k stars 508 forks source link

UITabBarController #591

Open harjit8016 opened 1 year ago

harjit8016 commented 1 year ago

Not able to add the float view controller on TabBarController

Expected behaviour

This should work on tab bar controller

Actual behaviour:

when add the container to the tab bar view controller getting this error:- eg: playerFloatingContainer.addPanel(toParent: self, animated: true)

"UITabBarController displays child view controllers with a radio-style selection interface"

Steps to reproduce

Code example that reproduces the issue

How do you display panel(s)?

How many panels do you displays?

Environment

Library version

Installation method

iOS version(s)

Xcode version

scenee commented 1 year ago

Unfortunately, it's not possible because UITabBarController recognizes any child view controller as a tab bar content. Alternatively you can add a pane each child view controller of a UITabBarController.

If you display a panel over UITabBarController, you have 2 options.

  1. Present a floating panel as a modality.
  2. Add a pane to the window. See also Samples app > Show Panel over Window