diff --git a/CHANGELOG.md b/CHANGELOG.md index ffc9be9f..3a36d186 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +### 0.9.44 +- **Add**: `TIFoundationUtils` - set of helpers for Foundation framework classes. + +#### TISwiftUtils +- **Add**: `BackingStore` - a property wrapper that wraps storage and defines getter and setter for accessing value from it. + +#### TIFoundationUtils +- **Add**: `CodableKeyValueStorage` - storage that can get and set codable objects by the key. + + ### 0.9.43 - **Fix**: `OTPSwiftView`'s dependencies. diff --git a/LeadKit.podspec b/LeadKit.podspec index f0e3e393..a0ba28ff 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.9.43" + s.version = "0.9.44" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" diff --git a/TISwiftUtils/README.md b/TISwiftUtils/README.md index d135d3e7..993c9cfe 100644 --- a/TISwiftUtils/README.md +++ b/TISwiftUtils/README.md @@ -2,6 +2,23 @@ Bunch of useful helpers for development. +* [BackingStore](#backingstore) + +## BackingStore + +A property wrapper that wraps storage and defines getter and setter for accessing value from it. + +### Example + +```swift +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.