tôi có mã như vậy:UIToolbar tintColor và barTintColor hành
UIView *colorView = [[UIView alloc] init];
colorView.frame = CGRectMake(0.0, 0.0, self.view.frame.size.width, 64.0);
colorView.backgroundColor = [UIColor blackColor];
//colorView.tintColor = [UIColor blackColor];
UIToolbar *toolbar = [[UIToolbar alloc] init];
toolbar.frame = CGRectMake(0.0, 0.0, self.view.frame.size.width, 44.0);
self.view addSubview:colorView];
[self.view addSubview:toolbar];
Tại sao thanh công cụ subview có một màu khác nhau sau đó quan điểm của tôi? Chế độ xem xuất hiện màu đen và thanh công cụ xuất hiện màu xám nhạt? Có mờ hay gì đó gây ra điều này?
Tôi muốn tạo thanh công cụ chiều cao 64.0 có cùng màu tintColor làm thanh điều hướng của tôi. – cdub
điều gì với -1s? – cdub
Theo mặc định, '-barStyle' cho' UIToolBar' là 'Translucent light' trong' iOS7'. Bạn có thể thay đổi nó thành 'Translucent dark'. – Bhavin