UIColor colorWithRed:green:blue:alpha: always returns white unless one argument is 0

后端 未结 4 1147
轻奢々
轻奢々 2020-12-03 23:23

I am using

[UIColor colorWithRed:136 green:155 blue:218 alpha:1.0]; 

to change the background color of my table view cells.

But fo

4条回答
  •  情书的邮戳
    2020-12-03 23:27

    Set navigation bar to transparent in iOS 11

    (void)viewDidAppear:(BOOL)animated {
        [super viewDidAppear:animated];
        [self.navigationController.navigationBar setBackgroundImage:[UIImage new]
                                                      forBarMetrics:UIBarMetricsDefault];
        self.navigationController.navigationBar.shadowImage = [UIImage new];
        self.navigationController.navigationBar.translucent = YES;
        self.navigationController.view.backgroundColor = [UIColor clearColor];
        self.navigationController.navigationBar.backgroundColor = [UIColor clearColor];
    }
    

提交回复
热议问题