Skip to content

My journey through Paul Hudson’s "SwiftUI by Example" — with code snippets, notes, and experiments.

Notifications You must be signed in to change notification settings

rewoma19/SwiftUISandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SwiftUI by Example — Topic Notes 📘

Learning SwiftUI through Paul Hudson’s SwiftUI by Example.

This repository contains topic-based notes, code snippets, and experiments.

Goal 🧠

To build a solid understanding of each SwiftUI concept by:

  • Writing small code samples

  • Summarizing what each modifier or property wrapper does

  • Reflecting on real-world usage

Day 1

Working with Static Text

Concepts learned:

  1. Creating static labels using a Text view

  2. Styling Text views with fonts, colors, line spacing, and more

  3. Adjusting text alignment using the multilineTextAlignment() modifier

  4. Adding spacing between letters in text

  5. Formatting dates inside Text views

  6. Showing text and icons side by side using the Label view

  7. Letting users select text using the textSelection() modifier

  8. Making text in a TextField view either uppercase or lowercase using the textCase() modifier

Day 2

Images, shapes, and media

Concepts learned:

  1. Displaying images using the Image View

  2. Displaying icons from Apple's SF Symbols icon set using the Image view and systemName parameter

  3. Displaying image as a background to a view

Day 3

Images, shapes, and media

Concepts learned:

  1. Displaying solid shapes using built-in views

  2. Rendering gradients

  3. Apply strokes to shapes

  4. Let users select pictures using PhotosPicker

Day 4

Stacks, grids, and scrollviews

Concepts learned:

  1. Positioning views in a fixed grid

Day 5

Stacks, grids, and scrollviews

Concepts learned:

  1. Adding horizontal and vertical scrolling using ScrollView

  2. Make a Scrollview snap with paging or between child views

User interface controls

Concepts learned:

  1. Let users choose a color with the help of the ColorsPicker view

  2. Create a toggle switch

Responding to events

Concepts learned:

  1. Control which view is shown when your app launches

Day 6

User interface controls

Concepts learned:

  1. Opening web links in Safari using Link view

Day 7

Navigation

Concepts learned:

  1. Embedding a view in a navigation view

  2. Letting users edit the navigation title

  3. Adding bar items to a navigation view

  4. Pushing a new view onto a NavigationStack

Day 8

Containers

Concepts learned:

  1. Embedding views in a tab bar using TabView

  2. Hiding and revealing content using DisclosureGroup

Day 9

Stacks, grids, scrollviews

  1. Making a fixed size Spacer

Day 10

Lists

  1. Set the background color of list rows

About

My journey through Paul Hudson’s "SwiftUI by Example" — with code snippets, notes, and experiments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages