Skip to content

Commit 9b39a3a

Browse files
committed
Move UIKit integration into it’s own target
1 parent 452f683 commit 9b39a3a

33 files changed

+652
-233
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ DerivedData
2222

2323
# Bundler
2424
.bundle
25+
/.swiftpm

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
- `ImageSource` is now a class instead of a struct. Originally I used a struct to get the best performance possible. However the performance penalty for using an extra class is very small and image sources use reference semantics because they can be updated as they are downloaded. This should make the interface cleaner and easier to reason about.
44
- `ImageSource` properties for both the image and individual images are no longer optional.
5-
- Animation properties now support animated HEIC files. This is available for iOS 13/macOS 10.15/etc only.
5+
- Animation properties now support animated HEIC files. This is available for iOS 13/macOS 10.15/etc only.
6+
- UIKit integration, including `ImageSourceView`, are now in their own target. This is to allow the SwiftUI integration to use the same name for it's view.

Example/ImageIOSwift/ImageSourceViewController.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import UIKit
1010
import ImageIOSwift
11+
import ImageIOUIKit
1112

1213

1314
class ImageSourceViewController: UIViewController {

Example/ImageIOSwift/ProgressiveLoadViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ProgressiveLoadViewController: ImageSourceViewController {
5656
self.task = task
5757

5858
if #available(iOS 11.0, *) {
59-
progressObserver = task.sessionTask?.progress.observe(\.fractionCompleted, changeHandler: { [weak self] (progress, _) in
59+
progressObserver = task.sessionTask.progress.observe(\.fractionCompleted, changeHandler: { [weak self] (progress, _) in
6060
DispatchQueue.main.async {
6161
let percent = Int(round(progress.fractionCompleted * 100))
6262
self?.statusLabel.text = "\(task.imageSource.status) (\(percent)%)"

Example/Podfile

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use_frameworks!
33

44
target 'ImageIOSwift_Example' do
55
pod 'ImageIOSwift', :path => '../'
6+
pod 'ImageIOUIKit', :path => '../'
67

78
target 'ImageIOSwift_Tests' do
89
inherit! :search_paths

Example/Podfile.lock

+9-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ PODS:
44
- FBSnapshotTestCase/Core (2.1.4)
55
- FBSnapshotTestCase/SwiftSupport (2.1.4):
66
- FBSnapshotTestCase/Core
7-
- ImageIOSwift (0.5.0)
7+
- ImageIOSwift (1.0.0)
8+
- ImageIOUIKit (1.0.0):
9+
- ImageIOSwift (~> 1.0)
810

911
DEPENDENCIES:
1012
- FBSnapshotTestCase (~> 2.1.4)
1113
- ImageIOSwift (from `../`)
14+
- ImageIOUIKit (from `../`)
1215

1316
SPEC REPOS:
1417
https://github.com/cocoapods/specs.git:
@@ -17,11 +20,14 @@ SPEC REPOS:
1720
EXTERNAL SOURCES:
1821
ImageIOSwift:
1922
:path: "../"
23+
ImageIOUIKit:
24+
:path: "../"
2025

2126
SPEC CHECKSUMS:
2227
FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a
23-
ImageIOSwift: 48e0dbb2632a81de9f27701737c668d9a237d935
28+
ImageIOSwift: ec8629d463d197346b92b9e3250e57451b8be6f0
29+
ImageIOUIKit: 8b293327f917dee8fc6bb7547c1b593d00f4c7ee
2430

25-
PODFILE CHECKSUM: 2c5ada80341fcd6c217d3e7f26bf02206e0cee02
31+
PODFILE CHECKSUM: cf994bd9d49ff3b43afe8141171e33b3d73677e4
2632

2733
COCOAPODS: 1.7.2

Example/Pods/Local Podspecs/ImageIOSwift.podspec.json

+2-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Local Podspecs/ImageIOUIKit.podspec.json

+32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Manifest.lock

+9-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)