ios电池条背景色
作者:
只因为趁年轻 | 来源:发表于
2017-09-04 10:02 被阅读18次

设置背景色
设置状态栏颜色
- (void)setStatusBarBackgroundColor:(UIColor*)color {
UIView*statusBar = [[[UIApplicationsharedApplication]valueForKey:@"statusBarWindow"]valueForKey:@"statusBar"];
if([statusBarrespondsToSelector:@selector(setBackgroundColor:)]) {
statusBar.backgroundColor= color;
}
}
背景色渐变
- (void)scrollViewDidScroll:(UIScrollView*)scrollView{
CGPointoffset = scrollView.contentOffset;
[selfsetStatusBarBackgroundColor:[UIColorcolorWithRed:0.24fgreen:0.53fblue:0.97falpha:offset.y/200.f]];
}
本文标题:ios电池条背景色
本文链接:https://www.haomeiwen.com/subject/kjwsjxtx.html
网友评论