Last active
June 6, 2019 05:41
-
-
Save Mreyna3/29ce52b3b301d8e112d0ea3c84f6cd47 to your computer and use it in GitHub Desktop.
computed property
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
fileprivate var batchSum : Double!{ | |
willSet{ | |
if (newValue > 0 && newValue > batchSum){ | |
print("\((newValue - batchSum).format()) enqueud into the batch, the updated batch value is: \(newValue!.format())") | |
} | |
defaults.set(newValue, forKey: "batch_sum") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment