diff --git a/Sources/Collections/CollectionSkeletonProtocol.swift b/Sources/Collections/CollectionSkeletonProtocol.swift index a9f5821b..1b5bb44a 100644 --- a/Sources/Collections/CollectionSkeletonProtocol.swift +++ b/Sources/Collections/CollectionSkeletonProtocol.swift @@ -18,15 +18,14 @@ protocol CollectionSkeleton { func addDummyDataSource() func removeDummyDataSource(reloadAfter: Bool) - func disableScrolling() - func enableScrolling() + func disableUserInteraction() + func enableUserInteraction() } extension CollectionSkeleton where Self: UIScrollView { var estimatedNumberOfRows: Int { return 0 } func addDummyDataSource() {} func removeDummyDataSource(reloadAfter: Bool) {} - func disableScrolling() { isScrollEnabled = false } - func enableScrolling() { isScrollEnabled = true } - + func disableUserInteraction() { isUserInteractionEnabled = false } + func enableUserInteraction() { isUserInteractionEnabled = true } } diff --git a/Sources/Collections/UIView+CollectionSkeleton.swift b/Sources/Collections/UIView+CollectionSkeleton.swift index 8e2e6b43..d1d266db 100644 --- a/Sources/Collections/UIView+CollectionSkeleton.swift +++ b/Sources/Collections/UIView+CollectionSkeleton.swift @@ -12,12 +12,12 @@ extension UIView { func addDummyDataSourceIfNeeded() { guard let collection = self as? CollectionSkeleton else { return } collection.addDummyDataSource() - collection.disableScrolling() + collection.disableUserInteraction() } func removeDummyDataSourceIfNeeded(reloadAfter reload: Bool = true) { guard let collection = self as? CollectionSkeleton else { return } collection.removeDummyDataSource(reloadAfter: reload) - collection.enableScrolling() + collection.enableUserInteraction() } }