系统 : Swift 3.0
请问一下各位大大, 我想做出圆角进度条的bar
以下是圆角的code
let myProgressView = UIProgressView(progressViewStyle: .bar)
myProgressView.frame = CGRect(x: 0, y: 0, width: ScreenSize.width * 0.8,
height: 80)
myProgressView.center = CGPoint(x: ScreenSize.width * 0.5,
y: ScreenSize.height * 0.2)
// 设定bar的高度
myProgressView.transform = CGAffineTransform(scaleX: 1, y: 15)
// 圆角
myProgressView.layer.cornerRadius = myProgressView.frame.height / 2.0
myProgressView.clipsToBounds = true
myProgressView.layer.masksToBounds = true
实作圆角效果 : ppt.cc/rdchE
不过圆角的效果不好耶(好像三角形), 不是很圆滑
因为是进度条, 想要有圆滑一点的效果, 我也有调整cornerRadius也是不佳
不知哪边出了问题 非常谢谢