mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
fix a typo (#4172)
the variable name should be `someIdentifier` instead of `willSet`.
This commit is contained in:
parent
ce170de16d
commit
d24f135208
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user