开发者

How to customize the UITextField?

How to Customize 开发者_如何学GoUITextField has show in the below picture

.

How to customize the UITextField?


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


Just set property placeholder of your UITextField object to @"07/28/2011 4x8 Card" and use code from @Akshay


If you are on iOS3.0+, you can do a custom border using 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;


You can also set the border style to none and use a custom background image:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜