The following code correctly clamps / scales the container view, but only after it moves to the 1.0 scale. How can I change it so that the view of the container scales from it at the current scale?
UIPinchGestureRecognizer *twoFingerPinch = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(twoFingerPinch:)]; [self.container addGestureRecognizer:twoFingerPinch]; - (void)twoFingerPinch:(UIPinchGestureRecognizer *)recognizer { _scale = recognizer.scale; CGAffineTransform tr = CGAffineTransformScale(self.view.transform, _scale, _scale); self.container.transform = tr; }
source share