The Large Title UINavigationBar Glitches and How to Fix Them
Adopting it is easy, getting it right is tricky.
This article is originally published at https://swiftsenpai.com on December 14, 2020.
Recently I have been requested by my client to add a large title navigation bar into their app’s main screen, on top of that the large title should automatically collapse when users start scrolling.
I think to myself: how hard could this be? It is just a native iOS component, I should be able to get this done in no time!
Unfortunately, I was wrong.
In this article, I would like to share with you the UI and animation glitches that caught me off guard, and most importantly how I manage to fix them.
Before we get started, There are 2 things you should be aware of:
- The glitches that I am about to show you only happened in a
UIViewController
with a scrollable view (UITableView
,UICollectionView
orUIScrollView
) as a subview. If you are using anUITableViewController
orUICollectionViewController
, you won't have to worry about all these glitches.