Skip to content

Instantly share code, notes, and snippets.

@mahmudahsan
Created November 26, 2017 10:55
Show Gist options
  • Save mahmudahsan/25d11dad59913586f4f17ee4f0c151e9 to your computer and use it in GitHub Desktop.
Save mahmudahsan/25d11dad59913586f4f17ee4f0c151e9 to your computer and use it in GitHub Desktop.
class Properties{
static let sharedInstance = Properties()
private let userDefaults:UserDefaults = UserDefaults()
var fontSize:Double = 10.0{
didSet{
userDefaults.setValue(fontSize, forKey: "FONT_SIZE")
userDefaults.synchronize()
print("Font Size Saved")
}
}
}
let properties = Properties.sharedInstance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment