Skip to content

Commit 5632859

Browse files
committed
doc: update README.md
1 parent e494de4 commit 5632859

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Support batch import of SVG icons and batch generation of SF symbol icons.
3838

3939
## Frequently Asked Questions
4040

41-
#### How to Use Your Custom SF Symbol in SwiftUI?
41+
### How to Use Your Custom SF Symbol in SwiftUI?
4242

4343
```swift
4444
// Your custom symbol at Medium scale, Regular weight
@@ -60,7 +60,7 @@ VStack {
6060
}
6161
```
6262

63-
#### How to Use Your Custom SF Symbol in UIKit?
63+
### How to Use Your Custom SF Symbol in UIKit?
6464

6565
```swift
6666
let customSymbol:UIImage? = UIImage(named: "MyCustomSymbolName")?
@@ -73,7 +73,7 @@ let customSymbol:UIImage? = UIImage(named: "MyCustomSymbolName")?
7373
)
7474
```
7575

76-
#### How to Use Your Custom SF Symbol in AppKit?
76+
### How to Use Your Custom SF Symbol in AppKit?
7777

7878
```swift
7979
let customSymbol:NSImage? = NSImage(named: "MyCustomSymbolName")?
@@ -96,7 +96,7 @@ configuration = config.applying(.init(textStyle: .title1))
9696
imageView.symbolConfiguration = config
9797
```
9898

99-
#### How to Use Your Custom SF Symbol in UIKit?
99+
### How to Use Your Custom SF Symbol in UIKit?
100100

101101
```swift
102102
// Create a system symbol image.
@@ -106,13 +106,13 @@ let image = UIImage(systemName: "multiply.circle.fill")
106106
let image = UIImage(named: "custom.multiply.circle")
107107
```
108108

109-
#### How to add custom SF symbols to a string?
109+
### How to add custom SF symbols to a string?
110110

111111
```swift
112112
Text("Use \(Image("myCustomSymbolName")) to crop the image")
113113
```
114114

115-
#### How to define colorful SF symbols?
115+
### How to define colorful SF symbols?
116116

117117
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.
118118

@@ -141,16 +141,18 @@ Currently not supported, according to the [official documentation](https://devel
141141
</g>
142142
```
143143

144-
#### How to Enable Multi-Color Support for Custom Symbols?
144+
## How to Enable Multi-Color Support for Custom Symbols?
145145

146146
Thanks to [@ldowens](https://github.com/jaywcjlove/create-custom-symbols/issues/9) for providing a method to enable multi-color support for custom symbols.
147147

148-
#### Step 1: Create and Export the Symbol
148+
### Step 1: Create and Export the Symbol
149+
149150
In the **Create Custom Symbols** application, create a new symbol using **SVG** and export it.
150151

151152
![Create Symbol](./assets/multi-color-support/001.png)
152153

153-
#### Step 2: Import into SF Symbols and Set Colors
154+
### Step 2: Import into SF Symbols and Set Colors
155+
154156
Drag the exported **Symbols.symbols.svg** file into the **SF Symbols** application and create layers.
155157

156158
![Import into SF Symbols](./assets/multi-color-support/002.png)
@@ -159,12 +161,13 @@ Follow the steps below to set colors for your custom symbol:
159161

160162
![Set Colors](./assets/multi-color-support/003.png)
161163

162-
#### Step 3: Export the Multi-Color Symbol
164+
### Step 3: Export the Multi-Color Symbol
165+
163166
Once the colors are set, export the symbol icon from the **SF Symbols** application.
164167

165168
![Export Symbol](./assets/multi-color-support/004.png)
166169

167-
### [More FAQs…](https://github.com/jaywcjlove/create-custom-symbols/issues)
170+
## [More FAQs…](https://github.com/jaywcjlove/create-custom-symbols/issues)
168171

169172
<!--idoc:config:
170173
site: Create Custom Symbols

README.zh.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636

3737
![Create Custom Symbols screenshots-5-cn](./assets/screenshots-5-cn.png)
3838

39-
### 常见问题
39+
## 常见问题
4040

41-
#### 如何在 SwiftUI 中使用您的自定义 SF 符号?
41+
### 如何在 SwiftUI 中使用您的自定义 SF 符号?
4242

4343
```swift
4444
// Your custom symbol at Medium scale, Regular weight
@@ -60,7 +60,7 @@ VStack {
6060
}
6161
```
6262

63-
#### 如何在 UIKit 中使用您的自定义 SF 符号?
63+
### 如何在 UIKit 中使用您的自定义 SF 符号?
6464

6565
```swift
6666
let customSymbol:UIImage? = UIImage(named: "MyCustomSymbolName")?
@@ -73,7 +73,7 @@ let customSymbol:UIImage? = UIImage(named: "MyCustomSymbolName")?
7373
)
7474
```
7575

76-
#### 如何在 AppKit 中使用您的自定义 SF 符号?
76+
### 如何在 AppKit 中使用您的自定义 SF 符号?
7777

7878
```swift
7979
let customSymbol:NSImage? = NSImage(named: "MyCustomSymbolName")?
@@ -96,7 +96,7 @@ configuration = config.applying(.init(textStyle: .title1))
9696
imageView.symbolConfiguration = config
9797
```
9898

99-
#### 如何在 UIKit 中使用您的自定义 SF 符号?
99+
### 如何在 UIKit 中使用您的自定义 SF 符号?
100100

101101
```swift
102102
// Create a system symbol image.
@@ -106,13 +106,13 @@ let image = UIImage(systemName: "multiply.circle.fill")
106106
let image = UIImage(named: "custom.multiply.circle")
107107
```
108108

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

111111
```swift
112112
Text("使用 \(Image("myCustomSymbolName")) 裁剪图像")
113113
```
114114

115-
#### 如何定义多彩 SF 符号?
115+
### 如何定义多彩 SF 符号?
116116

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

@@ -141,17 +141,17 @@ Text("使用 \(Image("myCustomSymbolName")) 裁剪图像")
141141
</g>
142142
```
143143

144-
### 如何为自定义符号启用多色支持?
144+
## 如何为自定义符号启用多色支持?
145145

146146
感谢 [@ldowens](https://github.com/jaywcjlove/create-custom-symbols/issues/9) 提供的方法,帮助我们实现自定义符号的多色支持。
147147

148-
#### 步骤 1:创建并导出符号
148+
### 步骤 1:创建并导出符号
149149

150150
**Create Custom Symbols** 应用中,使用 **SVG** 创建一个新的符号,并将其导出。
151151

152152
![创建符号](./assets/multi-color-support/001.png)
153153

154-
#### 步骤 2:导入 SF Symbols 并设置颜色
154+
### 步骤 2:导入 SF Symbols 并设置颜色
155155

156156
将导出的 **Symbols.symbols.svg** 文件拖拽到 **SF Symbols** 应用中,并创建层。
157157

@@ -161,13 +161,13 @@ Text("使用 \(Image("myCustomSymbolName")) 裁剪图像")
161161

162162
![设置颜色](./assets/multi-color-support/003.png)
163163

164-
#### 步骤 3:导出多色符号
164+
### 步骤 3:导出多色符号
165165

166166
完成颜色设置后,在 **SF Symbols** 应用中导出符号图标。
167167

168168
![导出符号](./assets/multi-color-support/004.png)
169169

170-
### [更多问题...](https://github.com/jaywcjlove/create-custom-symbols/issues)
170+
## [更多问题...](https://github.com/jaywcjlove/create-custom-symbols/issues)
171171

172172
<!--idoc:config:
173173
site: 创建自定义符号

0 commit comments

Comments
 (0)