向上滚动时隐藏大标题 [英] Hide large title when scrolling up

查看:147
本文介绍了向上滚动时隐藏大标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个嵌入在导航控制器中的普通视图控制器。在这个视图控制器中,我有一个使用安全区域约束的表视图。 (我不使用表视图控制器)

I have a normal view controller that is embedded in a navigation controller. In this view controller, I have a table view that is using the constraints of the safe area. (I don't use a table view controller)

导航控制器设置为首选大标题,模式设置为.always。在测试版2中,这非常有效,所以当我进入标题时,标题很大,当我向下滚动它变得很小时(就像正常情况一样)。但是从beta 3开始,这已不再适用了。

The navigation controller is set to prefer large titles and the mode is set to .always. In beta 2 this worked perfectly, So when I came in the title was large and when I scrolled down it became small (Like the normal one). But since beta 3 this doesn't work anymore.

任何人都知道如何重新打开它,或者如何在我滚动表视图时将其变为现在它将成为小。喜欢所有新iOS 11应用程序的行为?

Anyone know how to turn this back on, or how to make it so when I scroll the table view it will become smaller. Like the behaviour of all the new iOS 11 apps?

或者这是当前版本的swift 4 / iOS 11中的一个错误,但是信使和设置等应用程序仍然以这种方式工作。

Or is this a bug in the current version of swift 4/iOS 11 but the apps like messenger and settings still work this way.

提前致谢。

推荐答案

对我来说,如果你设置布尔值喜欢大标题在故事板中为真,它将保持很大,如果你通过代码打开它按预期工作!

For me, it was that if you set the boolean "Prefers Large Titles" in the storyboard to true it will stay large, if you turn this on by code it works as expected!

这篇关于向上滚动时隐藏大标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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