在UITableViewCell中的UITextField上创建干净的圆角

时间:2011-03-28 13:27:50

标签: xcode uitableview uitextfield

我在带有圆角的UITableViewCell中创建一个UITextField

UITextField *someTextField = [[UITextField alloc] initWithFrame:CGRectMake(165, 9, 135, 20)];

someTextField.backgroundColor = [UIColor whiteColor];
someTextField.borderStyle = UITextBorderStyleRoundedRect;

是否有办法制作角落区域,圆角和方角之间的部分清晰,以便背景颜色不显示在那里。 任何帮助表示赞赏。 LQ

[注意:我回答了我自己的问题。对不起,这是一个蹩脚的。 LQ]

1 个答案:

答案 0 :(得分:2)

// Doh! This gets rid of the white corners:
someTextField.backgroundColor = [UIColor clearColor];
相关问题