There’s a sneaky little, well hidden fact about how differently typed fields act on iOS.
If you’ve been using the web framework for a little while, you’ve probably noticed that the TextField control has a Type property which lets you choose between:
- E-Mail Address
- Telephone Number
The thing that most people don’t know is that choosing a different type changes how iOS devices present their input interface. Normal and Password are pretty straightforward in that you get a QWERTY keyboard and if it’s a password field, your entry changes to those little security dots. The other four actually change the appearance of the keyboard.
- Email provides you with a keyboard that shrinks the spacebar and adds a @ and a period to the main layout.
- The number field shows the secondary keyboard with the numbers showing first.
- Telephone shows a keyboard with only numbers 0-9 and a key for accessing + * and # (and a backspace key)
- URL removes the spacebar and adds a slash /, period . and a key for entering TLDs (.com is the default, but you can touch and hold your finger to get a list of common ones).