I'm trying to scale an UIView using a UISlider but the result is not good with this approach:
- (void)setScale:(float)scale {
CGAffineTransform transform = CGAffineTransformScale(myView.transform, scale, scale);
myView.transform = transform;
}
thanks
You want to change the scale based on the identity transform (which represents the object without any changes). This code works:
When you create the slider you may want to start the value at 1 if your view is starting at full size.