开发者

changing the colour of Button

开发者 https://www.devze.com 2023-01-07 18:59 出处:网络
how can I 开发者_StackOverflowchange the button colour when ever I click that button please help me outIn the action which is executed, when you click the button just add the following line:

how can I 开发者_StackOverflowchange the button colour when ever I click that button please help me out


In the action which is executed, when you click the button just add the following line:

button.backgroundColor = [UIColor randomColor];

This gives the button a random color everytime you click it. ;-)

0

精彩评论

暂无评论...
验证码 换一张
取 消