diff --git a/Sources/Collections/CollectionSkeletonProtocol.swift b/Sources/Collections/CollectionSkeletonProtocol.swift index a5724a6..e5d5a0b 100644 --- a/Sources/Collections/CollectionSkeletonProtocol.swift +++ b/Sources/Collections/CollectionSkeletonProtocol.swift @@ -29,6 +29,6 @@ extension CollectionSkeleton where Self: UIScrollView { var estimatedNumberOfRows: Int { return 0 } func addDummyDataSource() {} func removeDummyDataSource(reloadAfter: Bool) {} - func disableUserInteraction() { isScrollEnabled = false } - func enableUserInteraction() { isScrollEnabled = true } + func disableUserInteraction() { isUserInteractionEnabled = false; isScrollEnabled = false } + func enableUserInteraction() { isUserInteractionEnabled = true; isScrollEnabled = true } } diff --git a/Sources/Collections/UIView+CollectionSkeleton.swift b/Sources/Collections/UIView+CollectionSkeleton.swift index ca32213..a293aeb 100644 --- a/Sources/Collections/UIView+CollectionSkeleton.swift +++ b/Sources/Collections/UIView+CollectionSkeleton.swift @@ -11,6 +11,7 @@ import UIKit extension UIView { func addDummyDataSourceIfNeeded() { guard let collection = self as? CollectionSkeleton else { return } + status = .on collection.addDummyDataSource() collection.disableUserInteraction() } @@ -22,6 +23,7 @@ extension UIView { func removeDummyDataSourceIfNeeded(reloadAfter reload: Bool = true) { guard let collection = self as? CollectionSkeleton else { return } + status = .off collection.removeDummyDataSource(reloadAfter: reload) collection.enableUserInteraction() } diff --git a/Sources/Transitions/UIView+Transitions.swift b/Sources/Transitions/UIView+Transitions.swift index efb7a88..619e3b4 100644 --- a/Sources/Transitions/UIView+Transitions.swift +++ b/Sources/Transitions/UIView+Transitions.swift @@ -7,6 +7,7 @@ extension CALayer { insertSublayer(layer.contentLayer, at: idx) switch transition { case .none: + completion?() break case .crossDissolve(let duration): layer.contentLayer.setOpacity(from: 0, to: 1, duration: duration, completion: completion)