diff --git a/ListableUI/Sources/Layout/ListLayout/ListLayout+Layout.swift b/ListableUI/Sources/Layout/ListLayout/ListLayout+Layout.swift index 57fc3185..4ecc3d95 100644 --- a/ListableUI/Sources/Layout/ListLayout/ListLayout+Layout.swift +++ b/ListableUI/Sources/Layout/ListLayout/ListLayout+Layout.swift @@ -11,9 +11,6 @@ import UIKit extension ListProperties { - private static let headerFooterMeasurementCache = ReusableViewCache() - private static let itemMeasurementCache = ReusableViewCache() - /// **Note**: For testing or measuring content sizes only. /// /// Uses the properties from the list properties to create a `PresentationState` @@ -37,8 +34,8 @@ extension ListProperties { } }(), environment: self.environment, - itemMeasurementCache: Self.itemMeasurementCache, - headerFooterMeasurementCache: Self.headerFooterMeasurementCache + itemMeasurementCache: ReusableViewCache(), + headerFooterMeasurementCache: ReusableViewCache() ) /// 2) Create the layout used to measure the content. diff --git a/ListableUI/Sources/ListView/ListView+ContentSize.swift b/ListableUI/Sources/ListView/ListView+ContentSize.swift index f48d69b0..74e012cd 100644 --- a/ListableUI/Sources/ListView/ListView+ContentSize.swift +++ b/ListableUI/Sources/ListView/ListView+ContentSize.swift @@ -13,10 +13,7 @@ extension ListView // // MARK: Measuring Lists // - - static let headerFooterMeasurementCache = ReusableViewCache() - static let itemMeasurementCache = ReusableViewCache() - + public static let defaultContentSizeItemLimit = 50 /// diff --git a/ListableUI/Sources/ListView/ListView.Delegate.swift b/ListableUI/Sources/ListView/ListView.Delegate.swift index 66a39143..c3e6325e 100644 --- a/ListableUI/Sources/ListView/ListView.Delegate.swift +++ b/ListableUI/Sources/ListView/ListView.Delegate.swift @@ -15,12 +15,7 @@ extension ListView unowned var view : ListView! unowned var presentationState : PresentationState! unowned var layoutManager : LayoutManager! - - private let itemMeasurementCache = ReusableViewCache() - private let headerFooterMeasurementCache = ReusableViewCache() - - private let headerFooterViewCache = ReusableViewCache() - + // MARK: UICollectionViewDelegate func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool