改变UITextField PlaceHolder的字体和颜色,不影响正常输入

话不多说上代码,主要是KVC

labName.text = @"银行卡号";

            textField.placeholder = @"本人的储蓄卡或者借记卡卡号";

           [textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];

            [textField setValue:[UIFont boldSystemFontOfSize:12] forKeyPath:@"_placeholderLabel.font"];

posted on 2015-09-10 13:46  大爱无声  阅读(141)  评论(0编辑  收藏  举报

导航