Home  »  Swift Source  »  Swift Settings Manager

Swift Settings Manager

Posted on 04 Sep 2015

Swift Settings Manager

Settings manager build with Swift 2, Xcode 7, iOS 9.

Swift based demo application for Settings Manager. It’s using SettingsManager.swift singleton class that can read/write settings from/to device local storage i.e. NSUserDefaults.

– Easy to use within any Swift application.
– Using key/value storage NSUserDefaults.
– Just copy and paste SettingsManger.swift file.
– Settings value can be accessible from anywhere in the project.
– Returns default value when application installed and run first time.
– You can change default value within SettingsManager.swift file.
– You can add more settings within SettingsManager.swift file.
– Build with Swift 2, iOS 9, Xcode 7 only, No other dependency.

Supported Device:
iPhone 4s, 5, 5s, 5c, 6, 6 Plus, 6s, 6s Plus, all iPad having iOS 8.4, iOS 9

How To Use:
Copy and paste SettingsManager.swift file within your swift project.
Prepare settings screen visual interface as per your preference OR use my demo project’s screen.
Use SettingsManager.sharedInstance anywhere to read/write settings value.

// set value within settings manager
SettingsManager.sharedInstance.refreshTime = 14

// read value from settings manager
let refreshTimeValue = Int(SettingsManager.sharedInstance.refreshTime)

You can download source form GitHub profile.

Go to Top