13‐Iris - molab-itp/content-2026-itp GitHub Wiki

Week 01 – Swift Fundamentals

Notes

  • Learned that let is used for constants, while var is used for values that can change.
  • Practiced basic data types: String, Int, Double, and Bool.
  • Learned that arrays store multiple values and use indexes starting from 0.
  • Practiced if statements for checking conditions and choosing different actions.
  • Learned that 1...5 includes 5, while 1..<5 stops before 5.
  • Practiced for loops to repeat code several times.
  • Learned how to create simple functions with func and call them later.
  • Used Int.random() to randomly choose symbols in my text art Playground.

Still getting used to Swift syntax and Xcode Playground, especially ranges and function syntax.

Week 02 – Swift Fundamentals

Notes

  • Learned how multiline strings """ """ can store ASCII art across multiple lines.
  • Practiced nested for loops to generate rows and columns of text.
  • Learned how randomElement() can randomly select values from an array.
  • Practiced using function parameters, such as width and lines, to control the output.
  • Used functions to separate different parts of the program, such as generating the sky and showing the city.

Issues

  • Still getting used to nested loops and understanding how the inner and outer loops work together.
  • Function parameters are becoming clearer, but I still need more practice writing them from scratch.

Week 03 – SwiftUI

Notes

  • Started learning the basic structure of a SwiftUI app and how View works.
  • Practiced using VStack, ZStack, Text, Image, and Button to build a simple interface.
  • Learned how @State can update the UI when a value changes.
  • Used NavigationStack and NavigationLink to create a simple multi-view app.
  • Built a Random Animal app using arrays and random numbers to generate different animals, decorations, and colors.

Week 04 – SwiftUI Audio

Notes

  • Built a two-page SwiftUI app called MoodSound.
  • Used @State to store the selected mood and pass it to another view.
  • Learned how to add local audio files to an Xcode project.
  • Used AVFoundation and AVAudioPlayer to play and stop audio.
  • Connected different moods with different sound files.
  • Got more familiar with NavigationStack, NavigationLink, and passing data between views.

Week 05 – Local Data and Sensors

Notes

  • Learned that @Binding allows two views to share and update the same value.
  • Learned how @AppStorage can save simple data locally so it remains after restarting the app.
  • Explored how iPhone sensors can detect device motion, orientation, and vibration.
  • Looked at the Bubble Level and Seismometer examples to understand how sensor data can control a SwiftUI interface.
  • Learned that some app data only exists in memory, while other data can be stored locally.
  • Explored simple SwiftUI shapes and animations.

Week 06 – Local Data and JSON

Notes

  • Learned how JSON can be used to save and restore data locally in an app.
  • Used JSONEncoder to convert Swift data into JSON.
  • Used JSONDecoder to load JSON data back into Swift.
  • Learned the difference between temporary @State data and data saved to a local file.
  • Added a mood history to MoodSound and saved the history as a JSON file.
  • Practiced using arrays to store multiple mood values.
  • Looked at how the class demo separates the View from the data model using Document and @Environment.