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
APPropertyWrappers
orAPPropertyWrappersRxSwift
and tapAdd Package
APPropertyWrappers is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'APPropertyWrappers', '~> 4.0'
To add RxSwift
property wrappers additionally add:
pod 'APPropertyWrappers/RxSwift', '~> 4.0'
@UserDefaultCodable(key: "ViewController_runCounter", defaultValue: 0)
var runCounter: Int
See 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, anton.plebanovich@gmail.com
APPropertyWrappers is available under the MIT license. See the LICENSE file for more info.