A SwiftUI learning project built for the Module 2 Lesson 5 challenge from the CodeWithChris iOS Foundations course.
The original challenge was to create a list of five words, randomly select one when a button is pressed, and add each selected word to a growing list.
For my version, I themed the app around Apple products and added some extra functionality beyond the challenge requirements.
- Create a SwiftUI
List - Add a button below the list
- Store five strings in an array
- Randomly select one item when the button is pressed
- Add the selected item to the list
- Allow the list to grow with each button press
- Used Apple products instead of generic words
- Created an
AppleProductmodel - Added matching SF Symbols for each product
- Added a Reset button to clear the list
- Creating and working with arrays
- Creating custom Swift data models
- Using
@Stateto manage changing data - Randomly selecting items from an array
- Adding items to an array
- Displaying dynamic data in a SwiftUI
List - Handling button actions
- Using SF Symbols in SwiftUI
- Resetting application state
This project was created as part of Module 2 Lesson 5 of the CodeWithChris iOS Foundations course.
The core concept and challenge originated from the course. I added the Apple product theme, SF Symbols and reset functionality as additional practice.


