gpt4 book ai didi

iphone - UITextField 内阴影

转载 作者:可可西里 更新时间:2023-11-01 04:28:00 33 4
gpt4 key购买 nike

我想摆脱 UITextField 的内部阴影。

UITextField with inner shadow

我已经尝试将 shadow-alpha 设置为 0 但它不起作用:

name.layer.shadowOpacity = 0.0f;

如有任何线索,我们将不胜感激。

最佳答案

已找到解决方案。

name.borderStyle = UITextBorderStyleNone;
name.layer.borderWidth = 1.0f;
name.layer.borderColor = [[UIColor grayColor] CGColor];
name.layer.cornerRadius = 5.0f;

我只需要在停用旧边框样式的同时使用图层的边框选项。

关于iphone - UITextField 内阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8454941/

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