Support for changing Y position of popupBar #429
-
Hello, I am an iOS Development student and absolutely love your repo -- I have implemented it in my personal graduation project and it works great. There are several view controllers in my app where I have functions to make the view appear full screen when the user scrolls. However, this creates a bug with my popupBar, as it does not scroll with it, as seen in this video The normal tab bar is being handled in this function, and called on scrollViewDidScroll:
I have tried several ways to get the popupBar to work in a similar function, but do not seem to have enough experience to make it work. When swapping tabBarController.tabBar for .popupBar, I get an error that popupBar doesn't conform to UIView(). I would love some feedback on how to solve this issue so that my project can continue functioning correctly. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hello, As stated here: Direct manipulation of tab bars is not supported (and discouraged by Apple). It’s not a good idea touching the tab bar like that. |
Beta Was this translation helpful? Give feedback.
-
https://developer.apple.com/documentation/uikit/uitabbarcontroller/1621174-tabbar?language=objc
|
Beta Was this translation helpful? Give feedback.
-
What about trying to dismiss and represent the popup bar with the view controller itself when hiding the tab bar? |
Beta Was this translation helpful? Give feedback.
-
Won’t work, because the system queries the controller for the tab bar frame. The tab bar controller is not aware of the user frame changes and returns the expected tab bar frame. |
Beta Was this translation helpful? Give feedback.
-
What might be possible, is overriding the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the replies @LeoNatan and @iDevelopper . Sorry for the late reply, this is my first discussion on GitHub and I guess my email notifications aren't on! I was unaware of the Apple documentation in regards to manipulation of the tab bar, and that is good to know, so thank you for bringing that to my attention and pointing it out in your repo notes. I will look into the defaultFrameForBottomDockingView method that you are referring to, as I have not heard of that either. Even though it is discouraged by Apple, I am still interested in finding a solution because it's just a fun graduation project and I think that this unique UI experience stands out. Thank you both! I may come back to the discussion with more information but I understand that the pop-up bar is behaving correctly and therefore doesn't warrant any assistance. |
Beta Was this translation helpful? Give feedback.
https://developer.apple.com/documentation/uikit/uitabbarcontroller/1621174-tabbar?language=objc