Darren
Darren

Reputation: 10129

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?

Upvotes: 4

Views: 2288

Answers (1)

Darren
Darren

Reputation: 10129

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

Upvotes: 10

Related Questions