Search code examples
iosswiftuinavigationbar

UINavigationBar Scrolling behaviour is not working properly


UINavigationBar scrolling appearance behaviour is not working properly in one screen where i use UITableView within UIStackView. In other screens where Only UITableView used there Scrolling behaviour is working properly and underLine separator is visible.

  • Without UIStackView, where navigationBar working properly

Screen's visible design in the Device.

WithouUIStackView

StoryBoard UI of above screenshot, Games Screen.

UIStoryBoard

As above ScreenShot when we scroll to Top Edge, there's a visible underline to the NavigationBar.

  • UITableView within UIStackView, where I'm getting issue

StoryBoard Interface

LibraryVC StoryBoard

When i set UIStackView.top = superview.top

Transparent Nav

When i set UIStackView.top = safeArea.top

Hard white Nav

  • I've applied multiple solutions from Various source, but none of Any is working for me.

Also tried below solutions.

  1. tab navigation bar changes after upgrading to xcode 13 ios 15
  2. iOS 15 Navigation Bar Transparent
  3. Navigation bar is transparent when scrolling starts in iOS15 only
  4. Transparent iOS navigation bar
  5. iOS 15 Navigation Bar Transparent issue

Solution

  • I've resolved the issue by changing order of the controls stack, just putted UITableView outSide of the UIStackView and it's working perfectly as expected.

    • UIStoryBoard

    StoryBoard

    • Layout visibility

    Visible Layout