开发者

Transparent UIView like photo gallery app in iphone

The default camera app has a photo gallery which has glossy and transparent look, especially the toolbar. One can see the image partially behind开发者_C百科 the toolbar. How is this achieved? Is it just by altering the opaque property of UIView? Any pointers are much appreciated.


Just change the style of the status bar and the navigation bar.

-(void)viewWillAppear:(BOOL)animated_
{
   [super viewWillAppear:animated_];
   [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
   [[[self navigationController] navigationBar] setBarStyle:UIBarStyleBlackTranslucent];
   [self setWantsFullScreenLayout:YES];
}

-(void)viewWillDisappear:(BOOL)animated_
{
   [super viewWillDisappear:animated_];
   [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];
   [[[self navigationController] navigationBar] setBarStyle:UIBarStyleDefault];
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜