[英]Swift - Large to Small Title Transition
I'm currently implementing a very simple TableViewController that has a navigation bar. 我目前正在实现一个非常简单的具有导航栏的TableViewController。
I have set the title, turned the navigation bar translucent = true
, and turned PrefersLargeTitles = true
我设置了标题,将导航栏设置为
translucent = true
,并设置了PrefersLargeTitles = true
Large Title is set to Automatic
on the Navigation Item 在导航项上将大标题设置为
Automatic
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. 在表格视图中滚动时,标题从大切换到小,正如我所期望的那样,但是在转换过程中会出现打ic。
When I look at the native settings app on an iPhone, the transition is very smooth from large to small titles, and not here. 当我查看iPhone上的本机设置应用程序时,从大标题到小标题的过渡非常顺畅,而不是在这里。
Is there some setting I am missing to animate / smooth this transition? 我缺少动画/平滑过渡的设置吗?
Thanks a lot 非常感谢
In your viewController set extendedLayoutIncludesOpaqueBars
to true
. 在您的viewController中,将
extendedLayoutIncludesOpaqueBars
设置为true
。 Also set edgesForExtendedLayout = UIRectEdge.all
还要设置
edgesForExtendedLayout = UIRectEdge.all
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.