密码textfield占位符ios的自定义字体

时间:2015-05-25 06:53:25

标签: fonts passwords textfield placeholder

我想为密码textfield ios设置自定义字体。谢谢你。

1 个答案:

答案 0 :(得分:0)

- (void)drawPlaceholderInRect:(CGRect)rect {
    [self.placeholder drawInRect:rect withAttributes:@{NSFontAttributeName: [UIFont fontWithName:@"MyriadPro-Bold" size:15.0], NSForegroundColorAttributeName: self.textColor}];
}