title: How to rotate UIView by 45 degrees?
body: <p>I want to rotate my <code>UIButton</code> by <code>M_PI/4</code> with animation. Here's my code:</p>
  
  <pre><code>- (void)viewDidAppear:(BOOL)animated
  {
      [super viewDidAppear:animated];
      [UIView animateWithDuration:.5 animations:^{
          self.closeButton.transform = CGAffineTransformMakeRotation(M_PI/4);
      }];
  }
  </code></pre>
  
  <p>But this make my button's frame corrupted. Frame before animation was <code>(260 0; 44 44)</code> and after animation it becomes <code>(250.887 -9.1127; 62.2254 62.2254)</code>.
  I saw <a href="https://stackoverflow.com/questions/9547122/uiview-rotated-by-45-disappears">this</a> post and few others, but I don't understand, how to achieve UIButton animated rotation by <code>M_PI/2</code>.</p>