LeadKit/TISwiftUtils
Ivan Smolin bb6633f3ce Add changelogs and up version 2020-08-28 19:31:54 +03:00
..
Sources add CodableKeyValueStorage with propertyWrapper 2020-08-28 19:18:09 +03:00
README.md Add changelogs and up version 2020-08-28 19:31:54 +03:00

README.md

TISwiftUtils

Bunch of useful helpers for development.

BackingStore

A property wrapper that wraps storage and defines getter and setter for accessing value from it.

Example

final class ViewModel {
    @BackingStore(store: UserDefaults.standard,
                  getClosure: { $0.bool(forKey: "hasFinishedOnboarding") },
                  setClosure: { $0.set($1, forKey: "hasFinishedOnboarding") })
    var hasFinishedOnboarding: Bool
}

Installation via SPM

You can install this framework as a target of LeadKit.