UserDefaults Swift Extensions
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
BetterUserDefaults.xcodeproj
BetterUserDefaults.xcworkspace
Demo.playground
Sources/BetterUserDefaults
Tests/BetterUserDefaultsTests
.gitignore
BetterUserDefaults.podspec
LICENSE.md
README.md

README.md

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