iOS-iphone自定义状态栏
来源:网络 责任编辑:admin 发表时间:2013-07-01 11:30 点击:次
	   
	
	  
	  
	  -(void)setRefreshWindow{
CGRect frame = CGRectMake(0.0, 0.0, 320.0, 20.0);
statusbarWindow = [[UIWindow alloc] initWithFrame:frame];
[statusbarWindow setBackgroundColor:[UIColor clearColor]];
[statusbarWindow setWindowLevel:UIWindowLevelStatusBar+1.0f];
   
// 添加自定义子视图
UIImageView *customView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 0, 120, 18)];
customView.image=[UIImage imageNamed:@"数据刷新栏.png"];
   
// UILabel *label=[[UILabel alloc] initWithFrame:CGRectMake(100, 0, 100, 20)];
// // label.backgroundColor=[UIColor clearColor];
// label.text=@"数据正在刷新";
// [customView addSubview:label];
[statusbarWindow addSubview:customView];
[statusbarWindow makeKeyAndVisible];
}
摘自 shijiucdy的专栏
	CGRect frame = CGRectMake(0.0, 0.0, 320.0, 20.0);
statusbarWindow = [[UIWindow alloc] initWithFrame:frame];
[statusbarWindow setBackgroundColor:[UIColor clearColor]];
[statusbarWindow setWindowLevel:UIWindowLevelStatusBar+1.0f];
// 添加自定义子视图
UIImageView *customView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 0, 120, 18)];
customView.image=[UIImage imageNamed:@"数据刷新栏.png"];
// UILabel *label=[[UILabel alloc] initWithFrame:CGRectMake(100, 0, 100, 20)];
// // label.backgroundColor=[UIColor clearColor];
// label.text=@"数据正在刷新";
// [customView addSubview:label];
[statusbarWindow addSubview:customView];
[statusbarWindow makeKeyAndVisible];
}
摘自 shijiucdy的专栏
相关新闻>>
- 发表评论
- 
				
- 最新评论 进入详细评论页>>









![[iPhone中级]iPhone团购信息客户端的开发 (二)](/uploads/allimg/131022/200H11235-0-lp.png)
