I subclass UIProgressView as:
import UIKit
class MyProgressView: UIProgressView {
override func sizeThatFits(size: CGSize) -> CGSize {
return CGSizeMake(size.width, 6)
}
}
and I use it like:
let progress = MyProgressView()
progress.progress = 0.33
progress.layer.cornerRadius = 0
progress.tintColor = .white
progress.trackTintColor = UIColor.white.colorWithAlphaComponent(0.4)
navigationItem.titleView = progress
it works fine but has rounded corners as shown below

I want it to be not a rounded corner. How can i do this?
source
share