Reputation: 1425
How to Customize UITextField has show in the below picture
.
Upvotes: 1
Views: 489
Reputation: 7936
You can also set the border style to none and use a custom background image:
textfield.background = [UIImage imageNamed:@"bg.png"];
Upvotes: 0
Reputation: 5765
[textField setBackgroundColor:[UIColor whiteColor]];
[textField setBorderStyle:UITextBorderStyleRoundedRect];
Upvotes: 1
Reputation: 11502
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;
Upvotes: 0
Reputation: 17877
Just set property placeholder of your UITextField object to @"07/28/2011 4x8 Card" and use code from @Akshay
Upvotes: 0