开发者

Popover color on iPad

开发者 https://www.devze.com 2023-01-19 01:51 出处:网络
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

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

精彩评论

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