ios修改textField的placeholder的字體顏色、大小

textField.placeholder = @"username is in here!";  
[textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];  
[textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"]; 

這裏是使用了KVC的方式,是否是很簡單.spa

相關文章
相關標籤/搜索