开发者

Gray status bar out UIAlertView style

开发者 https://www.devze.com 2023-01-11 08:04 出处:网络
How can you \"gray out\" (overlay a gray view w/ alpha ontop of the UIStatusBar) on the iOS exactly like when a UIAlertView displays. I know that it\'s possible and that Apple allows it since Twitter

How can you "gray out" (overlay a gray view w/ alpha ontop of the UIStatusBar) on the iOS exactly like when a UIAlertView displays. I know that it's possible and that Apple allows it since Twitter (official Twitter app) and a fe开发者_Go百科w others implement it. I think you need to add a new window ontop of the current window or a full-screen view

Thanks for your input!


UIWindow *grayWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
grayWindow.windowLevel = UIWindowLevelStatusBar + 1.0f;
grayWindow.backgroundColor = [UIColor colorWithWhite:0.0f alpha:0.5f];
grayWindow.hidden = NO;
0

精彩评论

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