title: Custom UIView scaling using CGAffineTransformScale
body: <p>I'm learning to develop for iOS, and as part of education process I have created custom <code>UIView</code> which uses <code>drawRect</code> to draw it's contents (Core Graphics + <code>UIBezierPath</code> based). Everthing works as expected, view is dynamic and renders it's contents depending on it's width/height. Now I want to add dissolve animation which should look like scaling from 100% to 0%. I have written this code to do it:</p>
  
  <pre><code>[UIView animateWithDuration:1 delay:0
                  options: UIViewAnimationOptionBeginFromCurrentState
               animations: ^{
       for (CardView *cardView in self.cardsViews) {
           cardView.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.01, 0.01);
  
       }} completion:nil];
  </code></pre>
  
  <p>However, this code DOES NOT scales my view from 100% to 0%. It just makes cards to dissapear (at most). I have tried many ways of doing scaling, but only effect I have reached so far is zooming from 0% to 100%. This my view does perfectly, but not reverse scaling... Also, it DOES NOT scales up/down even if I try to apply non-animated transformation such as:</p>
  
  <pre><code>cardView.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.5, 0.5);
  </code></pre>
  
  <p>I see that my view look changes A BIT, but not scales to 50%, that's for sure. When I try to apply exactly same animation logic to UILabel, it works perfectly! What have I missed developing custom UIView? Why scaling view may malfunction?
  Thanks a lot in advance!</p>
  
  <p><strong>UPDATE #1</strong> This code makes my view exactly twice as big and than scales it back to original size:</p>
  
  <pre><code>[UIView animateWithDuration:5 delay:0
                      options: UIViewAnimationOptionBeginFromCurrentState
                   animations: ^{
           for (CardView *cardView in self.cardsViews) {
               cardView.transform = CGAffineTransformMakeScale(0.5, 0.5);
           }
      } completion:nil];
  </code></pre>