iOS-iphone自定义状态栏
2016-04-06 15:05
399 查看
-(void)setRefreshWindow{
CGRect frame = CGRectMake(0.0,0.0,
320.0,20.0);
statusbarWindow = [[UIWindow
alloc] initWithFrame:frame];
[statusbarWindowsetBackgroundColor:[UIColorclearColor]];
[statusbarWindowsetWindowLevel:UIWindowLevelStatusBar+1.0f];
//添加自定义子视图
UIImageView *customView = [[UIImageViewalloc]
initWithFrame:CGRectMake(100,0,
120, 18)];
customView.image=[UIImageimageNamed:@"数据刷新栏.png"];
// UILabel *label=[[UILabel alloc] initWithFrame:CGRectMake(100, 0, 100, 20)];
// // label.backgroundColor=[UIColor clearColor];
// label.text=@"数据正在刷新";
// [customView addSubview:label];
[statusbarWindowaddSubview:customView];
[statusbarWindowmakeKeyAndVisible];
}
CGRect frame = CGRectMake(0.0,0.0,
320.0,20.0);
statusbarWindow = [[UIWindow
alloc] initWithFrame:frame];
[statusbarWindowsetBackgroundColor:[UIColorclearColor]];
[statusbarWindowsetWindowLevel:UIWindowLevelStatusBar+1.0f];
//添加自定义子视图
UIImageView *customView = [[UIImageViewalloc]
initWithFrame:CGRectMake(100,0,
120, 18)];
customView.image=[UIImageimageNamed:@"数据刷新栏.png"];
// UILabel *label=[[UILabel alloc] initWithFrame:CGRectMake(100, 0, 100, 20)];
// // label.backgroundColor=[UIColor clearColor];
// label.text=@"数据正在刷新";
// [customView addSubview:label];
[statusbarWindowaddSubview:customView];
[statusbarWindowmakeKeyAndVisible];
}
相关文章推荐
- ios-获取系统相簿里边的所有照片
- iOS-自定义修改拍照界面retake和use按钮
- iOS 8 AutoLayout与Size Class
- iOS开发入门的一些困惑
- 【ios开发学习】Cocoa 新的依赖管理工具:Carthage
- iOS图片旋转问题
- iOS 画平滑曲线的方法及取音频数据的方法
- iOS 数据保存几种方式总结
- iOS开发使用-半透明-模糊效果-方法整理
- 神奇的ios9bug
- 关于这几天使用IOS的ASYNCSOCKET完成无限后台的过程
- iOS项目的完整重命名方法
- ios Block详细用法
- RealReachability的使用心得
- iOS 音频播放,录音,视频播放,拍照,视频录制
- Responder Chain(ios事件传递)
- iOS runTime 机制详解
- iOS日期相关
- iOS开发- 自定义遮罩视图(引导, 功能说明)源码+解析
- iOS 沙盒与文件机制——iOS 编码复习(九)