gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 04:12:21 24 4
gpt4 key购买 nike

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

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

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

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

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

最佳答案

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

关于xcode - 在 UITableViewCell 中的 UITextField 上创建干净的圆角,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5459661/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com