Uiimageview Official document (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImageView_Class/ index.html#//apple_ref/doc/uid/tp40006889) There are instructions inside
The relevant properties are as follows:
@property(nonatomic, copy) nsarray *animationimages ; Need to animate a few frames of picture, here to store a loop of all the pictures
@property(nonatomic, copy) nsarray *highlightedanimationimages; Animated several frames of pictures, of course, is to highlight the state of the
@property(nonatomic) nstimeinterval animationduration;//The time required for a loop, in seconds, the default value is [ Animaitonimages count]/30 sec
@property(nonatomic) nsinteger animationrepeatcount;//number of cycles, default 0, infinite loop
Method:
-(void)startanimating
-(void)stopanimating
-(BOOL)isanimating
With these things, you can start making an animation. The simplest is to add a few pictures to Animationimages, then startanimation.
If you need to refine the speed and other elements, set the relevant properties directly.
On the Internet, there is a way to say this implementation animation, memory is not released. is actually putting all the frames, all loaded in memory.
The pro-test is true. In this way, it is recommended to do that small and beautiful animation can not be used to do that big picture animation, otherwise memory is too much ha. Oh.
iOS animation implementation (2) ImageView Auto Animation