Hide blinking caret

suggest change

To 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;
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents