5 // Created by Pawel Dabrowski on 23/08/2018.
6 // Copyright © 2018 Fundacja Nowoczesna Polska. All rights reserved.
11 class SharedGlobals: NSObject {
13 static let shared = SharedGlobals()
15 let kFirstUse = "user_first_use"
16 let kCanShowNewCardAlert = "can_show_new_card_alert"
18 func isFirstUse()-> Bool{
19 let defaults = UserDefaults.standard
20 if (defaults.value(forKey: kFirstUse) as? Bool) != nil{
24 defaults.set(false, forKey: kFirstUse)
25 defaults.synchronize()
30 var canShowNewCardAlert: Bool{
32 let defaults = UserDefaults.standard
33 if let value = defaults.value(forKey: kCanShowNewCardAlert) as? Bool{
39 let defaults = UserDefaults.standard
40 defaults.set(newVal, forKey: kCanShowNewCardAlert)
41 defaults.synchronize()