Search code examples
iosios11

Add title and subtitle to navigation bar similar to Apple Music in IOS 11


This is an IOS 11 question. I am not sure if we can talk about this, IOS being in beta.

But I was looking at this navigation bar in Apple Music:

enter image description here

I know they introduced large titles with IOS 11:

navigationController?.navigationBar.prefersLargeTitles = true

The "For You" text looks like the title, but how did they add the date ? Is it an API for this ?

At first I thought that is the prompt property, but that sets the text still in the center and on the top.

I wonder if that is some special IOS 11 API or they just used a view with two labels.


Solution

  • According to WWDC 2017 Session 301 - Introducing the New App Store around 10:30, right when the Today interaction is displayed, it's just the section header of the collection view and not part of the UINavigationBar (there is none). Again, this is for the AppStore but It'd appear that's the same UI as Music.

    Another interesting read about recreating the UI: Re-building the new app store app – today view