Simple graphics using SF Symbols
The San Francisco Symbols (also known as SF Symbols) provide a set of over 1,500 consistent and highly configurable symbols.
To browse through the list or look at symbol names, you can download the SF Symbols app from https://developer.apple.com/design/downloads/SF-Symbols.dmg.
In this recipe, we will create a project that uses various SF Symbols and applies different styles to them.
Getting ready
Create a new SwiftUI project named SFSybmolsApp
.
How to do it…
Using SF Symbols is very similar to using images.
- Open the
ContentView.swift
file and delete the defaultText
view. - Add a
VStack
and anHStack
to theContentView
body and implement various SF symbols:VStack { HStack{ Image(systemName: "c.circle.fill") ...