Ariel
Ariel

Reputation: 251

How to mimic the behavior of the iPhone Mail app when entering email addresses?

I was wondering whether any of you may have an idea how to mimic the behavior of the native Mail app on the iPhone, when selecting email contacts in the To/CC lines.
If you note carefully, when touching that line the keyboard opens and you get a cursor, which is like the normal behavior of a UITextField. However, after keying a name and selecting it, the name is added inside a blue bubble. Still fine - one could create the bubble and move the text field. However, if you go back using the backspace key - the blue bubble becomes marked (darker blue), the cursor disappears, but the keyboard stays visible.
Any idea how to accomplish that?

Thanks!
Ariel

Upvotes: 2

Views: 648

Answers (1)

Paul Wheeler
Paul Wheeler

Reputation: 20162

Check out the Three20 control library from the Facebook: https://github.com/facebook/three20

Either the TTMessageController, or the TTPickerTextField control are what you want. For using TTPickerTextField there's a good demo here: https://github.com/shayne/TTPickerTextFieldDemo

Upvotes: 1

Related Questions