Skip to content

Commit 3b3c84a

Browse files
committed
fix crash when using with other UIScrollView subclass
1 parent ad1ed87 commit 3b3c84a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CollectionKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "CollectionKit"
3-
s.version = "2.0.0"
3+
s.version = "2.0.1"
44
s.summary = "A modern swift framework for building data-driven reusable collection view components."
55

66
s.description = <<-DESC

Sources/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.0.0</string>
18+
<string>2.0.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

Sources/Other/CollectionReloadable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2017 lkzhao. All rights reserved.
77
//
88

9-
import Foundation
9+
import UIKit
1010

1111
public protocol CollectionReloadable: class {
1212
var collectionView: CollectionView? { get }
@@ -52,7 +52,7 @@ internal class CollectionViewManager {
5252
// UIScrollView has a weird behavior where its contentOffset resets to .zero when
5353
// frame is assigned.
5454
// this swizzling fixed the issue. where the scrollview would jump during scroll
55-
extension CollectionView {
55+
extension UIScrollView {
5656
@objc func collectionKitAdjustContentOffsetIfNecessary(_ animated: Bool) {
5757
guard !isDragging && !isDecelerating else { return }
5858
self.perform(#selector(CollectionView.collectionKitAdjustContentOffsetIfNecessary))

0 commit comments

Comments
 (0)