2011-08-30 46 views

回答

0

只需設置屬性佔位到@「2011年7月28日4×8卡」,並使用代碼@Akshay

+0

@ Nekto我不是在談論UITextField的PlaceHolder ..但任何方式謝謝你的地方持有人.....我在這裏以這種激情來定製我的UITextField – user891268

1
[textField setBackgroundColor:[UIColor whiteColor]]; 
[textField setBorderStyle:UITextBorderStyleRoundedRect]; 
0

如果您在iOS3.0 +,你可以做一個自定義邊框使用quartzcore:

#import<QuartzCore/QuartzCore.h> 

textfield.borderStyle = UITextBorderStyleNone; 
textfield.layer.cornerRadius = 10.0; //Adjust as you see fit. 
textfield.layer.borderWidth = 1.0; 
textfield.layer.borderColor = [UIColor grayColor].CGColor; 
0

您還可以設置邊框樣式爲無和使用自定義背景圖片:

textfield.background = [UIImage imageNamed:@"bg.png"];