PracHub
QuestionsPremiumLearningGuidesInterview PrepCoaches
|Home/Software Engineering Fundamentals/Snapchat

Implement an iOS scrollable grid with navigation

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's proficiency with iOS UI layout and interaction, including grid layout and maintaining square cells, state management and data propagation between views, touch handling, and navigation using mobile UI frameworks.

  • hard
  • Snapchat
  • Software Engineering Fundamentals
  • Software Engineer

Implement an iOS scrollable grid with navigation

Company: Snapchat

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Onsite

You are building a small iOS prototype in Xcode (Swift). You may use **SwiftUI or UIKit**. Implement a **scrollable square grid** of cells. Incrementally add the following requirements: 1. **Fixed grid** - Render a grid with a fixed number of rows/columns. - Each cell is a square. - Tapping a cell changes that cell’s color. 2. **Configurable dimensions + random color** - The number of rows/columns is provided externally (e.g., initializer parameters). - Each tap changes the tapped cell to a **random color**. 3. **Navigate to a detail screen** - After tapping a cell, also navigate to a detail screen that displays the new color. 4. **Edit in detail and propagate back** - On the detail screen, allow changing the color. - When navigating back, the updated color must be reflected in the grid. Discuss: - Data model/state management - How you would structure navigation - How you would ensure cells remain square while scrolling

Quick Answer: This question evaluates a candidate's proficiency with iOS UI layout and interaction, including grid layout and maintaining square cells, state management and data propagation between views, touch handling, and navigation using mobile UI frameworks.

Related Interview Questions

  • Compare WebSocket, SSE, and long polling - Snapchat (hard)
  • Explain Swift memory, value semantics, and GCD - Snapchat (hard)
Snapchat logo
Snapchat
Jan 2, 2026, 12:00 AM
Software Engineer
Onsite
Software Engineering Fundamentals
2
0
Loading...

You are building a small iOS prototype in Xcode (Swift). You may use SwiftUI or UIKit.

Implement a scrollable square grid of cells.

Incrementally add the following requirements:

  1. Fixed grid
    • Render a grid with a fixed number of rows/columns.
    • Each cell is a square.
    • Tapping a cell changes that cell’s color.
  2. Configurable dimensions + random color
    • The number of rows/columns is provided externally (e.g., initializer parameters).
    • Each tap changes the tapped cell to a random color .
  3. Navigate to a detail screen
    • After tapping a cell, also navigate to a detail screen that displays the new color.
  4. Edit in detail and propagate back
    • On the detail screen, allow changing the color.
    • When navigating back, the updated color must be reflected in the grid.

Discuss:

  • Data model/state management
  • How you would structure navigation
  • How you would ensure cells remain square while scrolling

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Snapchat•More Software Engineer•Snapchat Software Engineer•Snapchat Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.