我想创建矩形的自定义 UIButton。为此,我使用矩形视图作为 UIButton 的背景,并将 UIbuttons 背景颜色设置为clearcolor。但 UIbutton 的边框仍然保留。关于如何使边框消失有什么建议吗?
感谢您提前提供任何帮助..
尝试这个:
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button.layer setBorderColor:[[UIColor clearColor] CGColor]];
但不要忘记添加您的 .h 或 .m 文件
#import <QuartzCore/QuartzCore.h>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)