Find all available images for Image(systemName:) i

2020-05-19 02:30发布

Where can I find all the system images that are available in the initializer Image(systemName:)?

I've only been using "chevron" and "star.fill" so far, as discovered in Apple's SwiftUI tutorial series. However, I haven't been able to find a full list of icons in any official documentation.

3条回答
三岁会撩人
2楼-- · 2020-05-19 02:52

Assuming you have Xcode installed, you can also preview all the images without needing to download a separate app.

The trick is you need to view them in a Storyboard, not a SwiftUI Canvas.

Add a UIImageView to your storyboard, then press the dropdown arrow near Image. You'll see the entire list of images provided by Apple:

enter image description here

查看更多
家丑人穷心不美
3楼-- · 2020-05-19 03:10

These icons are called SF Symbols. There are over 1,500 symbols that can be used in apps running in iOS 13 and later.

To browse the full set of symbols, download the SF Symbols app. For more info about SF Symbols check here.


Usage

UIKit:

let heartImage = UIImage(systemName: "heart.fill")

SwiftUI:

let heartImage = Image(systemName: "heart.fill")
查看更多
Summer. ? 凉城
4楼-- · 2020-05-19 03:11

You can use SF Symbol Images in SwiftUI

Image(systemName: "person")

Download Link : https://developer.apple.com/design/resources/

查看更多
登录 后发表回答