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: ios
iosuikittableviewreusebug
Fully configure reused cells (reset every mutable field)
Dequeued cells retain old state; set every visible property (including the empty case) or stale content leaks across rows.
PR: mobile-canon-2026-06Created: Jul 5, 2026
Bad example
Old codeswift
| 1 | if let img = item.image { cell.iv.image = img } // else keeps prev |
Explanation (EN)
Objašnjenje (HR)
Good example
New codeswift
| 1 | cell.iv.image = item.image ?? placeholder |
Explanation (EN)
Objašnjenje (HR)