CGRect textFieldFrame = CGRectMake(0.0, 0.0, 100.0, 30.0);
UITextField *txtField = [[UITextField alloc] initWithFrame:textFieldFrame];
// default is UITextBorderStyleNone. If set to UITextBorderStyleRoundedRect, custom background images are ignored.
[txtField setBorderStyle:UITextBorderStyleRoundedRect];
[txtField setTextColor:[UIColor blackColor]];
[txtField setFont:[UIFont systemFontOfSize:20]];
[txtField setDelegate:self];
[txtField setPlaceholder:@"Add Your Placeholder Text Here"];
[txtField setBackgroundColor:[UIColor whiteColor]];
No comments:
Post a Comment