标签:ar color sp on bs ad tt nbsp ui
- (void)viewDidLoad
{
[super viewDidLoad];
UITextField *input=[[UITextField alloc] initWithFrame:CGRectMake(0, 100, 200, 100)];
self.textfield=input;
[input setText:@"hahah"];
input.textAlignment=NSTextAlignmentCenter;
input.contentVerticalAlignment=UIControlContentVerticalAlignmentCenter;
input.contentHorizontalAlignment=UIControlContentHorizontalAlignmentCenter;
input.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
input.textColor=[UIColor blueColor];
input.keyboardAppearance=UIKeyboardAppearanceLight;
// input.alpha=0;
input.tintColor=[[UIColor redColor] colorWithAlphaComponent:0.5];
[self.view addSubview:input];
}
标签:ar color sp on bs ad tt nbsp ui
原文地址:http://www.cnblogs.com/zhibin/p/4115984.html