1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-06 06:47:54 +02:00

fix a typo (#4172)

the variable name should be `someIdentifier` instead of `willSet`.
This commit is contained in:
Xing Zheng
2022-01-04 00:16:36 +08:00
committed by GitHub
parent ce170de16d
commit d24f135208

View File

@@ -654,7 +654,7 @@ class Rect: Shape {
// but still want to run code before and after getting or setting // but still want to run code before and after getting or setting
// a property, you can use `willSet` and `didSet` // a property, you can use `willSet` and `didSet`
var identifier: String = "defaultID" { var identifier: String = "defaultID" {
// the `willSet` arg will be the variable name for the new value // the `someIdentifier` arg will be the variable name for the new value
willSet(someIdentifier) { willSet(someIdentifier) {
print(someIdentifier) print(someIdentifier)
} }