如何增加UINavigationBar的高度? [英] How to increase the height of UINavigationBar?

查看:312
本文介绍了如何增加UINavigationBar的高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单的问题:我如何增加导航栏的高度,以便在 保持模糊的情况下,其他小部件适合

Simple question: How can I increase the height of the navigation bar so that additional widgets will fit in there while keeping the blur?

示例是日历应用程序,其中工作日缩写添加到导航栏的底部...

Examples are the Calendar app where weekday abbreviations are added to the bottom of the navigation bar...

...当您将邮件移动到其他文件夹时,在Mail中:

...and in Mail when you move the mail to a different folder:

推荐答案

https://developer.apple.com/library/prerelease/content/samplecode/NavBar/Introduction/Intro.html

来自ReadMe.md:

From ReadMe.md:


扩展导航栏####此示例演示如何以查看$的方式在导航栏下方放置自定义视图b
$ b

似乎是导航栏本身的一部分。这种技术可以用
来创建类似于iOS日历应用的界面。

Extended Navigation Bar #### This example demonstrates placing a custom view underneath the navigation bar in such a manner that view

appears to be part of the navigation bar itself. This technique may be used to create an interface similar to the iOS Calendar app.

我不谦虚的意见:唐​​' t覆盖 sizeThatFits(_:),不要在导航栏高度上设置约束。从上面的例子中做出错觉。

My not humble opinion: Don't override sizeThatFits(_:), don't set constraints on nav bar height. Just do the illusion from example above.

这篇关于如何增加UINavigationBar的高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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