Change color of cursor in UITextField

Viewed 42767

How can I change the color of the cursor in my UITextField?

6 Answers

To change the cursor color throughout the app for UITextField/UITextView, appearance proxy can also be used as below,

UITextField.appearance().tintColor = .green
UITextView.appearance().tintColor  = .green
Related