1
如何給風格在Xcode的iOS4.3自定義的TextView作爲密碼如何設置自定義的TextView的texttype在Xcode
如何給風格在Xcode的iOS4.3自定義的TextView作爲密碼如何設置自定義的TextView的texttype在Xcode
我認爲這是你在找什麼
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];
假設你的UITextField是密碼,而不僅僅是這樣做
[password setSecureTextEntry:YES];
希望它能幫助你。
感謝您的回覆,但它給線程 – rani
你可以看到我的代碼一次 textFieldPassword = [[UITextField alloc] initWithFrame:CGRectMake(120,90,150,30)]; textFieldPassword.borderStyle = UITextBorderStyleRoundedRect; textFieldPassword.textColor = [UIColor blackColor]; textFieldPassword.font = [UIFont systemFontOfSize:12.0]; – rani
嗨Rani,在這裏你正在使用UITextField而不是你的問題中提到的UITextView。 – Krrish