660
技術社區[雲棲]
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的方式,是不是很簡單呢?嗬嗬!
更詳細請參考原文:標哥的技術博客
最後更新:2017-04-03 05:39:38