Daily iOS
iOS system design

Image grid discovery screen

Design a discovery screen full of thumbnail tiles, like Snapchat Discover. It scrolls infinitely and every tile shows a network image. Focus on which thread does the image decoding and how you cap memory.

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Fetch the feed with cursor pagination, and let an ImageLoader actor go memory NSCache → disk cache → network with request merging and Task cancellation. Decode in the background, downsampled to the tile size, prefetch the next screenful, and cap memory with an NSCache limit and memory warnings.

Share a question