Slide 30
Slide 30 text
Reac%veCocoa Extensions
extension SignalProducerType {
func repeatWith(
producer: SignalProducer<(), NoError>,
throttleWithInterval: NSTimeInterval,
onScheduler scheduler: DateSchedulerType
) -> SignalProducer {
return SignalProducer(value: ()).concat(producer)
.throttle(throttleWithInterval, onScheduler: scheduler)
.promoteErrors(Error)
.flatMap(.Concat) { _ in
return self.producer
}
}
}
"Building Fabric.app with Reac6veCocoa" - Javier Soto. RACDC2016 - April 2016 30