I am trying to add a UIProgressView
along the top of a UIView
. There is a border and rounded corners on the UIView
. Currently it looks likes this:
How can I get the UIProgressBar
corners to follow those of the UIView
?
The UIProgressView
is a subview of the UIView
. I have tried setting clipsToBounds = true
but it didn't work.
Thanks!
You can make progressView rounded by:
self.progressView.layer.cornerRadius = //some int
But clipsToBounds
property forces view to not to draw anything outside of the view's bounds.
Check your viewController hierarchy and make sure your progressView is subView of your view not the main view of viewController.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.