Re: Can I Hide / Show an NSTextField / NSSecureTextField in Cocoa?
Re: Can I Hide / Show an NSTextField / NSSecureTextField in Cocoa?
- Subject: Re: Can I Hide / Show an NSTextField / NSSecureTextField in Cocoa?
- From: Kyle Sluder <email@hidden>
- Date: Sat, 08 Feb 2014 09:56:32 -0800
On Feb 8, 2014, at 5:37 AM, David Delmonte <email@hidden> wrote:
>
> I realized I could do this: 1. use just an NSTextField, and 2. if (hiding) textField.stringValue = @"******";
> Is there something I'm missing?
Please don't do this. NSSecureTextFieldCell uses a custom field editor that protects the password from being snarled via Accessibility or event taps.
Also, computer screens are much more likely to be visible to other people than phone screens, and people in general are more confident typists on physical keyboards than on virtual ones. Showing characters as they type is doing a disservice. (In fact, now that AirPlay Mirroring is so prevalent, I've been meaning to file a Radar asking Apple to remove the “show last character typed” feature from UIKit.)
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden