用纯代码构建UIKit界面,告别Storyboard

学习如何在Swift中完全用代码打造UIKit屏幕:Auto Layout锚点、Stack View布局、Diffable表格与实时搜索。无需Storyboard,掌握纯代码UI开发技巧,适合所有水平的开发者。

Explaining Programmatic UILayouts for UIKit

Published 9/2025
Created by Norbert Grover
MP4 | Video: h264, 1280×720 | Audio: AAC, 44.1 KHz, 2 Ch
Level: All | Genre: eLearning | Language: English | Duration: 14 Lectures ( 2h 20m ) | Size: 1.64 GB

Build UIKit screens in pure Swift: Auto Layout, Stack Views, Diffable Tables & Search — no storyboards.

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.

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.

隐藏内容

此处内容需要权限查看

  • 普通3金币
  • 会员免费
  • 永久会员免费推荐
会员免费查看

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注