Xcode 新手。我有一个带有黑色轮廓的文本字段,但我希望它是白色的。字体颜色也需要是白色的。如果有可能能够将要输入的文本居中。
谢谢
到目前为止,这是我的代码:
self.poundsTxt=[[UITextField alloc] initWithFrame:CGRectMake(17, 210, 120, 25)];
self.poundsTxt.borderStyle = UITextBorderStyleLine;
self.poundsTxt.font = [UIFont systemFontOfSize:15];
self.poundsTxt.autocorrectionType = UITextAutocorrectionTypeNo;
self.poundsTxt.keyboardType = UIKeyboardTypeNumberPad;
self.poundsTxt.tag=1;
self.poundsTxt.userInteractionEnabled=YES;
self.poundsTxt.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
self.poundsTxt.delegate = self;
self.poundsTxt.returnKeyType=UIReturnKeyDone;
[self.view addSubview:self.poundsTxt];