Search code examples
iosuibuttonuitabbarcontrolleruitabbaruitabbaritem

How do you keep a UIButton on top (like a z-index) of a UITabBar


I have a UITabBarController with UITabBarItems . I add a button on top of that which works fine until you use bottomBarHide method. Then the button appears underneath the tab bar.

How do I fix this?


Solution

  • bringSubviewToFront should work:

    [parentView bringSubviewToFront:childView];