How animations are turned on in the UI
Turn on animation is a feature attribute in Uiimageview
have progressive animation and sequence frame animations
Progressive animations include kinsoku and block animations
A sequence frame animation is an animated effect of playing a contiguous set of pictures in a very short period of time
First you need to create a Uiimageview object for ImageView
1. Sequence frame animation basic steps
Assigns the array of pictures to be played to the Animationimages property of the Uiimageview object, which is an array object
Imageview.animationimages=array
Set the number of executions of an animation (Animationrepeatcount property)
Imageview.animationrepeatcount
Set the execution time of an animation
Imageview.animationduration
Start animation
[ImageView startanimating]
Stop animation
[ImageView stopanimating]
Determines whether the animation is executing
[ImageView isanimating]
How long animation delays performing other methods
[ImageView performselector:<# (nonnull SEL) #> withobject:<# (nullable ID) #> afterdelay:<# ( Nstimeinterval) #>]
In the above method:
<# (SEL) #> is called a method that invokes a method in the object used earlier
<# (ID) #> is the parameter passed in by the method
<# (nstimeinterval) #> delay how much time to execute the method in the SEL
2.block Animation (Common)
A class method that calls UIView directly can
[UIView animatewithduration:<# (Nstimeinterval) #> animations:<#^ (void) animations#>
<# (nstimeinterval) #> animation execution Time
<#^ (void) animations#> block structure write code to perform animation
3. Tail-up animation
Turn on animation
UIView beginanimations:<# (Nullable NSString *) #> context:<# (Nullable void *) #>]
<# (Nullable NSString *) #> the name of the picture to perform the animation
<# (Nullable void *) #> general assignment is nil
Submit Animation
[UIView Commitanimations]
Another: In the Click to perform these animations are generally associated with these other functions
For example: Zoom in and out of the image will be corresponding to the Change button frame center bounds and transform these properties according to the specific function of the specific judge
How animations are turned on in the UI of iOS development