title: Animating UILabel Font Size Change
body: <p>I am currently making an application that uses a custom View Controller container. Multiple views are on the screen at one time and when one is tapped, the selected view controller animates to full screen. In doing so, the selected view controllers subviews scale as well (frame, font size, etc.) Though, UILabel's font property is not animatable leading to issues. I have tried multiple solutions but all flat out suck.</p>
  
  <p>The solutions I have tried are: </p>
  
  <ol>
  <li>Take a screenshot of the larger view and animating the change (similar to how Flipboard does)</li>
  <li>Animate by using the transform property </li>
  <li>Zooming out a UIScrollView and zooming it in when brought to full screen.</li>
  <li>Setting adjustsFontSizeToFitWidth to YES and setting the fontSize prior to animation </li>
  </ol>
  
  <p>One has been the best solution so far but I am not satisfied with it.</p>
  
  <p>I'm looking for other suggestions if anyone has any or a UILabel substitue that animates smoothly using [UIView animate..].</p>
  
  <p>Here is a good example that is similar to what I would like my UILabel to do:
  <a href="http://www.cocoawithlove.com/2010/09/zoomingviewcontroller-to-animate-uiview.html">http://www.cocoawithlove.com/2010/09/zoomingviewcontroller-to-animate-uiview.html</a></p>
  
  <p><strong>EDIT: This code works</strong></p>
  
  <pre><code>// Load View
  
  self.label = [[UILabel alloc] init];
  self.label.text = @"TEXT";
  self.label.font = [UIFont boldSystemFontOfSize:20.0];
  self.label.backgroundColor = [UIColor clearColor];
  
  [self.label sizeToFit];
  
  [self.view addSubview:self.label];
  
  // Animation
  
  self.label.font = [UIFont boldSystemFontOfSize:80.0];
  self.label.transform = CGAffineTransformScale(self.label.transform, .25, .25);
  [self.label sizeToFit];
  
  [UIView animateWithDuration:1.0 animations:^{
      self.label.transform = CGAffineTransformScale(self.label.transform, 4.0, 4.0);
      self.label.center = self.view.center;
  } completion:^(BOOL finished) {
  
      self.label.font = [UIFont boldSystemFontOfSize:80.0]; 
      self.label.transform = CGAffineTransformScale(self.label.transform, 1.0, 1.0);
  
      [self.label sizeToFit];
  
  }];
  </code></pre>