-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ee544d
commit 0dedf68
Showing
11 changed files
with
134 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+14.2 KB
(130%)
...project.xcworkspace/xcuserdata/jeromemorissard.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
JMAnimatedImageView/JMAnimatedImageView/JMAnimatedImageView/JMAnimatedImageView+JMGif.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// JMAnimatedImageView+JMGif.h | ||
// JMAnimatedImageView | ||
// | ||
// Created by jerome morissard on 26/09/14. | ||
// Copyright (c) 2014 jerome morissard. All rights reserved. | ||
// | ||
|
||
#import "JMAnimatedImageView.h" | ||
#import "JMGif.h" | ||
|
||
@interface JMAnimatedImageView (JMGif) | ||
|
||
//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; | ||
|
||
/** | ||
* reloadAnimationImagesFromGifNamed:, This method reload a GIF image from a GIF named | ||
* | ||
* @param gitName NSString gitName | ||
*/ | ||
- (void)reloadAnimationImagesFromGifNamed:(NSString *)gitName; | ||
|
||
|
||
@end |
49 changes: 49 additions & 0 deletions
49
JMAnimatedImageView/JMAnimatedImageView/JMAnimatedImageView/JMAnimatedImageView+JMGif.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// | ||
// JMAnimatedImageView+JMGif.m | ||
// JMAnimatedImageView | ||
// | ||
// Created by jerome morissard on 26/09/14. | ||
// Copyright (c) 2014 jerome morissard. All rights reserved. | ||
// | ||
|
||
#import "JMAnimatedImageView+JMGif.h" | ||
#import <objc/runtime.h> | ||
|
||
//JMGif *gifObject | ||
|
||
@implementation JMAnimatedImageView (JMGif) | ||
|
||
- (JMGif *)gifObject | ||
{ | ||
return objc_getAssociatedObject(self, _cmd); | ||
} | ||
|
||
- (void)setGifObject:(JMGif *)gifObject | ||
{ | ||
objc_setAssociatedObject(self, @selector(gifObject), gifObject, OBJC_ASSOCIATION_RETAIN_NONATOMIC); | ||
} | ||
|
||
- (BOOL)isAGifImageView | ||
{ | ||
if (self.gifObject) { | ||
return YES; | ||
} | ||
return NO; | ||
} | ||
|
||
- (void)reloadAnimationImagesFromGifData:(NSData *)data | ||
{ | ||
self.gifObject = [[JMGif alloc] initWithData:data]; | ||
self.animationDuration = JMDefaultGifDuration; | ||
[self setCurrentIndex:0]; | ||
} | ||
|
||
- (void)reloadAnimationImagesFromGifNamed:(NSString *)gitName | ||
{ | ||
self.gifObject = [JMGif gifNamed:gitName]; | ||
self.animationDuration = JMDefaultGifDuration; | ||
[self setCurrentIndex:0]; | ||
[self updateGestures]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.