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 ruleP1stack specificStack: mobile
mobileperformancemapscellsmemory
Never put a live MapView inside a reusable cell
Embedding MKMapView/MapView in a recycled list cell spikes memory and stutters; render a cached static map image (with annotation) instead.
PR: mobile-mining-2026-06Created: Jul 5, 2026
Bad example
Old codeswift
| 1 | // FavouriteStoreCell contains an MKMapView |
Explanation (EN)
Objašnjenje (HR)
Good example
New codeswift
| 1 | // render + cache a static map snapshot image, show that in the cell |
Explanation (EN)
Objašnjenje (HR)