每当一组 SignalProducers 发生变化时,如何触发一个代码块?换句话说,我如何摆脱我当前的冗余代码:
property1.producer.startWithValues { (value) in
// do stuff with property1.value and property2.value
}
property2.producer.startWithValues { (value) in
// do the same stuff with property1.value and property2.value
}