0
我编程方式创建一个按钮,将其添加到UIScrollView中:本身的UIButton颜色变化
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(50, 10, 150, 80);
[button setTitle:@"all" forState:0];
button.titleLabel.font = [UIFont fontWithName:@"Helvetica-Light" size:20];
button.titleLabel.textColor = [UIColor blackColor];
button.layer.backgroundColor = [[UIColor clearColor] CGColor];
[scrolView addSubview:newGuysButon];
当我点击滚动视图,按钮颜色从黑到白的。怎么会发生?
谢谢,它有帮助! – Sergey