statasbar颜色

来源:互联网 发布:叫号机软件 编辑:程序博客网 时间:2024/04/29 17:02

ios6不能修改用下面这种方法也不行


ios7 


    AppDelegate *delegate = (AppDelegate *)APP_DELEGATE;

    

    UIView *statusBarBackground = [[UIView allocinitWithFrame:CGRectMake(00, delegate.window.bounds.size.width20.0f)];

    statusBarBackground.tag = 1000;

    statusBarBackground.backgroundColor = [UIColor blackColor];

    statusBarBackground.alpha = 1.0;

    statusBarBackground.userInteractionEnabled = NO;

    statusBarBackground.layer.zPosition = 999// Position its layer over all other views

    [delegate.window addSubview:statusBarBackground];


0 0
原创粉丝点击