UIButton *reg = [UIButtonbuttonWithType:UIButtonTypeSystem];
reg.frame = CGRectMake((UISCREEN_WIDTH-280)/2, mainView.frame.size.height-120, 280, 35);
reg.layer.masksToBounds = YES;
reg.layer.borderWidth = 1.0;//设置边框的宽度
reg.layer.borderColor = [[UIColor colorWithRed:21/255.0 green:100/255.0 blue:249/255.0 alpha:1.0]CGColor];//设置边框的颜色
reg.layer.cornerRadius = 5.0;//设置边框的四个角的弧度
[reg setTitle:@"用户授权注册" forState:UIControlStateNormal];
[reg setTitleColor:[UIColorcolorWithRed:21/255.0 green:100/255.0 blue:249/255.0 alpha:1.0] forState:UIControlStateNormal];
reg.tag = 2;
[reg addTarget:self action:@selector(gotoView:) forControlEvents:UIControlEventTouchUpInside];
[mainView addSubview:reg];