Simple and complex property wrappers for native Swift and for RxSwift.
Clone the repo and then open Pods Project/APPropertyWrappers.xcworkspace
- In Xcode select
File>Add Packages... - Copy and paste the following into the search:
https://github.com/APUtils/APPropertyWrappers - Tap
Add Package - Select
APPropertyWrappersorAPPropertyWrappersRxSwiftand tapAdd Package
APPropertyWrappers is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'APPropertyWrappers', '~> 3.2'To add RxSwift property wrappers additionally add:
pod 'APPropertyWrappers/RxSwift', '~> 3.2'@UserDefaultCodable(key: "ViewController_runCounter", defaultValue: 0)
var runCounter: IntSee example and test projects for more details.
Any contribution is more than welcome! You can contribute through pull requests and issues on GitHub.
Anton Plebanovich, [email protected]
APPropertyWrappers is available under the MIT license. See the LICENSE file for more info.