UIButton* titleButton = [UIButton buttonWithType:UIButtonTypeCustom];
titleButton.frame = CGRectMake(0.0f, 0, 30.0f, 30.0f);
titleButton.layer.masksToBounds = YES;
titleButton.layer.cornerRadius = 15.0f;
titleButton.layer.borderColor = [[UIColor whiteColor] CGColor];
titleButton.layer.borderWidth = 2.0f;
[tiView addSubview:titleButton];
本文介绍如何使用UIKit中的UIButton创建一个带有圆角、边框颜色及宽度的圆形按钮,并将其添加到视图中。
1万+

被折叠的 条评论
为什么被折叠?



