I have a UITextField and it should still blink with the cursor, even its userInteractionEnabled property is set to NO. I do not want the UITextField to become FirstResponder and show the keyboard.
Now you can ask:
1. If you want to hide the keyboard, why show the cursor?
A: The problem is that I need to show the user that the UITextField is being edited with a different / user keyboard.
2. So why aren't you using the inputView property?
A: Since the keyboard in the inputView appears at the bottom, and I want my custom keyboard to be in the center of the screen.
So open the real question:
How can I show the cursor? Is there any property that I can set? If not, how would I draw a cursor? Creating a UIView that is added and removed using alpha or a subclass of UITextField and overrides drawInRect?
source share