iPhone-Style Password Inputs with Appcelerator Titanium

By  on  
iPhone Password Mask

Most mobile applications ask you for your credential so that they may verify your account and pull information via an API.  My mobile application is no different.  The problem I ran into was that I couldn't find the method by which to emulate the iPhone's password field behavior.  Luckily a quick search gave me the answer:

// Create the text field
var formElement = Titanium.UI.createTextField({
	value: "",
	width: 100,
	height: "auto",
	hintText: "Password",
	passwordMask: true
});

Setting the passwordMask property to true provides the true iPhone-style password masking that I desired.  Now all but the last letter in the password are properly hidden!

Recent Features

Incredible Demos

  • By
    CSS Counters

    Counters.  They were a staple of the Geocities / early web scene that many of us "older" developers grew up with;  a feature then, the butt of web jokes now.  CSS has implemented its own type of counter, one more sane and straight-forward than the ole...

  • By
    jQuery Random Link Color Animations

    We all know that we can set a link's :hover color, but what if we want to add a bit more dynamism and flair? jQuery allows you to not only animate to a specified color, but also allows you to animate to a random color. The...

Discussion

  1. Good, that was what I search and arrive here ;)

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!