title: How to scale (zoom) a UIView to a given CGPoint
body: <p>I've spent a lot of time trying to find a way to use CGAffineScale to transform a view to a given point, including messing around with anchor points, moving the centre of a view before and after transforming and comprehensive Googling. I am aware this would be a lot simpler with a UIScrollview; but I know it's technically possible to do without one, and it's become a splinter in my mind.</p>
  
  <p><a href="https://stackoverflow.com/a/5446944/459116">This answer</a> gets remarkably close to what I want to achieve, but the answer only gives details on how to zoom to a given corner (instead of a given point) by cleverly moving the centre to the corner opposite the one you want to zoom in to. </p>
  
  <p>How can I modify <a href="https://stackoverflow.com/a/5446944/459116"><strong>mvds</strong>' code</a> to scale a UIView to any given point in a UIView? </p>
  
  <pre><code>CGFloat s = 3;
  CGAffineTransform tr = CGAffineTransformScale(self.view.transform, s, s);
  CGFloat h = self.view.frame.size.height;
  CGFloat w = self.view.frame.size.width;
  [UIView animateWithDuration:2.5 delay:0 options:0 animations:^{
      self.view.transform = tr;
      self.view.center = CGPointMake(w-w*s/2,h*s/2);
  } completion:^(BOOL finished) {}];
  </code></pre>