0

I am trying to change the UIProgressView height through nib and programatic also. But it can't changed. So give some suggestion how to handle it.

Thanks in advance.

Larme
  • 24,190
  • 6
  • 51
  • 81
user2823044
  • 315
  • 2
  • 5
  • 14

4 Answers4

2

This is the trick : chose scale according to the new height you want and then write this in your code :

self.progressView.tranform = CGAffineTransformMakeScale(1.0, scale);
Kujey
  • 1,122
  • 6
  • 17
2

In Swift 3, it's changed to CGAffineTransform(scaleX: CGFloat, y: CGFloat). So code would be:

progressView.transform = CGAffineTransform(scaleX: 1, y: 4)
Pandurang Yachwad
  • 1,695
  • 1
  • 19
  • 29
0

UIProgressView has a fixed height. You can change the width though. There are a lot of custom progressviews out there you could try.

yoeriboven
  • 3,541
  • 3
  • 25
  • 40
0

I've found another answer that works better for me. Set your width and height manually.

self.progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleBar]; [self.progressView setFrame:CGRectMake(0, 0, self.view.frame.size.width, 11)];

[self.view addSubview:self.progressView];