Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Explaining Programmatic UILayouts for UIKit
Rating: 5.0 out of 5(1 rating)
7 students

Explaining Programmatic UILayouts for UIKit

Build UIKit screens in pure Swift: Auto Layout, Stack Views, Diffable Tables & Search — no storyboards.
Created byNorbert Grover
Last updated 9/2025
English

What you'll learn

  • Build UIKit screens entirely in code; remove storyboards and set the root in SceneDelegate.
  • Master Auto Layout anchors & layout guides; correctly wire UIScrollView content/frame guides.
  • Compose responsive UIs with UIStackView using proper spacing, alignment, and distribution.
  • Create a small Theme (colors, spacing, radii) for visual consistency and reuse.
  • Implement reusable card components and buttons, configured via lightweight structs and closures.
  • Display lists with UITableView + Diffable Data Source; update via snapshots with animations.
  • Add live search using UISearchController and filter results without duplicating arrays.
  • Apply accessibility, Dynamic Type, and Dark Mode–friendly styling across components.
  • Organize code with MVVM and dependency injection; swap Mock/Live APIs easily.
  • Debug layout issues: ambiguous constraints, safe-area mistakes, and performance pitfalls.

Course content

3 sections • 14 lectures • 2h 20m total length
  • Ensuring the Your App Doesn't Use the Storyboard.5:59

    How to make a UIKit app launch without a storyboard. You’ll remove storyboard references from Info.plist and set the root view controller in code, so everything is created programmatically.

    Video description:
    In this quick demo, we:

    • Delete Main storyboard file base name and Storyboard Name (Info.plist → Application Scene Manifest).

    • (Optional) remove Main.storyboard.

    • Set the root VC in SceneDelegate/AppDelegate.

    • Fix the common init(coder:) crash.
      End result: a clean, fully programmatic UIKit startup.

  • Creating the first basic Stock Display App1:21

    This is a basic UIKit stock display app and I am going to explain how it works.

  • What is the programmatic approach of coding in UIKit vs using the Storyboard?1:05

    In a nutshell, the programmatic approach to creating a view controller is create the view without wiring anything through the storyboard. There is no drag and drop in the creation of view controllers. This module explains more in-depth about the differences. 

  • The Basics of using Storyboard for UIKit.8:20

    This lecture explains, using a very basic example, the very fundamentals of using storyboard for UIKit.

  • Advantages of Creating Views Programmatically in UIKit1:28

    There are multiple advantages to creating view controller programmatically. One of which is that programmatic methodologies are less prone to source control errors and conflicts. This course goes more in-depth with this topic.

  • What is a UIStackView?1:32

    This lecture explains what a stack view is. This will tie back to a breakdown of the original 'Stock Display App' in the first lecture.

  • Coding the StackView15:40

    This lecture demonstrates coding the Stackview.

  • Advantages of the function 'private func createStockLabel'1:04

    In the 'StockMarketDisplayApp' there is a function called createStockLabel. Instead of explicitly creating a UILabel, we use a function that will create the labels for us. This lecture explains how.

  • Coding the app programmatically using MVC Design Pattern15:40

    This lecture takes you step be step coding the StockMarketDisplayApp

Requirements

  • A Mac with Xcode 15+ installed.
  • Basic Swift syntax: variables, functions, structs/classes, optionals.
  • Familiarity with UIKit (views + view controllers).
  • Comfort with Auto Layout; stack views experience is helpful.
  • iOS 15+ simulators installed (an iPhone device is optional).
  • Know how to create and run a new Xcode project.
  • Basic table view and navigation controller concepts.
  • Willingness to build UI without storyboards (programmatic UI).
  • Ability to read Apple docs and debug build errors.
  • Optional: basic Git (clone/commit) to pull sample code.

Description

“Explaining Programmatic UILayouts for UIKit” is a hands-on, live-coded course that teaches you how to build iOS interfaces entirely in Swift—clean, testable, and production-ready. We start by removing the storyboard and bootstrapping the app via SceneDelegate, then lay out views with anchors, layout guides, and UIStackView so your screens adapt to different devices and Dynamic Type.

You’ll create a small design system (Theme for colors/spacing/radii) and reusable components (CardView, PrimaryButton, ActionCard). From there we build a real feature: a Car Search screen powered by a CarAPI (mocked for the course). You’ll wire a programmatic UITableView, use a Diffable Data Source with snapshots for smooth updates, and integrate a UISearchController to filter results without duplicating arrays. We’ll also cover scroll view best practices (contentLayoutGuide vs. frameLayoutGuide), empty/error states, currency formatting, keyboard behavior, and Dark Mode.

Architecture stays pragmatic: MVVM-style view models and dependency injection so you can swap the mock for a live API later. Along the way, you’ll see common pitfalls and how to debug them—ambiguous constraints, safe-area mistakes, and the classic init(coder:) crash when removing storyboards.

By the end, you will be able to:

  • Launch apps without storyboards and structure screens programmatically.

  • Compose responsive layouts with anchors and stack views.

  • Render lists with diffable data sources and update via snapshots.

  • Add fast, user-friendly search using UISearchController.

  • Ship consistent UIs with reusable components and a simple Theme.

If you’re an iOS dev who wants fewer Interface Builder headaches and more control, this course is for you.

Who this course is for:

  • iOS devs who want to ditch storyboards and build UIs fully in code.
  • UIKit developers seeking reusable components and a small design system.
  • SwiftUI-first devs who must interop with or maintain UIKit codebases.
  • Bootcamp/CS students prepping for iOS interviews (tables, diffable, search).
  • Indie makers building production-ready apps quickly with clean patterns.
  • Engineers new to teams that rely on UITableView + DiffableDataSource.
  • Developers who struggle with Auto Layout, stack views, and scroll views.
  • Web/Android engineers transitioning to iOS and wanting practical UIKit.
  • Tech leads standardizing programmatic UI patterns (MVVM, DI) across a team.
  • Designers/PMs who prototype directly in UIKit and want scalable structure.