Simply subclass UITextField and override caretRectForPosition

(继承 UITextField 并且重写 [UITextField caretRectForPosition] 方法)

- (CGRect)caretRectForPosition:(UITextPosition *)position
{
    return CGRectZero;
}

补充于  2014年06月18日15:29:23

设置 UITextField 的 TintColor 可以改变光变的颜色。可以尝试让光标颜色为 clearColor 或者与背景色一致。

相关文章:

  • 2022-03-05
  • 2022-12-23
  • 2021-11-13
  • 2021-11-30
  • 2022-01-16
  • 2021-11-19
  • 2021-09-19
猜你喜欢
  • 2022-12-23
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2022-03-10
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案