Swift: How to use SF Symbols

When designing a TabView you have the option to add an icon for each tab using a system image, using the systemImage parameter to Label:
TabView {
Text("First")
.tabItem {
Label("First", systemImage: &#3…


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com

When designing a TabView you have the option to add an icon for each tab using a system image, using the systemImage parameter to Label:

TabView {
    Text("First")
        .tabItem {
            Label("First", systemImage: "tray")
        }
}

In this case we use tray.

How do you find out which other icons you can use?

Apple created an app for this, called SF Symbols. Download it from https://developer.apple.com/design/downloads/SF-Symbols.dmg, install it on your Mac and once you open it, you can browse over 1500 symbols and see their name:


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com


Print Share Comment Cite Upload Translate Updates
APA

flaviocopes.com | Sciencx (2021-10-06T05:00:00+00:00) Swift: How to use SF Symbols. Retrieved from https://www.scien.cx/2021/10/06/swift-how-to-use-sf-symbols/

MLA
" » Swift: How to use SF Symbols." flaviocopes.com | Sciencx - Wednesday October 6, 2021, https://www.scien.cx/2021/10/06/swift-how-to-use-sf-symbols/
HARVARD
flaviocopes.com | Sciencx Wednesday October 6, 2021 » Swift: How to use SF Symbols., viewed ,<https://www.scien.cx/2021/10/06/swift-how-to-use-sf-symbols/>
VANCOUVER
flaviocopes.com | Sciencx - » Swift: How to use SF Symbols. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/10/06/swift-how-to-use-sf-symbols/
CHICAGO
" » Swift: How to use SF Symbols." flaviocopes.com | Sciencx - Accessed . https://www.scien.cx/2021/10/06/swift-how-to-use-sf-symbols/
IEEE
" » Swift: How to use SF Symbols." flaviocopes.com | Sciencx [Online]. Available: https://www.scien.cx/2021/10/06/swift-how-to-use-sf-symbols/. [Accessed: ]
rf:citation
» Swift: How to use SF Symbols | flaviocopes.com | Sciencx | https://www.scien.cx/2021/10/06/swift-how-to-use-sf-symbols/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.