Skip to content

Instantly share code, notes, and snippets.

@prat14k
Forked from mjjimenez/remove_cursor.m
Created January 15, 2018 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prat14k/063b70c4ed66c85f430b03218c10013a to your computer and use it in GitHub Desktop.
Save prat14k/063b70c4ed66c85f430b03218c10013a to your computer and use it in GitHub Desktop.
Remove cursor from UITextField
//Subclass UITextfield and Override the - (CGRect)caretRectForPosition:(UITextPosition *)position //method and return CGRectZero.
- (CGRect)caretRectForPosition:(UITextPosition *)position {
return CGRectZero;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment