多个UIButton并列排放时,经常会用到Button点击后文字放大的情况。
- (void)dealButton:(UIButton *)button
{
for(int i =0;i < 8; i++)
{
UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
button1 = _arrayM[i];
NSLog(@"%@",_arrayM[i]);
if(button.tag == i)
{
button1.titleLabel.font = [UIFont systemFontOfSize:21];
[button1 setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
}
else
{
button1.titleLabel.font = [UIFont systemFontOfSize:19];
[button1 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
}
}
}