ilan
ilan

Reputation: 4462

blinking cursor when view controller appears

How to blink the cursor of a textview when the viewController appears?

Upvotes: 4

Views: 1330

Answers (2)

joakim
joakim

Reputation: 4051

What you want is:

textView.becomeFirstResponder()

in viewDidAppear.

In Objective-C, that would be [textView becomeFirstResponder].

Upvotes: 6

nburk
nburk

Reputation: 22731

You need to to put the focus on the textview by assigning it the first responder:

textView.becomeFirstResponder();

you can call this in viewDidLoad or viewWillAppear

Upvotes: 3

Related Questions