CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Mar 2016 |
| SPMSupports SPM | ✗ |
Maintained by Brad Hilton.
In Swift development it’s all to familiar to see nested GCD code like the following:
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)) { () -> Void in
// Do some background work...
dispatch_async(dispatch_get_main_queue()) { () -> Void in
// Display results on main queue...
}
}Piper removes nesting and lets you chain arbitrary operations on any queue you like:
background {
// Do some background work...
}.main {
// Display results on main queue...
}.execute()Piper is available through CocoaPods. To install, simply include the following lines in your podfile:
use_frameworks!
pod 'Piper'Be sure to import the module at the top of your .swift files:
import PiperAlternatively, clone this repo or download it as a zip and include the classes in your project.
Brad Hilton, [email protected]
Piper is available under the MIT license. See the LICENSE file for more info.