Woohoo! It’s time for our first homework assignment! Let’s talk details. Create a new project with the following specifications:
- An introductory view (ContentView.swift) with links to three additional views.
- One of the views should:
- In one text field, demonstrate the use of a custom font with a fixed font size.
- In another text field with a large amount of text, demonstrate how to implement a line limit of two. Ie. the text field should have more text inside than it actually displays.
- Add padding to at least one of the text fields.
- Add a font color to one of the text fields.
- Add a third text field and give it a background color. Hint: .background(Color.yellow) for example.
- In a second view demonstrate the use of an SF symbol by using an airplane.
- Set its font size to 300 or thereabouts until it pretty much fills the screen.
- Add a rotation effect (from chapter 2 on text) so that it points straight up, like this.
- In the third view, display a large image of your choosing. Set the image to resizable so that it fills the entire screen. Then use .scaledToFit() to insure that it is scaled proportionally. At this point it may not fill the entire screen in one of the dimensions, but that’s OK.
- Lastly, add an overlay to your image, set the color of the overlay to black, and set its opacity to a value that allows you to see the image, but still makes it darker. For more, see Chapter 3, Applying an Overlay to an Image.