yannickl / YLProgressBar

UIProgressView replacement with an highly and fully customizable animated progress bar in pure Core Graphics

Home Page:http://yannickloriot.com/library/ios/ylprogressbar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong cornerRadius when device orientation changes

alexmorral opened this issue · comments

When the device is rotated, the cornerRadius is not updated/calculated for the current device orientation.

Hi,

I can't reproduce it. How do you manage the rotation? Have you a sample code?

Hi,
here is the code for initializing the progressBar:

    _progressBar.type                        = YLProgressBarTypeRounded;
    _progressBar.hideStripes                 = YES;
    _progressBar.hideTrack                   = NO;
    _progressBar.indicatorTextDisplayMode    = YLProgressBarIndicatorTextDisplayModeNone;
    _progressBar.behavior                    = YLProgressBarBehaviorDefault;
    _progressBar.progressBarInset            = 0;
    _progressBar.hideGloss                   = YES;
    _progressBar.cornerRadius                = 0; //May this line be the problem?

and here is what I use for autosizing:
autosize

The wrong bar when the device is rotated (this time from portrait to landscape):
wrongbar

and I don't manage the rotation, as in your example project you don't seem to manage it.

Thanks