Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace swifty gif #94

Merged
merged 5 commits into from
Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "Frameworks/SwiftyGif"]
path = Frameworks/SwiftyGif
url = https://github.com/kirualex/SwiftyGif
[submodule "Frameworks/Zoetrope"]
path = Frameworks/Zoetrope
url = https://github.com/JanGorman/Zoetrope
3 changes: 2 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type_name:
error: 50
excluded:
- id
- i

type_body_length:
- 600
Expand Down Expand Up @@ -51,4 +52,4 @@ disabled_rules:
- vertical_parameter_alignment

excluded:
- Frameworks/SwiftyGif
- Frameworks/Zoetrope
4 changes: 2 additions & 2 deletions Agrume.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "Agrume"
s.version = "5.2.0"
s.version = "5.2.1"
s.summary = "An iOS image viewer written in Swift."
s.swift_version = "4.2"

Expand All @@ -22,6 +22,6 @@ Pod::Spec.new do |s|

s.source_files = "Classes", "Agrume/*.swift"

s.dependency "SwiftyGif"
s.dependency "Zoetrope"

end
85 changes: 22 additions & 63 deletions Agrume.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
F2609E26209F06F800E0E93D /* AgrumeImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2609E25209F06F800E0E93D /* AgrumeImage.swift */; };
F2609E28209F2BC600E0E93D /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2609E27209F2BC600E0E93D /* Configuration.swift */; };
F2609E2A209F2E0200E0E93D /* UIKit+Agrume.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2609E29209F2E0200E0E93D /* UIKit+Agrume.swift */; };
F28DAB09215AC2F600386D57 /* Zoetrope.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F28DAB08215AC2A400386D57 /* Zoetrope.framework */; };
F2A51FF41B10E00700924912 /* Agrume.h in Headers */ = {isa = PBXBuildFile; fileRef = F2A51FF31B10E00700924912 /* Agrume.h */; settings = {ATTRIBUTES = (Public, ); }; };
F2A51FFA1B10E00700924912 /* Agrume.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2A51FEE1B10E00700924912 /* Agrume.framework */; };
F2A5200B1B10E29B00924912 /* Agrume.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2A5200A1B10E29B00924912 /* Agrume.swift */; };
Expand All @@ -22,12 +23,12 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
F2539B9820F22D5100062C80 /* PBXContainerItemProxy */ = {
F28DAB07215AC2A400386D57 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F2D7BA1020A47C6600D5EE66 /* SwiftyGif.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 3B18BAF31E289899009C125A;
remoteInfo = SwiftyGif;
containerPortal = F28DAB03215AC2A400386D57 /* Zoetrope.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 7777C76C215900AE005C1307;
remoteInfo = Zoetrope;
};
F2A51FFB1B10E00700924912 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
Expand All @@ -36,27 +37,6 @@
remoteGlobalIDString = F2A51FED1B10E00700924912;
remoteInfo = Agrume;
};
F2D7BA1620A47C6600D5EE66 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F2D7BA1020A47C6600D5EE66 /* SwiftyGif.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = FA29E9321CA9340E00E579D5;
remoteInfo = SwiftyGifExample;
};
F2D7BA1820A47C6600D5EE66 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F2D7BA1020A47C6600D5EE66 /* SwiftyGif.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = FA29E9461CA9340F00E579D5;
remoteInfo = SwiftyGifTests;
};
F2D7BA1A20A47C6600D5EE66 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F2D7BA1020A47C6600D5EE66 /* SwiftyGif.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3B18BAF41E289899009C125A;
remoteInfo = SwiftyGif;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
Expand All @@ -66,13 +46,13 @@
F2609E25209F06F800E0E93D /* AgrumeImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgrumeImage.swift; sourceTree = "<group>"; };
F2609E27209F2BC600E0E93D /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = "<group>"; };
F2609E29209F2E0200E0E93D /* UIKit+Agrume.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIKit+Agrume.swift"; sourceTree = "<group>"; };
F28DAB03215AC2A400386D57 /* Zoetrope.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Zoetrope.xcodeproj; path = Frameworks/Zoetrope/Zoetrope.xcodeproj; sourceTree = "<group>"; };
F2A51FEE1B10E00700924912 /* Agrume.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Agrume.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F2A51FF21B10E00700924912 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F2A51FF31B10E00700924912 /* Agrume.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Agrume.h; sourceTree = "<group>"; };
F2A51FF91B10E00700924912 /* AgrumeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AgrumeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
F2A51FFF1B10E00700924912 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F2A5200A1B10E29B00924912 /* Agrume.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Agrume.swift; sourceTree = "<group>"; };
F2D7BA1020A47C6600D5EE66 /* SwiftyGif.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SwiftyGif.xcodeproj; path = Frameworks/SwiftyGif/SwiftyGif.xcodeproj; sourceTree = "<group>"; };
F2D9598B1B1A108800073772 /* AgrumeCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AgrumeCell.swift; sourceTree = "<group>"; };
F2DC79D51B170C4B00818A8C /* ImageDownloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageDownloader.swift; sourceTree = "<group>"; };
F2EE29AD209F31B800F281A2 /* Foundation+Agrume.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Foundation+Agrume.swift"; sourceTree = "<group>"; };
Expand All @@ -83,6 +63,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F28DAB09215AC2F600386D57 /* Zoetrope.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -104,10 +85,18 @@
name = Frameworks;
sourceTree = "<group>";
};
F28DAB04215AC2A400386D57 /* Products */ = {
isa = PBXGroup;
children = (
F28DAB08215AC2A400386D57 /* Zoetrope.framework */,
);
name = Products;
sourceTree = "<group>";
};
F2A51FE41B10E00700924912 = {
isa = PBXGroup;
children = (
F2D7BA1020A47C6600D5EE66 /* SwiftyGif.xcodeproj */,
F28DAB03215AC2A400386D57 /* Zoetrope.xcodeproj */,
F2A51FF01B10E00700924912 /* Agrume */,
F2A51FFD1B10E00700924912 /* AgrumeTests */,
F2A51FEF1B10E00700924912 /* Products */,
Expand Down Expand Up @@ -169,16 +158,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
F2D7BA1120A47C6600D5EE66 /* Products */ = {
isa = PBXGroup;
children = (
F2D7BA1720A47C6600D5EE66 /* SwiftyGifExample.app */,
F2D7BA1920A47C6600D5EE66 /* SwiftyGifTests.xctest */,
F2D7BA1B20A47C6600D5EE66 /* SwiftyGif.framework */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -206,7 +185,6 @@
buildRules = (
);
dependencies = (
F2539B9920F22D5100062C80 /* PBXTargetDependency */,
);
name = Agrume;
productName = Agrume;
Expand Down Expand Up @@ -264,8 +242,8 @@
projectDirPath = "";
projectReferences = (
{
ProductGroup = F2D7BA1120A47C6600D5EE66 /* Products */;
ProjectRef = F2D7BA1020A47C6600D5EE66 /* SwiftyGif.xcodeproj */;
ProductGroup = F28DAB04215AC2A400386D57 /* Products */;
ProjectRef = F28DAB03215AC2A400386D57 /* Zoetrope.xcodeproj */;
},
);
projectRoot = "";
Expand All @@ -277,25 +255,11 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
F2D7BA1720A47C6600D5EE66 /* SwiftyGifExample.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = SwiftyGifExample.app;
remoteRef = F2D7BA1620A47C6600D5EE66 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F2D7BA1920A47C6600D5EE66 /* SwiftyGifTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = SwiftyGifTests.xctest;
remoteRef = F2D7BA1820A47C6600D5EE66 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F2D7BA1B20A47C6600D5EE66 /* SwiftyGif.framework */ = {
F28DAB08215AC2A400386D57 /* Zoetrope.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SwiftyGif.framework;
remoteRef = F2D7BA1A20A47C6600D5EE66 /* PBXContainerItemProxy */;
path = Zoetrope.framework;
remoteRef = F28DAB07215AC2A400386D57 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
Expand Down Expand Up @@ -362,11 +326,6 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
F2539B9920F22D5100062C80 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = SwiftyGif;
targetProxy = F2539B9820F22D5100062C80 /* PBXContainerItemProxy */;
};
F2A51FFC1B10E00700924912 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = F2A51FED1B10E00700924912 /* Agrume */;
Expand Down
6 changes: 3 additions & 3 deletions Agrume/AgrumeCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

import UIKit
import SwiftyGif
import Zoetrope

protocol AgrumeCellDelegate: AnyObject {

Expand Down Expand Up @@ -41,8 +41,8 @@ final class AgrumeCell: UICollectionViewCell {

var image: UIImage? {
didSet {
if image?.imageData != nil, let image = image {
imageView.setGifImage(image)
if image?.zoetrope != nil, let image = image {
imageView.displayGif(image)
} else {
imageView.image = image
}
Expand Down
2 changes: 1 addition & 1 deletion Agrume/ImageDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import UIKit
import ImageIO
import MobileCoreServices
import SwiftyGif
import Zoetrope

final class ImageDownloader {

Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "kirualex/SwiftyGif"
github "JanGorman/Zoetrope"
10 changes: 6 additions & 4 deletions Example/Agrume Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
E77809E31D17821400CC60F1 /* SingleImageModalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E77809E21D17821400CC60F1 /* SingleImageModalViewController.swift */; };
F20F5BD41B134CAF00F9F499 /* Agrume.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2A520401B130CC000924912 /* Agrume.framework */; };
F2539BCB20F23ABB00062C80 /* CloseButtonViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2539BCA20F23ABB00062C80 /* CloseButtonViewController.swift */; };
F2539BCC20F23F1800062C80 /* SwiftyGif.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2539B9D20F22D9000062C80 /* SwiftyGif.framework */; };
F2539BCD20F23F1800062C80 /* SwiftyGif.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F2539B9D20F22D9000062C80 /* SwiftyGif.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
F2539BD020F23F2F00062C80 /* Agrume.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F2A520401B130CC000924912 /* Agrume.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
F2539BD420F2418900062C80 /* CustomCloseButtonViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2539BD320F2418900062C80 /* CustomCloseButtonViewController.swift */; };
F28DAB0C215AC37A00386D57 /* Zoetrope.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F28DAB0B215AC37A00386D57 /* Zoetrope.framework */; };
F28DAB0D215AC37A00386D57 /* Zoetrope.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F28DAB0B215AC37A00386D57 /* Zoetrope.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
F2A5201B1B130C7E00924912 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2A5201A1B130C7E00924912 /* AppDelegate.swift */; };
F2A5201D1B130C7E00924912 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2A5201C1B130C7E00924912 /* ViewController.swift */; };
F2A520201B130C7E00924912 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F2A5201E1B130C7E00924912 /* Main.storyboard */; };
Expand Down Expand Up @@ -74,7 +74,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
F2539BCD20F23F1800062C80 /* SwiftyGif.framework in Embed Frameworks */,
F28DAB0D215AC37A00386D57 /* Zoetrope.framework in Embed Frameworks */,
F2539BD020F23F2F00062C80 /* Agrume.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
Expand All @@ -88,6 +88,7 @@
F2539B9D20F22D9000062C80 /* SwiftyGif.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftyGif.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F2539BCA20F23ABB00062C80 /* CloseButtonViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloseButtonViewController.swift; sourceTree = "<group>"; };
F2539BD320F2418900062C80 /* CustomCloseButtonViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomCloseButtonViewController.swift; sourceTree = "<group>"; };
F28DAB0B215AC37A00386D57 /* Zoetrope.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Zoetrope.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F2A520151B130C7E00924912 /* Agrume Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Agrume Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
F2A520191B130C7E00924912 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F2A5201A1B130C7E00924912 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -112,7 +113,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F2539BCC20F23F1800062C80 /* SwiftyGif.framework in Frameworks */,
F28DAB0C215AC37A00386D57 /* Zoetrope.framework in Frameworks */,
F20F5BD41B134CAF00F9F499 /* Agrume.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -138,6 +139,7 @@
F2A5200C1B130C7E00924912 = {
isa = PBXGroup;
children = (
F28DAB0B215AC37A00386D57 /* Zoetrope.framework */,
F2A5203A1B130CC000924912 /* Agrume.xcodeproj */,
F2A520171B130C7E00924912 /* Agrume Example */,
F2A5202D1B130C7E00924912 /* Agrume ExampleTests */,
Expand Down
6 changes: 4 additions & 2 deletions Example/Agrume Example/AnimatedGifViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

import UIKit
import Agrume
import SwiftyGif
import Zoetrope

final class AnimatedGifViewController: UIViewController {

@IBAction func openImage(_ sender: Any?) {
let image = UIImage(gifName: "animated.gif")
guard let image = UIImage(gifName: "animated.gif") else {
return
}
let agrume = Agrume(image: image, background: .blurred(.regular))
agrume.show(from: self)
}
Expand Down
1 change: 0 additions & 1 deletion Frameworks/SwiftyGif
Submodule SwiftyGif deleted from aa1979
1 change: 1 addition & 0 deletions Frameworks/Zoetrope
Submodule Zoetrope added at ca8dd6
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ This shows a way of keeping the zoomed library and the one in the background syn

### Animated gifs

Agrume bundles [SwiftyGif](https://github.com/kirualex/SwiftyGif) to display animated gifs. You use SwiftyGif's custom `UIImage` initializer:
Agrume bundles [Zoetrope](https://github.com/JanGorman/Zoetrope) to display animated gifs. You use Zoetrope's custom `UIImage` initializer:

```swift

Expand Down