title: Animating UIView frame.origin
body: <p>I have seen some sample code online regarding a simple UIView slide-in or slide-out. It makes sense to have a UIView start with its coordinates off the screen (negative) and then the animation parameter simply changes the UIView's frame. So first question is: does this provide the most obvious method?</p>
  
  <p>However, in my code, the frame origin is not assignable. I get the Xcode error for that line that says as much.</p>
  
  <p>I simply want to do something like this inside an animation:</p>
  
  <pre><code>self.viewPop.frame.origin.y=100;
  </code></pre>
  
  <p>Any help is appreciated.</p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have solved this problem. The technique I discovered is to assign your view's frame to another CGRect, and make changes to that CGRect, then assign it back to the frame:</p>
  
  <pre><code>CGRect frame = self.moveView.frame;
  frame.origin.x = newvalue.
  
  
  [UIView animateWithDuration:2.0 animations:^{ 
  
      self.moveView.frame = frame;
  
  }];
  </code></pre>