for (int i = 0; i < _imageArr.count; i++) {
_fristnumBtn = [UIButton buttonWithType:UIButtonTypeCustom];
_fristnumBtn.frame = CGRectMake(42*unitPX+i*121*unitPX, 15*unitPX, 30*unitPX, 30*unitPX);
// _fristnumBtn.backgroundColor = [UIColor blackColor];
[_fristnumBtn setImage:[UIImage imageNamed:_imageArr[i]] forState:0];
_fristnumBtn.tag = 500+i;
[_fristnumBtn addTarget:self action:@selector(myPushVC:) forControlEvents:UIControlEventTouchUpInside];
[_bjView addSubview: _fristnumBtn];
}
网友评论