Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextField keyboard: enable done button when no text is entered

I have a UITextField in my app. When the user selects it, a keyboard is presented with a done button. The keyboard is dismissed by pressing the done button. But the done button is only enabled after the user has entered text. I want the user to have the option of dismissing the keyboard without entering text. Is it possible to enable the done button before text has been entered?

like image 462
Darren Avatar asked Dec 27 '22 07:12

Darren


1 Answers

OK, I discovered this is resolved by unchecking the Auto-enable Return Key property in the Attributes Inspector.

like image 84
Darren Avatar answered Mar 15 '23 22:03

Darren