Fast decision.
You can set the cursor padding by subclassing the UITextfield class and implementing these two methods.
Hope this helps someone in need.
override func textRect(forBounds bounds: CGRect) -> CGRect { return bounds.inset(by: UIEdgeInsets.init(top: 4, left: 40, bottom: 1, right: 15)) } override func editingRect(forBounds bounds: CGRect) -> CGRect { return bounds.inset(by: UIEdgeInsets.init(top: 4, left: 40, bottom: 1, right: 15)) }
Vision Mkhabela Mar 27 '19 at 13:39 2019-03-27 13:39
source share