4
我在iOS 5中使用新外观代理来为我的UINavigationBar添加背景图像。iOS5 UINavigationBar显示提示时出现背景图像问题
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"ZSNavigationBG.png"] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"ZSNavigationLandscapeBG.png"] forBarMetrics:UIBarMetricsLandscapePhone];
这工作正常,但我需要设置导航栏的提示属性。当我这样做时,导航栏的高度会增加,并且我的背景图片不再垂直填充导航栏,因此看起来非常糟糕。
如何在使用自定义背景图像时使用提示来解释高度变化?
可拉伸图像方法已被弃用。使用[resizeable image](http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImage_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006890-CH3-SW50) 。 – 2012-12-03 23:10:56