开发者

Transparent UIView like photo gallery app in iphone

开发者 https://www.devze.com 2022-12-29 17:28 出处:网络
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 ju

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

精彩评论

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