2012-01-19 22 views

回答

3

我認爲這是你在找什麼

UITextField *textFieldPassword = [[UITextField alloc] initWithFrame:CGRectMake(120, 90, 150, 30)]; 
textFieldPassword.borderStyle = UITextBorderStyleRoundedRect; 
textFieldPassword.textColor = [UIColor blackColor]; 
textFieldPassword.font = [UIFont systemFontOfSize:12.0]; 
[textFieldPassword setSecureTextEntry:YES]; 
+0

感謝您的回覆,但它給線程 – rani

+0

你可以看到我的代碼一次 textFieldPassword = [[UITextField alloc] initWithFrame:CGRectMake(120,90,150,30)]; textFieldPassword.borderStyle = UITextBorderStyleRoundedRect; textFieldPassword.textColor = [UIColor blackColor]; textFieldPassword.font = [UIFont systemFontOfSize:12.0]; – rani

+0

嗨Rani,在這裏你正在使用UITextField而不是你的問題中提到的UITextView。 – Krrish

3

假設你的UITextField是密碼,而不僅僅是這樣做

[password setSecureTextEntry:YES]; 

希望它能幫助你。

相關問題