2

I'm currently implementing a very simple TableViewController that has a navigation bar.

I have set the title, turned the navigation bar translucent = true , and turned PrefersLargeTitles = true

Large Title is set to Automatic on the Navigation Item

When scrolling in the table view, the title switches from large to small as I would expect, but there is a hiccup in the transition.

When I look at the native settings app on an iPhone, the transition is very smooth from large to small titles, and not here.

Is there some setting I am missing to animate / smooth this transition?

Thanks a lot

5
  • Where are you setting the title on the TableViewController? viewDidLoad or viewWillAppear? Commented Sep 4, 2018 at 18:06
  • @userx viewDidLoad Commented Sep 4, 2018 at 18:20
  • Could you please add image? Commented Sep 4, 2018 at 18:30
  • You may want to try it in viewWillAppear. Commented Sep 4, 2018 at 18:30
  • Could you add a video/animated gif of the transition the way it appears for you? Commented Sep 8, 2019 at 11:03

1 Answer 1

2

In your viewController set extendedLayoutIncludesOpaqueBars to true. Also set edgesForExtendedLayout = UIRectEdge.all

Sign up to request clarification or add additional context in comments.

2 Comments

I tried this originally as it's what Apple suggests doing. However, this doesn't work when you have UITableView inside of a UIViewController
I also added edgesForExtendedLayout = UIRectEdge.all and it worked for my tableView in a UIViewController (all done programmatically). Were you able to get it to work at any point?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.