ACKReactiveExtensions is set of useful extensions for ReactiveCocoa you could use in your apps.
Currently we have extensions for
- Argo
- Marshal
- Reachability
- Realm
- SDWebImage
- UIKit
- WebKit
If you'd love to have more extensions available just open an issue or even better create a pull request!
ACKReactiveExtensions is available through CocoaPods. Simply add the following line to your Podfile:
pod "ACKReactiveExtensions"
- Xcode 8.x
- Swift 3.x
- iOS 8.3 and newer
For Swift 2.x compatible version use ACKReactiveExtensions in 1.2.x version.
By using pod "ACKReactiveExtensions"
you will get only general and UIKit extensions but there are also subspecs you can like/need.
pod 'ACKReactiveExtensions/Argo'
pod 'ACKReactiveExtensions/Marshal'
pod 'ACKReactiveExtensions/Reachability'
pod 'ACKReactiveExtensions/Realm'
pod 'ACKReactiveExtensions/SDWebImage'
pod 'ACKReactiveExtensions/WebKit'
These subspecs mostly require aditional dependencies (as Argo or Reachability) and you could not need it for your project. That's why it is separated to subspecs.
Usage is really simple, ACKReactiveExtensions contains just more extensions for ReactiveSwift's Reactive
struct so it can be used on more objects.
let imageURL: Property<URL> = ...
let imageView = UIImageView()
imageView.reactive.imageURL <~ imageURL
ACKReactiveExtensions contains reactive mapping extensions for following libraries. See their page for more information.
In general we are against mapping objects on main thread (and you should be too), but you know, you only live once so we still give you the opportunity to do so. By default our mapping extensions allow this behavior but if you want to restrict that, you can do that by setting a configuration variable.
ACKReactiveExtensionsConfiguration.allowMappingOnMainThread = false
From now on the mapping extensions will expect to be called on background thread, but don't worry, we use asserts so your production users are safe from crashing if somehow things don't go as good as expected.
Ackee team
ACKategories is available under the MIT license. See the LICENSE file for more info.