向导航栏添加标题和副标题,类似于IOS 11中的Apple Music [英] Add title and subtitle to navigation bar similar to Apple Music in IOS 11

查看:219
本文介绍了向导航栏添加标题和副标题,类似于IOS 11中的Apple Music的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个IOS 11问题.我不确定我们是否可以谈论这个问题,因为iOS是beta版.

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

但是我在看Apple Music中的这个导航栏:

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

我知道他们用IOS 11引入了大标题:

I know they introduced large titles with IOS 11:

navigationController?.navigationBar.prefersLargeTitles = true

为您"文本看起来像标题,但是它们如何添加日期?这是API吗?

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

起初,我认为这是prompt属性,但是该属性将文本设置在中间和顶部.

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

我想知道这是否是一些特殊的IOS 11 API,或者他们只是使用了带有两个标签的视图.

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

推荐答案

根据 WWDC 2017会话301-在10:30左右推出新的App Store ,就在显示今天"交互时,它只是集合视图的部分标题,而不是UINavigationBar的一部分(空无一人).同样,这是针对AppStore的,但看起来它与Music的UI相同.

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.

关于重新创建UI的另一有趣读物:

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

这篇关于向导航栏添加标题和副标题,类似于IOS 11中的Apple Music的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆