Concept vault
Swift Concepts
Master these core concepts one at a time.
Strings
Think of a string as a label or a note. Just like you might write your name on a label, a string is how computers remember text. Any word, sentence, or bunch of letters in quotes is a string.
Arrays
An array is like a toy box that holds things in order. You can put toys in, take toys out, and find a toy by counting which spot it's in. The first toy is in spot 0, the second is in spot 1, and so on.
SwiftUI Text
Text is like a label sticker you place on the screen.
SwiftUI Image
PREMIUMImage is how SwiftUI shows a picture or icon.
SwiftUI Stacks
PREMIUMStacks place views in order, like a column or a row.
SwiftUI Button
PREMIUMA button is something the user taps to make something happen.
SwiftUI TextField
PREMIUMTextField is where the user types words.
SwiftUI Toggle
PREMIUMToggle turns something on or off.
SwiftUI List
PREMIUMList shows many items in a vertical list you can scroll.
SwiftUI NavigationStack
PREMIUMNavigationStack helps you go to a new screen and go back.
SwiftUI ForEach
PREMIUMForEach makes the same view many times, one for each item.
SwiftUI @State
PREMIUM@State is like a sticky note that updates when you change it.
SwiftUI Slider
PREMIUMSlider lets you choose a value by dragging.
SwiftUI Picker
PREMIUMPicker lets you choose from a list of options.
SwiftUI Spacer
PREMIUMSpacer creates space between views.
SwiftUI Divider
PREMIUMDivider draws a line to separate items.
SwiftUI Modifiers
PREMIUMModifiers are like adding stickers and decorations to a view.
SwiftUI @Binding
PREMIUM@Binding lets a view control a value from another view.
SwiftUI ScrollView
PREMIUMScrollView lets you scroll when content is too big.
SwiftUI Sheet
PREMIUMSheet brings up a new screen from the bottom.
SwiftUI Alert
PREMIUMAlert pops up a message that needs attention.
SwiftUI @ObservedObject
PREMIUM@ObservedObject lets a view watch an object for changes.
SwiftUI @StateObject
PREMIUM@StateObject creates an object the view owns.
SwiftUI @EnvironmentObject
PREMIUM@EnvironmentObject accesses data shared with all views.
SwiftUI Animation
PREMIUMAnimation smoothly moves things instead of jumping.
