开发者

Popover color on iPad

I want to show the Popover in its default style (Default Blue). My Top tool bar style is Black translucent, So I need to change the Barstyle of the Rootviewcontroller to black translucent in landscape mode. How can i show the same controller in two modes with two diff styles ?

ie, Want to have to default style at Portrait mode, and Black translucent at Landscape mode.

Tried to change in ViewWillAppear, But cant change it back to default style, as UIBarSt开发者_如何学运维yleDefault sets light gray color and not the default blue.

Thanks for your time.!

Gopi.


Found the Answer. adding a line in split view delegate method, solve this prob.

- (void)splitViewController: (UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {

    [(UINavigationController *)aViewController navigationBar].barStyle = UIBarStyleBlackOpaque;

}

Cheers!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜