閱讀660 返回首頁    go 技術社區[雲棲]


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

  上一篇:go HDU1072-Nightmare【廣度優先搜索】
  下一篇:go linux索引節點及值(弄清十分必要)