for循环创建button
for (int i = 0; i < 9; i++)
{
int a = i/4; //取余
int b = i%4; //取整
UIButton *tagButton = [[UIButton alloc] initWithFrame:CGRectMake(20+(10+(kScreenWidth-6)/5)*b, 90+(20+10)*a, (kScreenWidth-6)/5, 20)];
tagButton.layer.borderColor = MyHexColor(@"ee2266").CGColor;
tagButton.layer.borderWidth = 1;
tagButton.layer.cornerRadius = 5;
tagButton.tag = i;
tagButton.titleLabel.font = [UIFont systemFontOfSize:12];
[tagButton setTitle:_buttonArray[i] forState:UIControlStateNormal];
[tagButton setTitleColor:MyHexColor(@"ee2266") forState:UIControlStateNormal];
[tagButton addTarget:self action:@selector(tagButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:tagButton];
}