UIButton *configureBT = [[UIButton alloc]initWithFrame:CGRectMake((XJScreenW-100)/2, 100, 80, 30)];
// 设置button的圆角半径,这样按钮就变成了园的
configureBT.layer.cornerRadius = 5;
configureBT.titleLabel.font = [UIFont systemFontOfSize:14];
// 将button上的图片一样变成圆形
[configureBT.layer masksToBounds];
// 添加边框
configureBT.layer.borderWidth = 1;
// 边框颜色 注意要加.CGColor属性
configureBT.layer.borderColor = [UIColor grayColor].CGColor;
[configureBT setBackgroundColor:[UIColor whiteColor]];
[configureBT addTarget:self action:@selector(JumpWifi)forControlEvents:UIControlEventTouchUpInside];
[configureBT setTitle:@"配置WiFi" forState:UIControlStateNormal]; // 正常状态
[configureBT setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];