mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +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
|
||||
// a property, you can use `willSet` and `didSet`
|
||||
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) {
|
||||
print(someIdentifier)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user