DevPrep

All topics › Real interview tasks

A table view stutters while scrolling — what do you do?

Middle PRO

Measure first

Don't guess, profile: Instruments → Animation Hitches (shows which frame stage dropped: commit, render, main thread) and Time Profiler (what exactly occupies the main thread). In Xcode — Debug View Hierarchy and the colour overlays "Color Blended Layers" / "Color Offscreen-Rendered". At 120 Hz a frame has only 8 ms.

The rest of this answer, with code and interview follow-ups, is in the DevPrep app.

Read the full answer in DevPrep

Practice this before your interview

DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.

Get DevPrep on the App Store