开发者

Stop UITextField cursor from blinking in iOS

Is there a way to stop the cursor from blinking in a UITextField? I know you can use [UITextField resignFirstResponder] and [UITextField setEnabled:NO], but I'd like to keep the keyboard visible on the screen.

Thanks!

Upd开发者_Python百科ate

To clarify, I have no intention of hiding the cursor while the user is editing the text field, but I want to hide it after the user has hit Done and a progress indicator has appeared above the text field. A blinking cursor seems weird in a view that can't be manipulated with.


You can create an invisible text field and make it the first responder. Once you're done, you can set the first responder back to the original text field and remove the invisible text field.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜