Skip to content

Commit 96222ec

Browse files
authored
Merge pull request #19 from imodeveloperlab/fix/Code-overview
Code overview
2 parents 7bed158 + c7b6aeb commit 96222ec

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

DSKitExplorer/DSKitExplorer.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ let package = Package(
2828
name: "DSKit",
2929
dependencies: ["Cartography",
3030
"Kingfisher",
31-
.product(name: "ActiveLabel", package: "ActiveLabel.swift")]
31+
.product(name: "ActiveLabel", package: "ActiveLabel.swift")],
32+
resources: [
33+
.process("Appearance/Fonts/Noteworthy.plist"),
34+
.process("Appearance/Fonts/HoeflerText.plist")
35+
]
3236
),
3337
.target(
3438
name: "DSKitFakery",

Sources/DSKit/ViewModels/PageControl/DSPageControlUIView.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,18 @@ final class DSPageControlUIView: UIView, DSReusableUIView {
6363
// optional: cancel task
6464
updatePageTask?.cancel()
6565

66-
updatePageTask = DispatchWorkItem {
66+
updatePageTask = DispatchWorkItem { [weak self] in
67+
68+
guard let self = self else { return }
6769

6870
guard let itemsWidth = items.first?.bounds.width else {
6971
return
7072
}
7173

7274
let page = Int((position.x + (itemsWidth / 2)) / itemsWidth)
7375

74-
if pageControl.currentPage != page {
75-
pageControl.currentPage = page
76+
if self.pageControl.currentPage != page {
77+
self.pageControl.currentPage = page
7678
}
7779
}
7880

0 commit comments

Comments
 (0)