设置按钮圆角边框颜色及粗细

UIButton *iconView = [UIButton buttonWithImage:@”touxiang”];
iconView.layer.cornerRadius = iconView.w * 0.5;//按钮宽度的一半
iconView.layer.masksToBounds = YES;
iconView.layer.borderWidth = 2.0f;
iconView.layer.borderColor = [UIColor whiteColor].CGColor;

你可能感兴趣的:(自我总结)