Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 930 Bytes

README.md

File metadata and controls

42 lines (30 loc) · 930 Bytes

BetterUserDefaults

Swift version CocoaPods compatible Carthage compatible

UserDefaults Swift Extensions

Usage

import BetterUserDefaults

extension UserDefaults.Key {
    static let sampleKeyA = UserDefaults.Key("sampleKeyA")
    static let sampleKeyB = UserDefaults.Key("sampleKeyB")
}

UserDefaults.standard.set(true, for: .sampleKeyA)
UserDefaults.standard.set(123, for: .sampleKeyB)

UserDefaults.standard.bool(for: .sampleKeyA)       // true
UserDefaults.standard.integer(for: .sampleKeyB)    // 123

Installation

Carthage

Cartfile

github "morishin/BetterUserDefaults"

CocoaPods

Podfile

pod 'BetterUserDefaults'

LICENSE

MIT