UIButton *selectButton = [UIButton buttonWithType:UIButtonTypeCustom];
selectButton.frame = CGRectMake(passLabel.frame.origin.x, passLabel.frame.origin.y + passLabel.frame.size.height + 10, 20, 20);
//边框颜色
[selectButton.layer setBorderWidth:1.0];
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGColorRef colorref = CGColorCreate(colorSpace,(CGFloat[]){ 230/255.0, 230/255.0, 230/255.0, 1});
[selectButton.layer setBorderColor:colorref];
//下划线
//下划线
NSMutableAttributedString *content = [[NSMutableAttributedString alloc] initWithString:@"按钮的文字"];
NSRange contentRange = {0,[content length]};
[content addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:contentRange];
passWordButton.titleLabel.attributedText = content;
[self addSubview:selectButton];