Skip to content

Commit 645cbfb

Browse files
authored
修复枚举, 类和结构体章节的图片链接 (#1220)
1 parent e31ea50 commit 645cbfb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/02_language_guide/08_Enumerations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ for beverage in Beverage.allCases {
135135

136136
例如,假设一个库存跟踪系统需要利用两种不同类型的条形码来跟踪商品。有些商品上标有使用 `0``9` 的数字的 UPC 格式的一维条形码。每一个条形码都有一个代表数字系统的数字,该数字后接五位代表厂商代码的数字,接下来是五位代表“产品代码”的数字。最后一个数字是检查位,用来验证代码是否被正确扫描:
137137

138-
<img width="252" height="120" alt="" src="https://docs.swift.org/swift-book/_images/barcode_UPC_2x.png">
138+
<img width="252" height="120" alt="" src="https://docs.swift.org/swift-book/images/barcode_UPC@2x.png">
139139

140140
其他商品上标有 QR 码格式的二维码,它可以使用任何 ISO 8859-1 字符,并且可以编码一个最多拥有 2,953 个字符的字符串:
141141

142-
<img width="169" height="169" alt="" src="https://docs.swift.org/swift-book/_images/barcode_QR_2x.png">
142+
<img width="169" height="169" alt="" src="https://docs.swift.org/swift-book/images/barcode_QR@2x.png">
143143

144144
这便于库存跟踪系统用包含四个整型值的元组存储 UPC 码,以及用任意长度的字符串储存 QR 码。
145145

source/02_language_guide/09_Structures_And_Classes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ print("hd is still \(hd.width) pixels wide")
166166

167167
`hd` 赋值给 `cinema` 时,`hd` 中所存储的**会拷贝到新的 `cinema` 实例中。结果就是两个完全独立的实例包含了相同的数值。由于两者相互独立,因此将 `cinema``width` 修改为 `2048` 并不会影响 `hd` 中的 `width` 的值,如下图所示:
168168

169-
![sharedStateStruct_2x](https://docs.swift.org/swift-book/_images/sharedStateStruct_2x.png)
169+
![sharedStateStruct_2x](https://docs.swift.org/swift-book/images/sharedStateStruct@2x.png)
170170

171171
枚举也遵循相同的行为准则:
172172

@@ -214,7 +214,7 @@ alsoTenEighty.frameRate = 30.0
214214

215215
因为类是引用类型,所以 `tenEight``alsoTenEight` 实际上引用的是同一个 `VideoMode` 实例。换句话说,它们是同一个实例的两种叫法,如下图所示:
216216

217-
![sharedStateClass_2x](https://docs.swift.org/swift-book/_images/sharedStateClass_2x.png)
217+
![sharedStateClass_2x](https://docs.swift.org/swift-book/images/sharedStateClass@2x.png)
218218

219219
通过查看 `tenEighty``frameRate` 属性,可以看到它正确地显示了底层的 `VideoMode` 实例的新帧率 `30.0`
220220

0 commit comments

Comments
 (0)