Skip to content

Commit

Permalink
doc: Update document.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 7, 2024
1 parent b810f80 commit e443eab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ let image = UIImage(systemName: "multiply.circle.fill")
// Create a custom symbol image using an asset in an asset catalog in Xcode.
let image = UIImage(named: "custom.multiply.circle")
```

#### How to add custom SF symbols to a string?

```swift
Text("Use \(Image("myCustomSymbolName")) to crop the image")
```

#### How to define colorful SF symbols?

Currently not supported, according to the [official documentation](https://developer.apple.com/documentation/uikit/uiimage/creating_custom_symbol_images_for_your_app), manually adding styles, still trying to support it in the future.
Expand Down
6 changes: 6 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ let image = UIImage(systemName: "multiply.circle.fill")
let image = UIImage(named: "custom.multiply.circle")
```

#### 如何将自定义 SF 符号添加到字符串中?

```swift
Text("使用 \(Image("myCustomSymbolName")) 裁剪图像")
```

#### 如何定义多彩 SF 符号?

目前暂时不支持,根据[官方文档](https://developer.apple.com/documentation/uikit/uiimage/creating_custom_symbol_images_for_your_app)手动去添加样式,仍然在未来尝试支持它
Expand Down

0 comments on commit e443eab

Please sign in to comment.