Skip to content
Open
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
14 changes: 8 additions & 6 deletions Example/ImageSlideshow.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -592,7 +592,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -608,7 +608,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 5VWB99DS38;
INFOPLIST_FILE = ImageSlideshow/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
Expand All @@ -624,7 +624,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 5VWB99DS38;
INFOPLIST_FILE = ImageSlideshow/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
Expand All @@ -644,6 +644,7 @@
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -659,6 +660,7 @@
DEVELOPMENT_TEAM = 5VWB99DS38;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -684,7 +686,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = ImageSlideshow_framework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "io.zvo.ImageSlideshow-framework";
PRODUCT_NAME = ImageSlideshow;
Expand Down Expand Up @@ -713,7 +715,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = ImageSlideshow_framework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "io.zvo.ImageSlideshow-framework";
PRODUCT_NAME = ImageSlideshow;
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '10.0'
platform :ios, '13.0'
use_frameworks!

target 'ImageSlideshow_Example' do
Expand Down
70 changes: 34 additions & 36 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,43 +1,41 @@
PODS:
- AFNetworking (3.2.1):
- AFNetworking/NSURLSession (= 3.2.1)
- AFNetworking/Reachability (= 3.2.1)
- AFNetworking/Security (= 3.2.1)
- AFNetworking/Serialization (= 3.2.1)
- AFNetworking/UIKit (= 3.2.1)
- AFNetworking/NSURLSession (3.2.1):
- AFNetworking (4.0.1):
- AFNetworking/NSURLSession (= 4.0.1)
- AFNetworking/Reachability (= 4.0.1)
- AFNetworking/Security (= 4.0.1)
- AFNetworking/Serialization (= 4.0.1)
- AFNetworking/UIKit (= 4.0.1)
- AFNetworking/NSURLSession (4.0.1):
- AFNetworking/Reachability
- AFNetworking/Security
- AFNetworking/Serialization
- AFNetworking/Reachability (3.2.1)
- AFNetworking/Security (3.2.1)
- AFNetworking/Serialization (3.2.1)
- AFNetworking/UIKit (3.2.1):
- AFNetworking/Reachability (4.0.1)
- AFNetworking/Security (4.0.1)
- AFNetworking/Serialization (4.0.1)
- AFNetworking/UIKit (4.0.1):
- AFNetworking/NSURLSession
- Alamofire (5.2.1)
- AlamofireImage (4.1.0):
- Alamofire (~> 5.1)
- ImageSlideshow (1.9.0):
- ImageSlideshow/Core (= 1.9.0)
- ImageSlideshow/AFURL (1.9.0):
- AFNetworking (~> 3.0)
- Alamofire (5.10.2)
- AlamofireImage (4.3.0):
- Alamofire (~> 5.8)
- ImageSlideshow (1.9.3):
- ImageSlideshow/Core (= 1.9.3)
- ImageSlideshow/AFURL (1.9.3):
- AFNetworking (~> 4.0)
- ImageSlideshow/Core
- ImageSlideshow/Alamofire (1.9.0):
- ImageSlideshow/Alamofire (1.9.3):
- AlamofireImage (~> 4.0)
- ImageSlideshow/Core
- ImageSlideshow/Core (1.9.0)
- ImageSlideshow/Kingfisher (1.9.0):
- ImageSlideshow/Core (1.9.3)
- ImageSlideshow/Kingfisher (1.9.3):
- ImageSlideshow/Core
- Kingfisher (> 3.0)
- ImageSlideshow/SDWebImage (1.9.0):
- ImageSlideshow/SDWebImage (1.9.3):
- ImageSlideshow/Core
- SDWebImage (>= 3.7)
- Kingfisher (5.14.0):
- Kingfisher/Core (= 5.14.0)
- Kingfisher/Core (5.14.0)
- SDWebImage (5.8.1):
- SDWebImage/Core (= 5.8.1)
- SDWebImage/Core (5.8.1)
- Kingfisher (8.3.2)
- SDWebImage (5.21.0):
- SDWebImage/Core (= 5.21.0)
- SDWebImage/Core (5.21.0)

DEPENDENCIES:
- ImageSlideshow (from `../`)
Expand All @@ -59,13 +57,13 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057
Alamofire: e911732990610fe89af59ac0077f923d72dc3dfd
AlamofireImage: c4a2ba349885fb3064feb74d2e547bd42ce9be10
ImageSlideshow: a90cc3568a325cdf1bd543732a2cfcf6361d0dc1
Kingfisher: 7b64389a43139c903ec434788344c288217c792d
SDWebImage: e3eae2eda88578db0685a0c88597fdadd9433f05
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
AlamofireImage: 843953fa97bee5f561cf05d83abd759e590b068d
ImageSlideshow: 7ec9503e623329cb09a970418a02e42f8ef92827
Kingfisher: 0621d0ac0c78fecb19f6dc5303bde2b52abaf2f5
SDWebImage: f84b0feeb08d2d11e6a9b843cb06d75ebf5b8868

PODFILE CHECKSUM: 46015634277c8c8bfd78d1b363e41ea2dfd179d9
PODFILE CHECKSUM: 19810162c1a79de96d3684e707a993a0b605e6d7

COCOAPODS: 1.9.3
COCOAPODS: 1.16.2
8 changes: 4 additions & 4 deletions ImageSlideshow.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = "ImageSlideshow"
s.version = "1.9.2"
s.version = "1.9.3"
s.summary = "Image slideshow written in Swift with circular scrolling, timer and full screen viewer"

# This description is used to generate tags and improve search results.
Expand All @@ -28,7 +28,7 @@ Image slideshow is a Swift library providing customizable image slideshow with c
s.social_media_url = 'https://twitter.com/zvonicek'

s.swift_versions = ['4.0', '4.1', '4.2', '5', '5.1', '5.2']
s.platform = :ios, '8.0'
s.platform = :ios, '13.0'
s.requires_arc = true

s.subspec 'Core' do |core|
Expand All @@ -38,7 +38,7 @@ Image slideshow is a Swift library providing customizable image slideshow with c

s.subspec 'AFURL' do |subspec|
subspec.dependency 'ImageSlideshow/Core'
subspec.dependency 'AFNetworking', '~> 3.0'
subspec.dependency 'AFNetworking', '~> 4.0'
subspec.source_files = 'ImageSlideshow/Classes/InputSources/AFURLSource.swift'
end

Expand All @@ -64,7 +64,7 @@ Image slideshow is a Swift library providing customizable image slideshow with c
s.subspec 'Kingfisher' do |subspec|
subspec.dependency 'ImageSlideshow/Core'
subspec.dependency 'Kingfisher', '> 3.0'
subspec.platform = :ios, '10.0'
subspec.platform = :ios, '13.0'
subspec.source_files = 'ImageSlideshow/Classes/InputSources/KingfisherSource.swift'
end

Expand Down
18 changes: 11 additions & 7 deletions ImageSlideshow/Classes/InputSources/KingfisherSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ public class KingfisherSource: NSObject, InputSource {
/// - callback: Completion callback with an optional image
@objc
public func load(to imageView: UIImageView, with callback: @escaping (UIImage?) -> Void) {
imageView.kf.setImage(with: self.url, placeholder: self.placeholder, options: self.options, progressBlock: nil) { result in
switch result {
case .success(let image):
callback(image.image)
case .failure:
callback(self.placeholder)
Task { @MainActor in
imageView.kf.setImage(with: self.url, placeholder: self.placeholder, options: self.options, progressBlock: nil) { result in
switch result {
case .success(let image):
callback(image.image)
case .failure:
callback(self.placeholder)
}
}
}
}
Expand All @@ -70,6 +72,8 @@ public class KingfisherSource: NSObject, InputSource {
///
/// - Parameter imageView: UIImage view with the download task that should be canceled
public func cancelLoad(on imageView: UIImageView) {
imageView.kf.cancelDownloadTask()
Task { @MainActor in
imageView.kf.cancelDownloadTask()
}
}
}
4 changes: 2 additions & 2 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription
let package = Package(
name: "ImageSlideshow",
platforms: [
.iOS(.v10),
.iOS(.v13),
],
products: [
.library(
Expand All @@ -22,9 +22,9 @@ let package = Package(
targets: ["ImageSlideshowKingfisher"])
],
dependencies: [
.package(url: "https://github.com/onevcat/Kingfisher.git", from: "5.8.0"),
.package(url: "https://github.com/Alamofire/AlamofireImage.git", from: "4.0.0"),
.package(url: "https://github.com/SDWebImage/SDWebImage.git", from: "5.1.0")
.package(url: "https://github.com/onevcat/Kingfisher.git", from: "8.3.2"),
.package(url: "https://github.com/Alamofire/AlamofireImage.git", from: "5.10.2"),
.package(url: "https://github.com/SDWebImage/SDWebImage.git", from: "5.21.0")
],
targets: [
.target(
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ ImageSlideshow is available through [CocoaPods](http://cocoapods.org). To instal
it, simply add the following line to your Podfile:

```ruby
pod 'ImageSlideshow', '~> 1.9.0'
pod 'ImageSlideshow', '~> 1.9.3'
```

### Carthage
To integrate ImageSlideshow into your Xcode project using Carthage, specify it in your Cartfile:

```ruby
github "zvonicek/ImageSlideshow" ~> 1.9.0
github "zvonicek/ImageSlideshow" ~> 1.9.3
```

Carthage does not include InputSources for external providers (due to dependency on those providers) so you need to grab the one you need from `ImageSlideshow/Classes/InputSources` manually.
Expand Down