码迷,mamicode.com
首页 > 移动开发 > 详细

iOS statusBar 状态栏定制

时间:2016-06-06 17:02:43      阅读:338      评论:0      收藏:0      [点我收藏+]

标签:

 1 UIWindow * statusWindow = [[UIWindow alloc] initWithFrame:[UIApplication sharedApplication].statusBarFrame];  
 2 [statusWindow setWindowLevel:UIWindowLevelStatusBar + 1];  
 3 [statusWindow setBackgroundColor:[UIColor clearColor]];  
 4   
 5 UILabel * statusLabel = [[UILabel alloc] initWithFrame:statusWindow.bounds];  
 6 statusLabel.text = @"RSSI:";  
 7 statusLabel.textColor = [UIColor blueColor];  
 8 statusLabel.textAlignment = NSTextAlignmentCenter;  
 9 statusLabel.backgroundColor = [UIColor redColor];  
10   
11 [statusWindow addSubview:statusLabel];  
12 [statusWindow makeKeyAndVisible];  

 

iOS statusBar 状态栏定制

标签:

原文地址:http://www.cnblogs.com/-Eric-Liu/p/5564120.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!