Change UITextField and UITextView Cursor / Caret Color

前端 未结 16 2032
醉话见心
醉话见心 2020-12-07 09:33

I\'m wondering about changing the color of the cursor / caret in a UITextField (And UITextView if its the same answer) in iOS. I\'ve seen answers f

16条回答
  •  -上瘾入骨i
    2020-12-07 09:43

    yourTextField.tintColor = [UIColor whiteColor];
    

    It works if you set it in code, 'cos somehow color trigger doesn't do it in the Interface Builder (Xcode 6.1.1). It suited well without a need to change any appearance proxy.

提交回复
热议问题