Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a UITextField active on load

I have an app that only has one text field and I want that text field active with the keyboard active when the view loads.

Is there any way to force it?

James

like image 982
Dark Templer Avatar asked Dec 05 '25 00:12

Dark Templer


2 Answers

Make it the first responder. See this link for a tutorial from Apple.

like image 112
jer Avatar answered Dec 07 '25 16:12

jer


Simple

[self.myTextView becomeFirstResponder];
like image 39
Zee Avatar answered Dec 07 '25 16:12

Zee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!