JMAnimatedImageView is a performant subclass of UIImageView:
- Plays huge image animation using a minimum memory pressure,
- Allows manual interactions with imageView to drive manualy animations,
- Can use has a Carousel,
- GIF are supported to load your animations.
Simply replace your UIImageView instances with instances of JMAnimatedImageView.
If using CocoaPods, the quickest way to try it out is to type this on the command line:
$ pod try JMAnimatedImageViewIn your code, #import "JMAnimatedImageView.h" and #import "JMAnimatedImageView.h"
//GIF example
@property (weak, nonatomic) IBOutlet JMAnimatedImageView *jmImageView;
[self.jmImageView reloadAnimationImagesFromGifNamed:@"rock"];
self.jmImageView.animationType = JMAnimatedImageViewAnimationTypeAutomaticLinearWithoutTransition;
[self.jmImageView startAnimating];//PNG example with manual animation
@property (weak, nonatomic) IBOutlet JMAnimatedImageView *jmImageView;
self.jmImageView.animationDelegate = self;
self.jmImageView.animationDatasource = self;
[self.jmImageView reloadAnimationImages]; //<JMOImageViewAnimationDatasource>
self.jmImageView.animationType = JMAnimatedImageViewAnimationTypeAutomaticLinearWithoutTransition;
self.jmImageView.memoryManagementOption = JMAnimatedImageViewMemoryLoadImageLowMemoryUsage;Some parameters :
- AnimationType
typedef NS_ENUM(NSUInteger, JMAnimatedImageViewAnimationType) {
JMAnimatedImageViewAnimationTypeNone = 0,
//Animation, carousel effect
JMAnimatedImageViewAnimationTypeManualSwipe,
//Automatic rotation, use animationDuration + animationRepeatCount
JMAnimatedImageViewAnimationTypeAutomaticLinear,
JMAnimatedImageViewAnimationTypeAutomaticLinearWithoutTransition,
JMAnimatedImageViewAnimationTypeAutomaticReverse,
};- MemoryOption
typedef NS_ENUM(NSUInteger, JMAnimatedImageViewMemoryOption) {
//images memory will be retain by system
JMAnimatedImageViewMemoryLoadImageSystemCache = 0,
//image are loaded in live
JMAnimatedImageViewMemoryLoadImageLowMemoryUsage,
//you load your images has you want
JMAnimatedImageViewMemoryLoadImageCustom
};- ImageViewOrder
typedef NS_ENUM(NSUInteger, JMAnimatedImageViewOrder) {
JMAnimatedImageViewOrderNormal = 1,
JMAnimatedImageViewOrderReverse = -1
};

