Reputation: 1272
Xcode9.2, iOS 11, swift
I'm working on a project where user have to enter some text using Keyboard. User can use English & Japanese keyboard. now, when i start typing using English keyboard it works good no problem at all. but when i change keyboard to Japanese and start entering a same character multiple times. it shows selected text in UITextField
.
here is my UITextField
setup,
self.tf.font = self.font
self.tf.textAlignment = .center
self.tf.returnKeyType = .done
self.tf.inputAccessoryView = nil
self.tf.text = " "
self.tf.tintColor = UIColor.clear
self.tf.textColor = UIColor.darkGray
Upvotes: 0
Views: 1838
Reputation: 18591
To change the text selection color of a UITextField
simply change the tint color property:
textField.tintColor = UIColor.purple
Upvotes: 2