Answer
First diagnosis step
Define the cell's full visual contract. Bugs during fast scrolling usually come from configuration state that leaks across reuse or from asynchronous work finishing after the cell has been reassigned.
Checklist
- Reset every transient visual property in
prepareForReuse(). - Cancel image work or task handles tied to the previous model.
- Make configuration idempotent so calling it repeatedly does not compound state.
Example
override func prepareForReuse() {
super.prepareForReuse()
imageTask?.cancel()
imageTask = nil
thumbnailView.image = nil
badgeLabel.isHidden = true
}What a strong answer sounds like
It is methodical. You explain how you would reproduce the bug, narrow the surface area, and separate reuse, async loading, and model identity as distinct causes.