Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Conflicts:
	JMAnimatedImageView.podspec
	JMAnimatedImageView/JMAnimatedImageView/JMAnimatedImageView/JMAnimatedImageView.h
	JMAnimatedImageView/JMAnimatedImageView/JMAnimatedImageView/JMAnimatedImageView.m
	JMAnimatedImageView/JMAnimatedImageView/JMFLViewController.m
	JMAnimatedImageView/JMAnimatedImageView/JMTableViewController.h
	JMAnimatedImageView/JMAnimatedImageView/JMTableViewController.m
	JMAnimatedImageView/JMAnimatedImageView/JMViewController.m
  • Loading branch information
Jerome Morissard committed May 14, 2015
2 parents 5732305 + a9e064d commit 1f7a02a
Show file tree
Hide file tree
Showing 16 changed files with 370 additions and 420 deletions.
4 changes: 2 additions & 2 deletions JMAnimatedImageView.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'JMAnimatedImageView'
s.version = '0.2.3'
s.version = '0.2.4'
s.requires_arc = true
s.author = {
'Morissard Jérome' => '[email protected]'
Expand All @@ -11,7 +11,7 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/leverdeterre/JMAnimatedImageView'
s.source = {
:git => 'https://github.com/leverdeterre/JMAnimatedImageView.git',
:tag => "0.2.3"
:tag => "0.2.4"
}
s.source_files = 'JMAnimatedImageView/JMAnimatedImageView/JMAnimatedImageView/*'
end
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
C2323BDD19DC94B000C62D22 /* JMAnimatedGifImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = C2323BDC19DC94B000C62D22 /* JMAnimatedGifImageView.m */; };
C2323BDE19DC94B000C62D22 /* JMAnimatedGifImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = C2323BDC19DC94B000C62D22 /* JMAnimatedGifImageView.m */; };
C24A92DC199F4C0800CFDBE0 /* 0_verge_super_wide.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C24A92D1199F4C0800CFDBE0 /* 0_verge_super_wide.jpg */; };
C24A92DD199F4C0800CFDBE0 /* 10_verge_super_wide.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C24A92D2199F4C0800CFDBE0 /* 10_verge_super_wide.jpg */; };
C24A92DE199F4C0800CFDBE0 /* 1_verge_super_wide.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C24A92D3199F4C0800CFDBE0 /* 1_verge_super_wide.jpg */; };
Expand Down Expand Up @@ -140,8 +138,6 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
C2323BDB19DC94B000C62D22 /* JMAnimatedGifImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JMAnimatedGifImageView.h; sourceTree = "<group>"; };
C2323BDC19DC94B000C62D22 /* JMAnimatedGifImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JMAnimatedGifImageView.m; sourceTree = "<group>"; };
C24A92D1199F4C0800CFDBE0 /* 0_verge_super_wide.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 0_verge_super_wide.jpg; sourceTree = "<group>"; };
C24A92D2199F4C0800CFDBE0 /* 10_verge_super_wide.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 10_verge_super_wide.jpg; sourceTree = "<group>"; };
C24A92D3199F4C0800CFDBE0 /* 1_verge_super_wide.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_verge_super_wide.jpg; sourceTree = "<group>"; };
Expand Down Expand Up @@ -535,8 +531,6 @@
C2F4DB6B19BE5C4700F04261 /* JMAmimatedImageViewMacro.h */,
C2B753EF199E88A9004BB1C3 /* JMAnimatedImageView.h */,
C2B753F0199E88A9004BB1C3 /* JMAnimatedImageView.m */,
C2323BDB19DC94B000C62D22 /* JMAnimatedGifImageView.h */,
C2323BDC19DC94B000C62D22 /* JMAnimatedGifImageView.m */,
C2B03DFA19A52D000032B240 /* JMAnimatedImageView+Image.h */,
C2B03DFB19A52D000032B240 /* JMAnimatedImageView+Image.m */,
C2B753F1199E88A9004BB1C3 /* JMAnimationOperation.h */,
Expand Down Expand Up @@ -751,7 +745,6 @@
C2B753F9199E88A9004BB1C3 /* UIImage+JM.m in Sources */,
C2B753FC199E8AFE004BB1C3 /* JMTableViewController.m in Sources */,
C2954D1C19A72C7600494F41 /* UIDevice+iAppInfos.m in Sources */,
C2323BDD19DC94B000C62D22 /* JMAnimatedGifImageView.m in Sources */,
C2954D1B19A72C7600494F41 /* UIApplication+iAppInfos.m in Sources */,
C2B03DF919A474190032B240 /* JMGif.m in Sources */,
C2954D1919A72C7600494F41 /* JMOMobileProvisionning.m in Sources */,
Expand All @@ -766,7 +759,6 @@
buildActionMask = 2147483647;
files = (
C2B75352199E8802004BB1C3 /* JMAnimatedImageViewTests.m in Sources */,
C2323BDE19DC94B000C62D22 /* JMAnimatedGifImageView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.2.3</string>
<string>0.2.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.2.3</string>
<string>0.2.4</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@

#import "JMAnimatedImageView+Image.h"
#import "UIImage+JM.h"
#import "JMAnimatedGifImageView.h"
#import "JMGif.h"

@implementation JMAnimatedImageView (Image)

- (UIImage *)imageAtIndex:(NSInteger)index
{
if ([self isKindOfClass:[JMAnimatedGifImageView class]]) {
JMAnimatedGifImageView *gifView = (JMAnimatedGifImageView *)self;
return [gifView.gifObject imageAtIndex:index];
if ([self isAGifImageView]) {
return [self.gifObject imageAtIndex:index];

} else if ([self.animationDatasource respondsToSelector:@selector(imageAtIndex:forAnimatedImageView:)]) {
return [self.animationDatasource imageAtIndex:index forAnimatedImageView:self];
Expand All @@ -32,10 +31,8 @@ - (UIImage *)imageAtIndex:(NSInteger)index

- (NSUInteger)numberOfImages
{
if ([self isKindOfClass:[JMAnimatedGifImageView class]]) {
JMAnimatedGifImageView *gifView = (JMAnimatedGifImageView *)self;
return gifView.gifObject.items.count;

if ([self isAGifImageView]) {
return self.gifObject.items.count;
} else {
if ([self.animationDatasource respondsToSelector:@selector(numberOfImagesForAnimatedImageView:)]) {
return [self.animationDatasource numberOfImagesForAnimatedImageView:self];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ typedef NS_ENUM(NSUInteger, UIImageViewAnimationState) {

typedef void (^JMCompletionFinishBlock)(BOOL resul);

@class JMGif;
@interface JMAnimatedImageView : UIImageView

@property (weak, nonatomic) IBOutlet id <JMOImageViewAnimationDatasource> animationDatasource;
Expand Down Expand Up @@ -85,6 +86,7 @@ typedef void (^JMCompletionFinishBlock)(BOOL resul);
*/
- (void)animateToIndex:(NSInteger)index withDuration:(NSTimeInterval)duration;


/**
* animateToIndex:withDuration:withCompletionBlock:, This method will animate the modification of images to access to the index in parameter.
*
Expand All @@ -94,10 +96,29 @@ typedef void (^JMCompletionFinishBlock)(BOOL resul);
*/
- (void)animateToIndex:(NSInteger)index withDuration:(NSTimeInterval)duration withCompletionBlock:(JMCompletionFinishBlock)finishBlock;

- (void)updateGestures;
- (void)changeImageToIndex:(NSInteger)index withTimeInterval:(NSTimeInterval)duration repeat:(BOOL)repeat;
- (BOOL)operationQueueIsFinished;
- (BOOL)checkLifeCycleSanity;
- (NSInteger)realIndexForComputedIndex:(NSInteger)index;
//Specific to GIF
@property (strong, readonly, nonatomic) JMGif *gifObject;

/**
* isAGifImageView
*
* @return BOOL
*/
- (BOOL)isAGifImageView;

/**
* reloadAnimationImagesFromGifData:, This method reload a GIF image from a GIF NSData
*
* @param data NSData data
*/
- (void)reloadAnimationImagesFromGifData:(NSData *)data;
- (void)reloadAnimationImagesFromGifData:(NSData *)data fromUrl:(NSURL *)url;

/**
* reloadAnimationImagesFromGifNamed:, This method reload a GIF image from a GIF named
*
* @param gitName NSString gitName
*/
- (void)reloadAnimationImagesFromGifNamed:(NSString *)gitName;

@end
Loading

0 comments on commit 1f7a02a

Please sign in to comment.