Is it possible to change the secure password character displayed ?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
You could also just change the font...
If you change the unicode character 'BULLET' (U+2022) you can customise the secret character. There are a lot of free font editor out there. I use this one http://www.cr8software.net/typex.html
To add custom fonts to your project, check out - this link
It's quite easy
Then you don't have to code anything it just works.
Simply, allow Secure property in IB or via program.
Assuming Bobby B is right in that it is impossible to change the secret character,
I hereby present,
with no guarantuee whatsoever and with all warnings that are applicable,
since this is a horrible kludge which will certainly give you headaches at some point,
hoping not to be downvoted too much for it:
Set your
UITextField
's delegate to the class containing this function.Just make sure you have
self.backing
which is a retainedNSString*
. The copy&paste kludge was needed to preserve cursor position.I don't know anything about pasting, this was a wild guess and it works, but you do need to find out if this may lead to some problem in that respect. I tested a little and it didn't seem to give any problem.
I don't think that this is possible, and I'm basing that on a lack of documentation found in the docs for UITextInputTraits (specifically for secureTextEntry).
Could be wrong though - interested to hear if someone has done this before.
Good luck!