Skip to main content
Inspiring
October 17, 2011
Question

iOS Virtual Keyboard "Done" button for multiline TextFields

  • October 17, 2011
  • 2 replies
  • 2799 views

How do I get multiline textfields to display the standard iOS controls with the "done" button so that users wont be stuck after selecting the textfield? My app requires there to be multiline textfields for editing stuff.

I have made a custom control to close the keyboard which works, but it is kind of tacky, and I dont know if it is in line with the Human Interface Guidelines. I would prefer to do it the proper way rather than risk my app being rejected for this.

This topic has been closed for replies.

2 replies

Nimisha1
Participating Frequently
October 18, 2011

Hi

AIR doesn't have any API to display the "done" button and same is the behavior on native iOS apps as UITextView

( the ios multiline textfield)does not have any methods which will be called when the user hits the return key .

Thanks,

Nimisha

FLAdudeAuthor
Inspiring
October 18, 2011

Thanks for your replies, Tenchy, Nimisha.

Well the "done" button is somthing I have seen on Safari and such when selectign a TextArea. I was under the impression it was a standard system control, but according to Nimisha it isn't. So then I guess apps that have such controls are all custom controls? My custom button should hopefully be fine in that case...

And I don't need to have methods called when a return or done key is pressed, I just need people to be able to close the virtual keyboard after they are done editing the TextArea.

Participating Frequently
October 19, 2011

You should set stage.focus = null in your code.

-Sanika

Inspiring
October 18, 2011

Many apps gets rejected more than once. It's no problem, just fix it and reupload it again... no worries. I have a friend who had his app rejected 15 times before they accepted it ... they are so picky.