Your First iOS App: Getting Started with SwiftUI

Jun 16 2026 · Swift 6.3, iOS 26, Xcode 26

Lesson 06: Objects, Data & Methods

Objects, Data & Methods

Episode complete

Play next episode

Next

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Update Note: In the previous lessons, you modified code in the editor or dragged views from the library rather than using the SwiftUI canvas. This is because Apple has discontinued support for adding views directly to the canvas. Starting with Xcode 26, Apple emphasizes using a single source of truth (code) approach.

struct ContentView: View {
ContentView()
var body: some View {
VStack {
  Text("🎯🎯🎯\nPUT THE BULLSEYE AS CLOSE AS YOU CAN TO")
    .bold()
    .multilineTextAlignment(.center)
    .lineSpacing(4.0)
    .font(.footnote)
    .kerning(2.0)
  Text("89")
  HStack {
    Text("1")
    Slider(value: .constant(50), in: 1.0...100.0)
    Text("100")
  }
  Button("Hit me") {

  }
}
See forum comments
Cinema mode Download course materials from Github
Previous: SwiftUI View Modifiers Next: Challenge: Add View Modifiers