#define Start_X 10.0f // 第一个按钮的X坐标
#define Start_Y 50.0f // 第一个按钮的Y坐标
#define Width_Space 5.0f // 2个按钮之间的横间距
#define Height_Space 20.0f // 竖间距
#define Button_Height 122.0f // 高
#define Button_Width 75.0f // 宽
-(
void
)addButtonS
{
for
(
int
i = 0 ; i < 6; i++) {
NSInteger index = i % 3;
NSInteger page = i / 3;
UIButton *aBt = [UIButton buttonWithType:UIButtonTypeRoundedRect];
aBt.frame = CGRectMake(index * (Button_Width + Width_Space) + Start_X, page * (Button_Height + Height_Space)+Start_Y, Button_Width, Button_Height);
[self.view addSubview:aBt];
}
}