UIView Animation

 

UIView Animation

UIView animation is available when the selected layer is of UIView type. For UIView animation, you can only change its animation settings in group timeline. In keypath timeline, you can only change its keyframe settings.

Keyframe UIView

 

UIView Animation Code Generation

These are two methods used to generate UIView animation code which are UIView:animateWithDuration:delay:options:completion: and UIView:animateKeyframesWithDuration:delay:options:animations:completion. QuartzCode automatically select feasible method based on the layer timelines settings.

 

UIView:animateWithDuration:delay:options:completion: method Condition
  • Duration of all timelines are equal.
  • Start time of all timelines are equal.
  • All timelines must be of basic animation type.

Example:

UIViewAnim1

UIVIewAnimCode1

 

UIView:animateKeyframesWithDuration:delay:options:animations:completion: method Condition
  • When the condition of UIView:animateWithDuration:delay:options:completion not met.

Example:

UIViewAnim2

UIVIewAnimCode2