Skip to content

Commit

Permalink
Replace unmaintained moa library with SDWebImage
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-stephenson committed Oct 27, 2023
1 parent c3a89f3 commit ee55caf
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "norio-nomura/Base32" "0.9.0"
github "evgenyneu/moa" ~> 12.0
github "roberthein/TinyConstraints" ~> 4.0
github "SDWebImage/SDWebImage"
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "evgenyneu/moa" "12.0.0"
github "SDWebImage/SDWebImage" "5.18.4"
github "norio-nomura/Base32" "0.9.0"
github "roberthein/TinyConstraints" "4.0.2"
118 changes: 114 additions & 4 deletions FreeOTP.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
2800418823FC56E500256D27 /* SectionHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2800418723FC56E500256D27 /* SectionHeader.swift */; };
2820C85A23EE53CB002D3695 /* URILockViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2820C85923EE53CB002D3695 /* URILockViewController.swift */; };
282341B4245A13D000025167 /* RecommendedIconCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 282341B3245A13D000025167 /* RecommendedIconCell.swift */; };
282D9E492AEC102C000C6699 /* SDWebImage.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 282D9E482AEC102C000C6699 /* SDWebImage.xcframework */; };
282D9E4A2AEC102C000C6699 /* SDWebImage.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 282D9E482AEC102C000C6699 /* SDWebImage.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
282F614D2AD49328008A22F6 /* fa-solid-900.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 282F614A2AD49328008A22F6 /* fa-solid-900.ttf */; };
282F614E2AD49328008A22F6 /* fa-brands-400.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 282F614B2AD49328008A22F6 /* fa-brands-400.ttf */; };
282F614F2AD49328008A22F6 /* fa-regular-400.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 282F614C2AD49328008A22F6 /* fa-regular-400.ttf */; };
Expand Down Expand Up @@ -61,8 +63,6 @@
F1CA93DA1B56AB9500828B8B /* token.png in Resources */ = {isa = PBXBuildFile; fileRef = F1CA93D61B56AB9500828B8B /* token.png */; };
FC81F0CD278751A90094DEAC /* Base32.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC9C895B270B749C00A25825 /* Base32.xcframework */; };
FC81F0CE278751A90094DEAC /* Base32.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = FC9C895B270B749C00A25825 /* Base32.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
FC81F0D2278751AD0094DEAC /* moa.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC9C895A270B749C00A25825 /* moa.xcframework */; };
FC81F0D3278751AD0094DEAC /* moa.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = FC9C895A270B749C00A25825 /* moa.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
FC81F0D4278751AF0094DEAC /* TinyConstraints.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC9C8959270B749C00A25825 /* TinyConstraints.xcframework */; };
FC81F0D5278751AF0094DEAC /* TinyConstraints.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = FC9C8959270B749C00A25825 /* TinyConstraints.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -91,8 +91,8 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
FC81F0D3278751AD0094DEAC /* moa.xcframework in Embed Frameworks */,
FC81F0D5278751AF0094DEAC /* TinyConstraints.xcframework in Embed Frameworks */,
282D9E4A2AEC102C000C6699 /* SDWebImage.xcframework in Embed Frameworks */,
FC81F0CE278751A90094DEAC /* Base32.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
Expand All @@ -109,6 +109,49 @@
2800418723FC56E500256D27 /* SectionHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SectionHeader.swift; sourceTree = "<group>"; };
2820C85923EE53CB002D3695 /* URILockViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URILockViewController.swift; sourceTree = "<group>"; };
282341B3245A13D000025167 /* RecommendedIconCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendedIconCell.swift; sourceTree = "<group>"; };
282D9E1A2AEC0BDE000C6699 /* ManualInputTokenData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ManualInputTokenData.swift; sourceTree = "<group>"; };
282D9E1C2AEC0BDE000C6699 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
282D9E1D2AEC0BDE000C6699 /* token.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = token.png; sourceTree = "<group>"; };
282D9E1E2AEC0BDE000C6699 /* FontAwesomeIconCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontAwesomeIconCell.swift; sourceTree = "<group>"; };
282D9E1F2AEC0BDE000C6699 /* qrcode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = qrcode.png; sourceTree = "<group>"; };
282D9E202AEC0BDE000C6699 /* OTP.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OTP.swift; sourceTree = "<group>"; };
282D9E212AEC0BDE000C6699 /* lock.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lock.png; sourceTree = "<group>"; };
282D9E222AEC0BDE000C6699 /* URIParameters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URIParameters.swift; sourceTree = "<group>"; };
282D9E232AEC0BDE000C6699 /* URIMainIconViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URIMainIconViewController.swift; sourceTree = "<group>"; };
282D9E242AEC0BDE000C6699 /* URILockViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URILockViewController.swift; sourceTree = "<group>"; };
282D9E252AEC0BDE000C6699 /* URILabelViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URILabelViewController.swift; sourceTree = "<group>"; };
282D9E262AEC0BDE000C6699 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
282D9E272AEC0BDE000C6699 /* ScanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScanViewController.swift; sourceTree = "<group>"; };
282D9E292AEC0BDE000C6699 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
282D9E2A2AEC0BDE000C6699 /* TokenStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenStore.swift; sourceTree = "<group>"; };
282D9E2B2AEC0BDE000C6699 /* ImageDownloader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageDownloader.swift; sourceTree = "<group>"; };
282D9E2C2AEC0BDE000C6699 /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = "<group>"; };
282D9E2D2AEC0BDE000C6699 /* URIIconViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URIIconViewController.swift; sourceTree = "<group>"; };
282D9E2E2AEC0BDE000C6699 /* ManualToUrlcModule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ManualToUrlcModule.swift; sourceTree = "<group>"; };
282D9E2F2AEC0BDE000C6699 /* KeychainStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainStore.swift; sourceTree = "<group>"; };
282D9E302AEC0BDE000C6699 /* ManualAddViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ManualAddViewController.swift; sourceTree = "<group>"; };
282D9E312AEC0BDE000C6699 /* TokenIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenIcon.swift; sourceTree = "<group>"; };
282D9E322AEC0BDE000C6699 /* TokensViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokensViewController.swift; sourceTree = "<group>"; };
282D9E332AEC0BDE000C6699 /* EmptyStateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyStateView.swift; sourceTree = "<group>"; };
282D9E342AEC0BDE000C6699 /* UICollectionViewFlowLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UICollectionViewFlowLayout.swift; sourceTree = "<group>"; };
282D9E352AEC0BDE000C6699 /* TokenCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenCell.swift; sourceTree = "<group>"; };
282D9E362AEC0BDE000C6699 /* Style.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Style.swift; sourceTree = "<group>"; };
282D9E372AEC0BDE000C6699 /* Launch.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Launch.storyboard; sourceTree = "<group>"; };
282D9E382AEC0BDE000C6699 /* Device.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Device.swift; sourceTree = "<group>"; };
282D9E392AEC0BDE000C6699 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
282D9E3A2AEC0BDE000C6699 /* RTLSupport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RTLSupport.swift; sourceTree = "<group>"; };
282D9E3B2AEC0BDE000C6699 /* CircleProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleProgressView.swift; sourceTree = "<group>"; };
282D9E3C2AEC0BDE000C6699 /* RecommendedIconCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendedIconCell.swift; sourceTree = "<group>"; };
282D9E3D2AEC0BDE000C6699 /* Token.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Token.swift; sourceTree = "<group>"; };
282D9E3E2AEC0BDE000C6699 /* AboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = "<group>"; };
282D9E3F2AEC0BDE000C6699 /* default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = default.png; sourceTree = "<group>"; };
282D9E402AEC0BDE000C6699 /* FreeOTP-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FreeOTP-Bridging-Header.h"; sourceTree = "<group>"; };
282D9E412AEC0BDE000C6699 /* MainNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainNavigationController.swift; sourceTree = "<group>"; };
282D9E422AEC0BDE000C6699 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
282D9E432AEC0BDE000C6699 /* iTunesArtwork@2x */ = {isa = PBXFileReference; lastKnownFileType = file; path = "iTunesArtwork@2x"; sourceTree = "<group>"; };
282D9E442AEC0BDE000C6699 /* SectionHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SectionHeader.swift; sourceTree = "<group>"; };
282D9E452AEC0C94000C6699 /* SDWebImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDWebImage.framework; path = "Carthage/Build/SDWebImage.xcframework/ios-arm64_x86_64-simulator/SDWebImage.framework"; sourceTree = "<group>"; };
282D9E482AEC102C000C6699 /* SDWebImage.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = SDWebImage.xcframework; path = Carthage/Build/SDWebImage.xcframework; sourceTree = "<group>"; };
282F614A2AD49328008A22F6 /* fa-solid-900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "fa-solid-900.ttf"; path = "../../../Downloads/fontawesome-free-6.4.2-web/webfonts/fa-solid-900.ttf"; sourceTree = "<group>"; };
282F614B2AD49328008A22F6 /* fa-brands-400.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "fa-brands-400.ttf"; path = "../../../Downloads/fontawesome-free-6.4.2-web/webfonts/fa-brands-400.ttf"; sourceTree = "<group>"; };
282F614C2AD49328008A22F6 /* fa-regular-400.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "fa-regular-400.ttf"; path = "../../../Downloads/fontawesome-free-6.4.2-web/webfonts/fa-regular-400.ttf"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -183,8 +226,8 @@
F18FA53A1B571E4800B1CEAD /* CoreGraphics.framework in Frameworks */,
F18FA53E1B571E5D00B1CEAD /* Foundation.framework in Frameworks */,
F18FA5381B571E3B00B1CEAD /* Photos.framework in Frameworks */,
FC81F0D2278751AD0094DEAC /* moa.xcframework in Frameworks */,
F18FA53C1B571E5500B1CEAD /* UIKit.framework in Frameworks */,
282D9E492AEC102C000C6699 /* SDWebImage.xcframework in Frameworks */,
FC81F0CD278751A90094DEAC /* Base32.xcframework in Frameworks */,
FC81F0D4278751AF0094DEAC /* TinyConstraints.xcframework in Frameworks */,
);
Expand All @@ -200,6 +243,54 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
282D9E192AEC0BDE000C6699 /* FreeOTP */ = {
isa = PBXGroup;
children = (
282D9E1A2AEC0BDE000C6699 /* ManualInputTokenData.swift */,
282D9E1B2AEC0BDE000C6699 /* InfoPlist.strings */,
282D9E1D2AEC0BDE000C6699 /* token.png */,
282D9E1E2AEC0BDE000C6699 /* FontAwesomeIconCell.swift */,
282D9E1F2AEC0BDE000C6699 /* qrcode.png */,
282D9E202AEC0BDE000C6699 /* OTP.swift */,
282D9E212AEC0BDE000C6699 /* lock.png */,
282D9E222AEC0BDE000C6699 /* URIParameters.swift */,
282D9E232AEC0BDE000C6699 /* URIMainIconViewController.swift */,
282D9E242AEC0BDE000C6699 /* URILockViewController.swift */,
282D9E252AEC0BDE000C6699 /* URILabelViewController.swift */,
282D9E262AEC0BDE000C6699 /* Assets.xcassets */,
282D9E272AEC0BDE000C6699 /* ScanViewController.swift */,
282D9E282AEC0BDE000C6699 /* Main.storyboard */,
282D9E2A2AEC0BDE000C6699 /* TokenStore.swift */,
282D9E2B2AEC0BDE000C6699 /* ImageDownloader.swift */,
282D9E2C2AEC0BDE000C6699 /* ShareViewController.swift */,
282D9E2D2AEC0BDE000C6699 /* URIIconViewController.swift */,
282D9E2E2AEC0BDE000C6699 /* ManualToUrlcModule.swift */,
282D9E2F2AEC0BDE000C6699 /* KeychainStore.swift */,
282D9E302AEC0BDE000C6699 /* ManualAddViewController.swift */,
282D9E312AEC0BDE000C6699 /* TokenIcon.swift */,
282D9E322AEC0BDE000C6699 /* TokensViewController.swift */,
282D9E332AEC0BDE000C6699 /* EmptyStateView.swift */,
282D9E342AEC0BDE000C6699 /* UICollectionViewFlowLayout.swift */,
282D9E352AEC0BDE000C6699 /* TokenCell.swift */,
282D9E362AEC0BDE000C6699 /* Style.swift */,
282D9E372AEC0BDE000C6699 /* Launch.storyboard */,
282D9E382AEC0BDE000C6699 /* Device.swift */,
282D9E392AEC0BDE000C6699 /* AppDelegate.swift */,
282D9E3A2AEC0BDE000C6699 /* RTLSupport.swift */,
282D9E3B2AEC0BDE000C6699 /* CircleProgressView.swift */,
282D9E3C2AEC0BDE000C6699 /* RecommendedIconCell.swift */,
282D9E3D2AEC0BDE000C6699 /* Token.swift */,
282D9E3E2AEC0BDE000C6699 /* AboutViewController.swift */,
282D9E3F2AEC0BDE000C6699 /* default.png */,
282D9E402AEC0BDE000C6699 /* FreeOTP-Bridging-Header.h */,
282D9E412AEC0BDE000C6699 /* MainNavigationController.swift */,
282D9E422AEC0BDE000C6699 /* Info.plist */,
282D9E432AEC0BDE000C6699 /* iTunesArtwork@2x */,
282D9E442AEC0BDE000C6699 /* SectionHeader.swift */,
);
path = FreeOTP;
sourceTree = "<group>";
};
89F8EFF9256BA8CB00460AA9 /* FreeOTPUITests */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -326,6 +417,9 @@
FC9C8958270B749C00A25825 /* Frameworks */ = {
isa = PBXGroup;
children = (
282D9E482AEC102C000C6699 /* SDWebImage.xcframework */,
282D9E452AEC0C94000C6699 /* SDWebImage.framework */,
282D9E192AEC0BDE000C6699 /* FreeOTP */,
FC9C895B270B749C00A25825 /* Base32.xcframework */,
FC9C895C270B749C00A25825 /* FontAwesome.xcframework */,
FC9C895A270B749C00A25825 /* moa.xcframework */,
Expand Down Expand Up @@ -548,6 +642,22 @@
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
282D9E1B2AEC0BDE000C6699 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
282D9E1C2AEC0BDE000C6699 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
282D9E282AEC0BDE000C6699 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
282D9E292AEC0BDE000C6699 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
F10D88C71B56A3C400482D15 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
Expand Down
31 changes: 10 additions & 21 deletions FreeOTP/ImageDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
// limitations under the License.
//

import moa
import Foundation
import Photos
import UIKit
import SDWebImage

class ImageDownloader : NSObject {
fileprivate let DEFAULT = UIImage(contentsOfFile: Bundle.main.path(forResource: "default", ofType: "png")!)!
Expand Down Expand Up @@ -87,7 +87,7 @@ class ImageDownloader : NSObject {
return completion(DEFAULT)
}

func fromURL(_ url: URL, completion: @escaping (UIImage) -> Void) {
func fromURL(_ url: URL, _ iv: UIImageView, completion: @escaping (UIImage) -> Void) {
switch url.scheme! {
case "file":
if let img = UIImage(contentsOfFile: url.path) {
Expand All @@ -100,32 +100,21 @@ class ImageDownloader : NSObject {
case "http":
fallthrough
case "https":
let moa = Moa()

moa.onError = {
(e, r) -> () in
moa.errorImage = nil // Keep a strong reference to moa
completion(self.DEFAULT)
}

moa.onSuccess = {
(i: MoaImage) -> MoaImage? in
moa.errorImage = nil // Keep a strong reference to moa
completion(i)
return nil
}

moa.url = url.absoluteString
iv.sd_setImage(with: url, placeholderImage: self.DEFAULT,
completed: { (image, error, cacheType, url) in
if let image {
completion(image)
}
})
return

default:
break
}

return completion(DEFAULT)
}

func fromURI(_ uri: String?, completion: @escaping (UIImage) -> Void) {
func fromURI(_ uri: String?, _ iv: UIImageView, completion: @escaping (UIImage) -> Void) {
if var u = uri {
if u.hasPrefix("phasset:") {
let id = String(u[u.index(u.startIndex, offsetBy: "phasset:".count)...])
Expand All @@ -142,7 +131,7 @@ class ImageDownloader : NSObject {
}

if let remote = URL(string: u) {
return fromURL(remote, completion: completion)
return fromURL(remote, iv, completion: completion)
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions FreeOTP/TokensViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class TokensViewController : UICollectionViewController, UICollectionViewDelegat
// the tokens array
private var tokensArray: [Token]! = [] // contains all the tokens as loaded from the store
private var searchedTokensArray: [Token]! = [] // contains the filtered tokens

// search params
private var searchingTokens = false

override func numberOfSections(in collectionView: UICollectionView) -> Int {
return 1
}
Expand All @@ -66,7 +66,7 @@ class TokensViewController : UICollectionViewController, UICollectionViewDelegat
if image.hasSuffix("/FreeOTP.app/default.png") {
cell.imageView.image = defaultIcon
} else {
ImageDownloader(imageSize).fromURI(token.image, completion: {
ImageDownloader(imageSize).fromURI(token.image, cell.imageView, completion: {
(image: UIImage) -> Void in
UIView.animate(withDuration: 0.3, animations: {
cell.imageView.image = image.addImagePadding(x: 30, y: 30)
Expand Down

0 comments on commit ee55caf

Please sign in to comment.