SwiftUI view in UIHostingVC inside UINavigationController: largeTitle not changing to inline

  Kiến thức lập trình

I have a SwiftUI View, that is a List. Embedded in a UIHostingController, itself embedded in a UINavigationController

When scrolling, there are 2 issues:

  • The title won’t change to inline
  • The background is incorrect, the default UIKit behavior is expected

I basically tried everything I could, even changing the navBar appearance, but I was never able to reach the default (and good) UIKit behavior, which is:

  • Title will switch to inline when scrolling
  • Background of nav bar becomes vibrant

Details:

  • There is NO NavigationView nor NavigationStack in the SwiftUI View.

Any help will be much appreciated :-)!

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT