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