UIButton *tempBtn = [UIButton buttonWithType: UIButtonTypeCustom];
tempBtn.frame = CGRectMake(, , , ); NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"忘记密码"];
NSRange strRange = {,[str length]};
[str addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:strRange];
[tempBtn setAttributedTitle:str forState:UIControlStateNormal]; tempBtn.titleLabel.textColor = [UIColor blueColor];
[self.view addSubview: tempBtn];
04-26 15:37