我正在使用自定義圖像設計我的UINavigationController,但是,在Popover中這看起來相當糟糕,有沒有一種方法可以做到這一點,僅用於導航控制器,它不是在popover?在iOS 5中的樣式:UINavigationController *除非在PopOver中
我目前做這在我的AppDelegate.m
:
- (void)applyCustomStyling{
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"TitleBar.png"] forBarMetrics:UIBarMetricsDefault];
[[UIToolbar appearance] setBackgroundImage:[UIImage imageNamed:@"TitleBar.png"] forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault];
}
所以,如果你不相信,這很糟糕:
http://i.minus.com/joDeixTP7XLpl.png
這是應該的(UIPopover默認):
http://i.minus.com/i97ORJTj5pjZK.png
可能重複[UIAppearance刪除了UIPopoverController自定義的NavBar背景](http://stackoverflow.com/questions/11334062/ uiappearance-remove-custom-navbar-background-for-uipopovercontroller) – Besi 2012-08-22 18:20:49