Chapter 3
Working with Images

Now that you should have some basic ideas about SwiftUI and understand how to display textual content, let's see how to display images in this chapter.

Other than text, image is another basic element that you'll use in iOS app development. SwiftUI provides a view called Image for developers to render and draw images on screen. Similar to what we've done in the previous chapter, I'll show you how to work with Image by building a simple demo. In brief, this chapter covers the following topics:

  • What's SF Symbols and how to display a system image
  • How to display our own images
  • How to resize an image
  • How to display a full screen image using edgesIgnoringSafeArea
  • How to create a circular image
  • How to apply an overlay to an image
Figure 17. Darken an image and apply a text overlay
Figure 17. Darken an image and apply a text overlay

To access the full content and the complete source code, please get your copy at https://www.appcoda.com/swiftui.

results matching ""

    No results matching ""