title: UIView not changing position in animateWithDuration
body: <p>I have two UIViews (My bad it is a <code>UIView</code> and a <code>UIButton</code>) which I am animating at the same time. I originally had a view and a containerView which would animate just fine and worked like a charm. </p>
  
  <p>Now only one of my UIViews will move/animate in animateWithDuration even though through debugging the frame of the other view says that it is in a position it is not.</p>
  
  <pre><code>    CGRect rect = self.toggle.frame;
      CGRect tabRect = self.tabButton.frame;
      rect.origin.x = rect.origin.x - rect.size.width;
      NSLog(@"%f Before",tabRect.origin.x);
      tabRect.origin.x = tabRect.origin.x - rect.size.width;
      NSLog(@"%f After", tabRect.origin.x);
      [UIView animateWithDuration:0.3 animations:^{  // animate the following:
          self.toggle.frame = rect; // move to new location
          self.tabButton.frame = tabRect;
      }];
      NSLog(@"%f AfterAnimation", tabButton.frame.origin.x);
  </code></pre>
  
  <p>The toggle view moves fine, but the <code>tabButton</code> view does not animate or move. The strange thing is that both the "After" and "AfterAnimation"  debugging code returns the same value, which suggests the frame has indeed moved. Is there a specific reason that this will not work when <code>toggle</code> is a <code>UIView</code> when it would work as a <code>UIContainerView</code>?</p>
  
  <p>Note that if I remove the line</p>
  
  <pre><code>self.toggle.frame = rect;
  </code></pre>
  
  <p><code>tabButton</code> will animate correctly, but if I move <code>toggle</code>, <code>tabButton</code> will not move regardless of whether it is first in the animation block or second.</p>
  
  <p>Edit: I have tried moving them into separate blocks and to change the center point rather than the frame, to no avail. It seems that if the <code>toggle</code> view moves, the <code>tabButton</code> will not move.</p>
  
  <p>Edit 2: The pictorial evidence.{</p>
  
  <p>In the following screenshots tabButton bg is green and toggle bg is red.</p>
  
  <p><img src="https://i.stack.imgur.com/hEBsy.png" alt="Initial position (&lt;code&gt;toggle&lt;/code&gt; is off-screen) correct position"></p>
  
  <p>Above: Initial position (<code>toggle</code> is off-screen) correct position</p>
  
  <p><img src="https://i.stack.imgur.com/CBMOP.png" alt="The problem in question &lt;code&gt;toggle&lt;/code&gt; is correct &lt;code&gt;tabButton&lt;/code&gt; is not"></p>
  
  <p>Above: The problem in question <code>toggle</code> is correct <code>tabButton</code> is not</p>
  
  <p><img src="https://i.stack.imgur.com/DyS6P.png" alt="When &lt;code&gt;self.toggle.frame = rect&lt;/code&gt; is commented out (&lt;code&gt;tabButton&lt;/code&gt; correct, &lt;code&gt;toggle&lt;/code&gt; not)"></p>
  
  <p>Above: When <code>self.toggle.frame = rect</code> is commented out (<code>tabButton</code> correct, <code>toggle</code> not)
  }</p>
  
  <p>Edit 3: It's even worse than I feared.{</p>
  
  <p>I have done a few more tests and even if I take the <code>toggle</code> change out of the animation block to make it an instant thing, the <code>tabButton</code> will <em>still</em> not animate. This makes me think the <code>tabButton</code> may just fundamentally dislike the <code>toggle</code> view and/or myself so will not move just to spite me.</p>
  
  <p>}</p>
  
  <p>Edit 4:{</p>
  
  <p>If I change the <code>tabButton</code> animation to <code>tabButton.frame = CGRectMake(10,10,100,100)</code> the View snaps instantly to that location and animates back to its original position in the same time as the animation duration.</p>
  
  <p>}</p>
  
  <p>I better add more bookkeeping/TLDR information in case things aren't clear.</p>
  
  <ul>
  <li><p><code>toggle</code> is an instance of <code>ToggleDraw</code> which is a subview of <code>UIView</code> which I created.</p></li>
  <li><p><code>tabButton</code> is a <code>UIButton</code> which is part of my IB viewController and a property of the class</p></li>
  <li><p>Both <code>toggle</code> and <code>tabButton</code> are subviews of <code>self.view</code></p></li>
  <li><p>The animations will work individually with no modifications to the logic of the rects but will not work if they are animated at the same time</p></li>
  <li><p><code>toggle</code> animation seems to take precedence over <code>tabButton</code> animation regardless of the order</p></li>
  </ul>