Reputation: 315
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.
Upvotes: 0
Views: 4533
Reputation: 1723
In Swift 3, it's changed to CGAffineTransform(scaleX: CGFloat, y: CGFloat). So code would be:
progressView.transform = CGAffineTransform(scaleX: 1, y: 4)
Upvotes: 2
Reputation: 1
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];
Upvotes: 0
Reputation: 3571
UIProgressView
has a fixed height. You can change the width though. There are a lot of custom progressviews out there you could try.
Upvotes: 0
Reputation: 1122
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);
Upvotes: 2