Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions MagazineLayout/Public/MagazineLayoutInvalidationContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ import UIKit
/// Used to indicate that collection view properties and/or delegate layout metrics changed.
public final class MagazineLayoutInvalidationContext: UICollectionViewLayoutInvalidationContext {

/// Indicates whether to recompute the positions and sizes of elements based on the current
/// collection view and delegate layout metrics.
public var invalidateLayoutMetrics = true
/// A temporary flag to enable safely testing a change to how layout invalidation works.
public static var _invalidateLayoutMetricsDefaultValue = true

/// Indicates whether to recompute the positions and sizes of elements based on the current collection view and delegate layout
/// metrics.
///
/// Defaults to `false`. Set to `true` when delegate-provided layout values (e.g. item size
/// modes, header/footer visibility, section metrics) have changed and the layout needs to
/// re-query the delegate.
public var invalidateLayoutMetrics = _invalidateLayoutMetricsDefaultValue

}
Loading