First of all to have a certain understanding of the view, here I do not introduce more,
Let's start with an animation that's basically not used.
First set a view UIView * TestView = [UIView alloc]init];
Determine position self.testView.frame = CGRectMake (0,0,50,50);
Start animation
[UIView Beginanimations:nil Context:nil]
Set the duration of an animation
[UIView setanimationduration:2.0]
Animated property values
Self.testView.frame = rect;
Self.testView.backgroundColor = [Uicolor Bluecolor];
Submit Animation
[UIView commitanimations];
block animation more popular animation methods, there are many details can be explored, many methods, properties can be explored
[UIView animatewithduration: Duration delay: Delay time usingspringwithdamping: Elastic initialspringvelocity: Quick options for animation run: How animations are run options animations:^{
Code that is executed when the animation runs
} completion:^ (BOOL finished) {
Code executed after the animation is complete
}];
Today because of the time relationship, share such a simple animation here
iOS development essay implementation of simple animation on the second day