[問題] swift uiProgressView圓角
系統 : 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也是不佳
不知哪邊出了問題 非常謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.34.181.227
※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1484270018.A.F3A.html
推
01/13 10:02, , 1F
01/13 10:02, 1F
→
01/13 10:02, , 2F
01/13 10:02, 2F
推
01/13 10:07, , 3F
01/13 10:07, 3F
推
01/13 10:09, , 4F
01/13 10:09, 4F
推
01/13 12:44, , 5F
01/13 12:44, 5F
推
01/13 13:39, , 6F
01/13 13:39, 6F
→
01/13 19:09, , 7F
01/13 19:09, 7F
推
01/14 08:44, , 8F
01/14 08:44, 8F
→
01/14 08:45, , 9F
01/14 08:45, 9F
→
01/14 08:46, , 10F
01/14 08:46, 10F