2

UIProgressView height is different when displayed in iOS 7.0

it's not 9 as the interface builder is showing.

I am trying to transform progressView to increase height. because 9 is too small. and because original size of the progress view is not the same for iOS >= 7.0 and iOS < 7.0. progress view in iOS >= 7.0 is taking more place than supposed to take.

Any ideas how to handle that?

hasan
  • 23,815
  • 10
  • 63
  • 101

2 Answers2

5

Try to do this:

float systemVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
if (systemVersion >= 7.0){
    CGAffineTransform transform = CGAffineTransformMakeScale(1.0f, 1.2f);// you can change the sy as you want
    yourProgressView.transform = transform;
}
Tarek Hallak
  • 18,422
  • 7
  • 59
  • 68
4

Create CustomProgressView and add following method:

- (CGSize)sizeThatFits:(CGSize)size {
    CGSize newSize = CGSizeMake(self.frame.size.width,6);
    return newSize;
}

and change number 6 according to your need.

shripad20
  • 848
  • 1
  • 7
  • 15