iOS 设置UITextField的placeholder属性的颜色

NSDictionary *attrDict = @{NSForegroundColorAttributeName : [UIColor redColor]};
    
    NSAttributedString *attrStr = [[NSAttributedString alloc] initWithString:textF.placeholder attributes:attrDict];
    
    [textF setAttributedPlaceholder:attrStr];

 http://www.jianshu.com/p/e5c6c9b455dd

posted on 2015-12-09 18:14  森code  阅读(250)  评论(0编辑  收藏  举报