【发布时间】:2015-04-03 08:07:27
【问题描述】:
当我的应用程序上的按钮被按下时,我的代码会向上计数,但我还想在点击按钮后更改按钮的背景颜色。
我可以简单地在下面的代码中添加backgroundColor 吗?
- (IBAction)buttonPressed {
count++;
totalLabel.text = [NSString stringWithFormat:@"Hours\n%li",(long)count];
}
@end
【问题讨论】:
标签: ios button background background-color