In this assignment, you’ll build a SwiftUI app with a ContentView that links to three additional views. Each view demonstrates a different concept: text styling, SF Symbols, and image display. Read through all the requirements before you start.
Get Started
- Create a new Xcode project. Name it HomeworkOne or something similar.
- Add three new SwiftUI view files to your project — you’ll link to each from
ContentView.
View 1: Text Styling
In one of your three views, include each of the following:
- A text field using a custom font with a fixed font size.
- A second text field with a large amount of text and a line limit of 2. It should contain more text than it actually shows on screen.
- Padding applied to at least one text field.
- A font color applied to one text field.
- A third text field with a background color. Hint:
.background(Color.yellow)is a good starting point.
View 2: SF Symbols
In a second view:
- Display an airplane SF Symbol. Set the font size to around 300 so it nearly fills the screen.
- Apply a rotation effect so the airplane points straight up. (See Chapter 2 on text modifiers.)

View 3: Image
In your third view:
- Display a large image of your choosing.
- Make the image resizable and apply
.scaledToFit()so it scales proportionally. It may not fill both dimensions — that’s expected. - Add an overlay to the image. Set the color to black and the opacity to a value that darkens the image while still keeping it visible. (See Chapter 3: Applying an Overlay to an Image.)