2

Small title enter image description here

Large Title enter image description here

I wanna make a navigation bar behave like the NEWS App of Apple. I know how to make large title of the bar. But I have no idea for the right navigation bar item. Please give me some advices.

Is there any delegate to know the large title is appearing? How to add a bar item next to the large title but disappear when it turns back to small? (Something just like APP Store "APP" tab's navigation bar)

KTang
  • 340
  • 1
  • 17

1 Answers1

4

In iOS 11, a new property has been added to UINavigationBari.e. prefersLargeTitles

Just add, following line in viewDidLoad()

navigationController?.navigationBar.prefersLargeTitles = true

Or you can set it to true in Interface Builder as well.

NOTE : In some cases it is not working if you set it from IB.

Arpit Jain
  • 1,660
  • 12
  • 23