3

The UIProgressView by default has rounded corners.

How can I get rid of those rounded corners? I wish to have a standard rectangle view.

I have tried progressView.layer.cornerRadius = 0;, but no use.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271
  • 1
    I left an edit for this question. The left edge of the progress tint area has squared off corners, but the right edge of the track area has rounded corners. – Scott K. Dec 11 '13 at 21:51
  • Have you ever found a solution for this? – Hemang Jan 22 '16 at 07:32
  • Duplicate: [How to create non rounded corner UIProgressView in iOS](https://stackoverflow.com/questions/38917974/how-to-create-non-rounded-corner-uiprogressview-in-ios-using-swift) – Cœur May 07 '19 at 07:09

1 Answers1

0

You have to subclass UIProgressView and override drawRect.

EDIT 08/31/2016:

Here was a tutorial ;-)

Come on: This one is from 2012, the Question is closed, iOS had a few updates and so had the SDK and the ProgressView API, we're (hopefully) using swift now ... and yes: The link is broken. So, feel free to downvote this one, but ask yourself, if a non-broken link would really solve your problem.

Kai Huppmann
  • 10,705
  • 6
  • 47
  • 78