简体   繁体   English

自定义导航栏图像-iOS 7

[英]Custom Navigation Bar image - iOS 7

In iOS 7 , I have used custom navigation bar here . 在iOS 7中,我在这里使用了自定义导航栏。

But the problem is How can I set the image as it is 320*64 but the navigation item iOS is allowing me is 44pixel .. I am able to add the image on navigation controller successfully but don't have any idea about this . 但是问题是如何将图像设置为320 * 64,但iOS允许的导航项是44pixel ..我能够在导航控制器上成功添加图像,但对此一无所知。

在此处输入图片说明

Its because Navigation bar is 44 pixel in height and status bar is 20 pixel in height. 这是因为导航栏的高度为44像素,状态栏的高度为20像素。 In IOS7 the status bar is now transparent, that means the navigation bar behind it shows through. 在IOS7中,状态栏现在是透明的,这意味着其后面的导航栏会显示出来。 In some cases, the background image for a navigation bar can extend up behind the status bar. 在某些情况下,导航栏的背景图像可以在状态栏后面向上延伸。

if you hide status bar in your application you will find that the navigation bar will be smaller in height. 如果您在应用程序中隐藏状态栏,则会发现导航栏的高度会变小。 This question has some nice discussion about this topic. 这个问题对此主题有一些不错的讨论。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM