如何实现 iOS 自定义状态栏
来源:未知 责任编辑:责任编辑 发表时间:2014-05-26 10:58 点击:次
01 UIWindow * statusWindow = [[UIWindow alloc] initWithFrame:[UIApplication sharedApplication].statusBarFrame];
02 [statusWindow setWindowLevel:UIWindowLevelStatusBar + 1];
03 [statusWindow setBackgroundColor:[UIColor clearColor]];
04
05 UILabel * statusLabel = [[UILabel alloc] initWithFrame:statusWindow.bounds];
06 statusLabel.text = @"RSSI:";
07 statusLabel.textColor = [UIColor blueColor];
08 statusLabel.textAlignment = NSTextAlignmentCenter;
09 statusLabel.backgroundColor = [UIColor blackColor];
10
11 [statusWindow addSubview:statusLabel];
12
13 [statusWindow makeKeyAndVisible];
相关新闻>>
- 发表评论
-
- 最新评论 更多>>
今日头条
更多>>您可能感兴趣的文章
- iPhone开发学习笔记006—— NSNotification自定义通知名
- iphone开发之object c基础一定义接口
- Android:实现TabWidget选项卡按钮在屏幕下方
- ios学习笔记(二)xcode 4.3.2下实现基本交互
- iPhone应用开发之十一:常用的三种动画表现效果
- ios开发问题:添加库和复制其它工程文件编译错误问题
- Memory on the iPhone
- 多线程之NSInvocationOperation
- (iPhone/iPad开发)presentViewController相应方法在SDK5.0前后
- Lexical or Preprocessor Issue 'xxx.h