edit: to answer the question, although hiding the cursor is easiest by overlaying a UITextField on another UITextField , where the inverse is actually the first responder and the front acts at least to get focus (using -(void)textFieldDidBeginEditing:(UITextField *)textField and focus transfer). IN
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
apply the front-panel replacement to UITextField exactly using something like
front.text = [front.text stringByReplacingCharactersInRange:range withString:string];
This way you are likely to unpack the copy and paste functions. Also, be very careful what you do in these delegate functions. Expect the unexpected.
My initial answer equally applicable:
I don't know what “enhanced security” would mean in this context, but look
change password symbol in uitextfield
To further destroy the user interface and possibly add additional “security”, you could:
- disable backspace functionality by returning
NO if [string length] == 0 - add
1+(arc4rand()%4) characters for each character entered (as seen from some window systems) - add random characters instead of a placeholder constant character
but I have to say that I really do not see the point in this.
source share