Created
July 12, 2015 01:38
-
-
Save GE-N/59cf9bd622b047dade5e to your computer and use it in GitHub Desktop.
Hidden UITextfield's blink cursor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Disable blink caret inspired from Joseph Chiu's answer on | |
// http://stackoverflow.com/questions/3699727/hide-the-cursor-of-an-uitextfield | |
extension UITextField { | |
public override func caretRectForPosition(position: UITextPosition!) -> CGRect { | |
if <# condition for hidden blink #> { | |
return CGRectZero | |
} | |
return super.caretRectForPosition(position) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment