Created
February 21, 2018 10:25
-
-
Save vialyx/f9b8c2c0ca30fcb2dfd9b35e867b0983 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private var items: [GymShort] = [] { | |
willSet { | |
let old = Array(Set(items).subtracting(Set(newValue))) | |
view.remove(old) | |
} | |
didSet { | |
let new = Array(Set(items).subtracting(Set(oldValue))) | |
view.add(new) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment