Hide blinking caret
suggest changeTo hide the blinking caret, override caretRectForPosition in a UITextField subclass and return CGRectZero. The field can still be edited. The insertion point is hidden, not removed.
Swift 3
override func caretRect(for position: UITextPosition) -> CGRect {
return CGRect.zero
}
Objective-C
- (CGRect) caretRectForPosition:(UITextPosition*) position{
return CGRectZero;
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents