Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
mobile ruleP2stack specificStack: ios
ioscollectionviewperformancelayout
Use .absolute over .estimated for fixed-size collection layout items
When an item's height is fixed (e.g. single-line label), use NSCollectionLayoutDimension.absolute instead of .estimated to skip self-sizing recalculation and scroll more smoothly.
PR: mobile-mining-2026-06Created: Jul 5, 2026
Bad example
Old codeswift
| 1 | .heightDimension = .estimated(44) |
Explanation (EN)
Objašnjenje (HR)
Good example
New codeswift
| 1 | .heightDimension = .absolute(44) |
Explanation (EN)
Objašnjenje (HR)