Skip to content

Commit

Permalink
Back to SwiftyGif
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGorman committed Oct 19, 2018
1 parent b7cd2d9 commit 8882fe7
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 40 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
@@ -1,3 +1,3 @@
[submodule "Frameworks/Zoetrope"]
path = Frameworks/Zoetrope
url = https://github.com/JanGorman/Zoetrope
[submodule "Frameworks/SwiftyGif"]
path = Frameworks/SwiftyGif
url = git@github.com:kirualex/SwiftyGif.git
2 changes: 1 addition & 1 deletion .swiftlint.yml
Expand Up @@ -52,4 +52,4 @@ disabled_rules:
- vertical_parameter_alignment

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

s.name = "Agrume"
s.version = "5.2.1"
s.version = "5.2.2"
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 "Zoetrope"
s.dependency "SwiftyGif"

end
66 changes: 48 additions & 18 deletions Agrume.xcodeproj/project.pbxproj
Expand Up @@ -7,13 +7,13 @@
objects = {

/* Begin PBXBuildFile section */
771DA7322179E26000541206 /* SwiftyGif.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 771DA7312179E24900541206 /* SwiftyGif.framework */; };
94318E541D32612D0096215A /* AgrumeServiceLocator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94318E531D32612D0096215A /* AgrumeServiceLocator.swift */; };
F2539BA120F22E7700062C80 /* AgrumeOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2539BA020F22E7700062C80 /* AgrumeOverlayView.swift */; };
F2609E23209F047200E0E93D /* AgrumeDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2609E22209F047200E0E93D /* AgrumeDataSource.swift */; };
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 @@ -23,12 +23,26 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
F28DAB07215AC2A400386D57 /* PBXContainerItemProxy */ = {
771DA72C2179E24900541206 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F28DAB03215AC2A400386D57 /* Zoetrope.xcodeproj */;
containerPortal = 771DA7262179E24800541206 /* SwiftyGif.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 7777C76C215900AE005C1307;
remoteInfo = Zoetrope;
remoteGlobalIDString = FA29E9321CA9340E00E579D5;
remoteInfo = SwiftyGifExample;
};
771DA72E2179E24900541206 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 771DA7262179E24800541206 /* SwiftyGif.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = FA29E9461CA9340F00E579D5;
remoteInfo = SwiftyGifTests;
};
771DA7302179E24900541206 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 771DA7262179E24800541206 /* SwiftyGif.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3B18BAF41E289899009C125A;
remoteInfo = SwiftyGif;
};
F2A51FFB1B10E00700924912 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
Expand All @@ -40,13 +54,13 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
771DA7262179E24800541206 /* SwiftyGif.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SwiftyGif.xcodeproj; path = Frameworks/SwiftyGif/SwiftyGif.xcodeproj; sourceTree = "<group>"; };
94318E531D32612D0096215A /* AgrumeServiceLocator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AgrumeServiceLocator.swift; sourceTree = "<group>"; };
F2539BA020F22E7700062C80 /* AgrumeOverlayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgrumeOverlayView.swift; sourceTree = "<group>"; };
F2609E22209F047200E0E93D /* AgrumeDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgrumeDataSource.swift; sourceTree = "<group>"; };
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>"; };
Expand All @@ -63,7 +77,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F28DAB09215AC2F600386D57 /* Zoetrope.framework in Frameworks */,
771DA7322179E26000541206 /* SwiftyGif.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -78,25 +92,27 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
F2539B9A20F22D6F00062C80 /* Frameworks */ = {
771DA7272179E24800541206 /* Products */ = {
isa = PBXGroup;
children = (
771DA72D2179E24900541206 /* SwiftyGifExample.app */,
771DA72F2179E24900541206 /* SwiftyGifTests.xctest */,
771DA7312179E24900541206 /* SwiftyGif.framework */,
);
name = Frameworks;
name = Products;
sourceTree = "<group>";
};
F28DAB04215AC2A400386D57 /* Products */ = {
F2539B9A20F22D6F00062C80 /* Frameworks */ = {
isa = PBXGroup;
children = (
F28DAB08215AC2A400386D57 /* Zoetrope.framework */,
);
name = Products;
name = Frameworks;
sourceTree = "<group>";
};
F2A51FE41B10E00700924912 = {
isa = PBXGroup;
children = (
F28DAB03215AC2A400386D57 /* Zoetrope.xcodeproj */,
771DA7262179E24800541206 /* SwiftyGif.xcodeproj */,
F2A51FF01B10E00700924912 /* Agrume */,
F2A51FFD1B10E00700924912 /* AgrumeTests */,
F2A51FEF1B10E00700924912 /* Products */,
Expand Down Expand Up @@ -242,8 +258,8 @@
projectDirPath = "";
projectReferences = (
{
ProductGroup = F28DAB04215AC2A400386D57 /* Products */;
ProjectRef = F28DAB03215AC2A400386D57 /* Zoetrope.xcodeproj */;
ProductGroup = 771DA7272179E24800541206 /* Products */;
ProjectRef = 771DA7262179E24800541206 /* SwiftyGif.xcodeproj */;
},
);
projectRoot = "";
Expand All @@ -255,11 +271,25 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
F28DAB08215AC2A400386D57 /* Zoetrope.framework */ = {
771DA72D2179E24900541206 /* SwiftyGifExample.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = SwiftyGifExample.app;
remoteRef = 771DA72C2179E24900541206 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
771DA72F2179E24900541206 /* SwiftyGifTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = SwiftyGifTests.xctest;
remoteRef = 771DA72E2179E24900541206 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
771DA7312179E24900541206 /* SwiftyGif.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Zoetrope.framework;
remoteRef = F28DAB07215AC2A400386D57 /* PBXContainerItemProxy */;
path = SwiftyGif.framework;
remoteRef = 771DA7302179E24900541206 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
Expand Down
6 changes: 3 additions & 3 deletions Agrume/AgrumeCell.swift
Expand Up @@ -3,7 +3,7 @@
//

import UIKit
import Zoetrope
import SwiftyGif

protocol AgrumeCellDelegate: AnyObject {

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

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

final class ImageDownloader {

Expand Down
2 changes: 1 addition & 1 deletion Cartfile
@@ -1 +1 @@
github "JanGorman/Zoetrope"
github "kirualex/SwiftyGif"
10 changes: 4 additions & 6 deletions Example/Agrume Example.xcodeproj/project.pbxproj
Expand Up @@ -7,14 +7,13 @@
objects = {

/* Begin PBXBuildFile section */
771DA7342179EF1800541206 /* SwiftyGif.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 771DA7332179EF1800541206 /* SwiftyGif.framework */; };
94D6B2121E1411B100927735 /* SingeImageBackgroundColorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94D6B2111E1411B100927735 /* SingeImageBackgroundColorViewController.swift */; };
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 */; };
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 +73,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
F28DAB0D215AC37A00386D57 /* Zoetrope.framework in Embed Frameworks */,
F2539BD020F23F2F00062C80 /* Agrume.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
Expand All @@ -83,12 +81,12 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
771DA7332179EF1800541206 /* SwiftyGif.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftyGif.framework; sourceTree = BUILT_PRODUCTS_DIR; };
94D6B2111E1411B100927735 /* SingeImageBackgroundColorViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SingeImageBackgroundColorViewController.swift; sourceTree = "<group>"; };
E77809E21D17821400CC60F1 /* SingleImageModalViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SingleImageModalViewController.swift; sourceTree = "<group>"; };
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 @@ -113,7 +111,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F28DAB0C215AC37A00386D57 /* Zoetrope.framework in Frameworks */,
771DA7342179EF1800541206 /* SwiftyGif.framework in Frameworks */,
F20F5BD41B134CAF00F9F499 /* Agrume.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -131,6 +129,7 @@
F2539B9C20F22D9000062C80 /* Frameworks */ = {
isa = PBXGroup;
children = (
771DA7332179EF1800541206 /* SwiftyGif.framework */,
F2539B9D20F22D9000062C80 /* SwiftyGif.framework */,
);
name = Frameworks;
Expand All @@ -139,7 +138,6 @@
F2A5200C1B130C7E00924912 = {
isa = PBXGroup;
children = (
F28DAB0B215AC37A00386D57 /* Zoetrope.framework */,
F2A5203A1B130CC000924912 /* Agrume.xcodeproj */,
F2A520171B130C7E00924912 /* Agrume Example */,
F2A5202D1B130C7E00924912 /* Agrume ExampleTests */,
Expand Down
6 changes: 2 additions & 4 deletions Example/Agrume Example/AnimatedGifViewController.swift
Expand Up @@ -4,14 +4,12 @@

import UIKit
import Agrume
import Zoetrope
import SwiftyGif

final class AnimatedGifViewController: UIViewController {

@IBAction func openImage(_ sender: Any?) {
guard let image = UIImage(gifName: "animated.gif") else {
return
}
let image = UIImage(gifName: "animated.gif")
let agrume = Agrume(image: image, background: .blurred(.regular))
agrume.show(from: self)
}
Expand Down
1 change: 1 addition & 0 deletions Frameworks/SwiftyGif
Submodule SwiftyGif added at aa1979
1 change: 0 additions & 1 deletion Frameworks/Zoetrope
Submodule Zoetrope deleted from ca8dd6

0 comments on commit 8882fe7

Please sign in to comment.