标签:
for (int i = 0; i < 4; i++) {
int a = 50 + i % 3 * 60 + i % 3 * 20;
int b = 50 + i / 3 * 60 + i / 3 * 20;
UIButton * bun = [UIButton buttonWithType:UIButtonTypeCustom];
bun.frame = CGRectMake(a, b, 60, 60);
bun.backgroundColor = [UIColor redColor];
[self.view addSubview:bun];
}
标签:
原文地址:http://www.cnblogs.com/hero11223/p/5195932.html