-
Notifications
You must be signed in to change notification settings - Fork 287
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
Reda Lemeden
committed
Jan 5, 2017
1 parent
18a1299
commit 439cc1e
Showing
24 changed files
with
363 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
002A1BFC1D1624D0005ABBD0 /* mugen.gif in Resources */ = {isa = PBXBuildFile; fileRef = 002A1BFB1D1624D0005ABBD0 /* mugen.gif */; }; | ||
002FF5141D3A91340069CA56 /* Gifu.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A1BF91D161D33005ABBD0 /* Gifu.framework */; }; | ||
007380231B279644008DAD5C /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 007380221B279644008DAD5C /* [email protected] */; }; | ||
00B2B8181E1DAB1C00A50D91 /* UIImageViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00B2B8171E1DAB1C00A50D91 /* UIImageViewExtension.swift */; }; | ||
00DD26EB1DA5968500A0F683 /* EmptyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00DD26EA1DA5968500A0F683 /* EmptyViewController.swift */; }; | ||
9D98823D19BC69CA00B790C6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D98823C19BC69CA00B790C6 /* AppDelegate.swift */; }; | ||
9D98823F19BC69CA00B790C6 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D98823E19BC69CA00B790C6 /* ViewController.swift */; }; | ||
|
@@ -23,6 +24,7 @@ | |
002A1BF91D161D33005ABBD0 /* Gifu.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Gifu.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Gifu-gwslszlwadetledwfipapwloqzrw/Build/Products/Debug-iphonesimulator/Gifu.framework"; sourceTree = "<group>"; }; | ||
002A1BFB1D1624D0005ABBD0 /* mugen.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; name = mugen.gif; path = ../../../GifuTests/Images/mugen.gif; sourceTree = "<group>"; }; | ||
007380221B279644008DAD5C /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
00B2B8171E1DAB1C00A50D91 /* UIImageViewExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageViewExtension.swift; sourceTree = "<group>"; }; | ||
00DD26EA1DA5968500A0F683 /* EmptyViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmptyViewController.swift; sourceTree = "<group>"; }; | ||
9D25870519BCCB0F00A55A18 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||
9D98823719BC69CA00B790C6 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
|
@@ -78,6 +80,7 @@ | |
9D98825919BC69F600B790C6 /* Main.storyboard */, | ||
9D98823E19BC69CA00B790C6 /* ViewController.swift */, | ||
00DD26EA1DA5968500A0F683 /* EmptyViewController.swift */, | ||
00B2B8171E1DAB1C00A50D91 /* UIImageViewExtension.swift */, | ||
); | ||
path = Source; | ||
sourceTree = "<group>"; | ||
|
@@ -120,7 +123,7 @@ | |
isa = PBXProject; | ||
attributes = { | ||
LastSwiftUpdateCheck = 0700; | ||
LastUpgradeCheck = 0800; | ||
LastUpgradeCheck = 0820; | ||
ORGANIZATIONNAME = "Kaishin & Co"; | ||
TargetAttributes = { | ||
9D98823619BC69CA00B790C6 = { | ||
|
@@ -170,6 +173,7 @@ | |
files = ( | ||
00DD26EB1DA5968500A0F683 /* EmptyViewController.swift in Sources */, | ||
9D98823F19BC69CA00B790C6 /* ViewController.swift in Sources */, | ||
00B2B8181E1DAB1C00A50D91 /* UIImageViewExtension.swift in Sources */, | ||
9D98823D19BC69CA00B790C6 /* AppDelegate.swift in Sources */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
|
@@ -190,8 +194,10 @@ | |
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
CLANG_WARN_EMPTY_BODY = YES; | ||
CLANG_WARN_ENUM_CONVERSION = YES; | ||
CLANG_WARN_INFINITE_RECURSION = YES; | ||
CLANG_WARN_INT_CONVERSION = YES; | ||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
CLANG_WARN_UNREACHABLE_CODE = YES; | ||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | ||
|
@@ -234,8 +240,10 @@ | |
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
CLANG_WARN_EMPTY_BODY = YES; | ||
CLANG_WARN_ENUM_CONVERSION = YES; | ||
CLANG_WARN_INFINITE_RECURSION = YES; | ||
CLANG_WARN_INT_CONVERSION = YES; | ||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
CLANG_WARN_UNREACHABLE_CODE = YES; | ||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import UIKit | ||
import Gifu | ||
|
||
extension UIImageView: GIFAnimatable { | ||
private struct AssociatedKeys { | ||
static var AnimatorKey = "gifu.animator.key" | ||
} | ||
|
||
override open func display(_ layer: CALayer) { | ||
updateImageIfNeeded() | ||
} | ||
|
||
public var animator: Animator? { | ||
get { | ||
guard let animator = objc_getAssociatedObject(self, &AssociatedKeys.AnimatorKey) as? Animator else { | ||
let animator = Animator(withDelegate: self) | ||
self.animator = animator | ||
return animator | ||
} | ||
|
||
return animator | ||
} | ||
|
||
set { | ||
objc_setAssociatedObject(self, &AssociatedKeys.AnimatorKey, newValue as Animator?, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -13,4 +13,3 @@ public class GIFImageView: UIImageView, GIFAnimatable { | |
updateImageIfNeeded() | ||
} | ||
} | ||
|
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
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.