UITextview Hide cursor/Change color of cursor

前端 未结 3 921
时光取名叫无心
时光取名叫无心 2021-01-13 20:30

In my application, In UITextview i want to hide cursor.

If this is not possible then I want to change color of cursor.

Can we do this? I have search for it b

3条回答
  •  一生所求
    2021-01-13 21:10

    On iOS 7, you can simply set the tintColor of your text view as the same of its backgroundColor to make the cursor invisible.

    textView.tintColor = textView.backgroundColor;
    

    or you can try:

    textView.tintColor = [UIColor clearColor];
    

提交回复
热议问题