UIImageView显示在导航栏前面?
有什么办法可以在导航栏前面显示图像吗?
我知道这有点混乱 - 但这只是一个美学问题。图像视图比视图占据更多的高度,因此需要与导航栏稍微重叠。
这有可能吗?一定是的。 :)
谢谢
Is there any way to display an image infront of the navigation bar?
I know this is a little bit messy - but its just an asthetic thing. The imageview takes up more height than the view and therefore needs to overlap the navigation bar a little bit.
Is this possible at all? It must be. :)
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您的内容足够大,需要导航栏所在的空间,但仍然需要导航栏存在,那么将其设为透明怎么样? (例如,请参阅内置的“照片”应用程序。)
但是,一般来说,UIKit 视图不会剪辑其内容。因此,如果您的视图在其边界之外绘制,则该视图将分层到其下方的任何视图上。
If your content is big enough that you need the space where the nav bar is, but you still need the nav bar to be present, how about making it transparent? (See, for example, the built-in Photos app.)
But, in general, UIKit views don't clip their contents. So if your view draws outside of its bounds, that will layer on to of whatever views are below it.
当然,只需将图像放在导航控制器视图顶部的视图上,您就可以将其放在任何您喜欢的位置。然而,它可能在美学上令人不快,并且很可能会受到苹果人机界面指南的反对。
sure, just have the image on a view that is on top of the navigation controller view and you can put it wherever you like. It is however probably aesthetically unpleasing, and more likely than not frowned upon by the Apple Human Interface Guidelines.