Search code examples
iosuitabbarcontrollerviewcontrolleruisplitviewcontroller

UIView automatically moving up when pushed in a SplitviewController from TabbarController


My Single View Application has a TabBar & some Tab contains Splitview. My current scenario is when I pushed a new view controller in my Tab's secondary view controller, it moves up automatically & shows a black bar top of the TabBar. Please take a look at the screenshot below

enter image description here


Solution

  • Select the ViewController you worked on.

    Go to the Attribute Inspector.

    In Attribute Inspector View Controller section

    • Unmark Adjust Scroll View Insets (layout)
    • Checkmark Under Opaque Bars (Extend Edges)

    enter image description here

    Hope it helps.