ReactiveCocoa v4.2.1 發布

ReactiveCocoa的核心為signals即RACSignal類。Signals發出三種類型的事件流:next、completed、和error。
通過此模式,ReactiveCocoa可以用來替代delegate、target-action、key-value observing等模式。
通過signal API創建的代碼更加統一且易讀.但ReactiveCocoa真正強大之處在于通過這些信號源能進行更多高級操作.這些操作能在相當簡潔高雅的操作下執行復雜的篩選、轉換、信號協調等。在MVVM中,ReactiveCocoa扮演著重要角色.它提供ViewModel和View之間的綁定操作。
更新日志
新增
Signal.debounce()/SignalProducer.debounce()for sending valuesintervalseconds apart (#2952, thanks @mdiep and @natestedman!)ObserverTypeprotocol for type-constrained extensions ofObserver(#2992, thanks@natestedman!)flatten()variants that operate onSequenceTypes (#2975, thanks @miikegb!)
Bug修復
- Binding a producer to a
MutablePropertyTypeleaked memory (#2961, thanks @github-user32!) zip()d producers didn’t complete after both sources completed (#2972, thanks @andersio!)then()didn’t forward interruptions from the original producer (#2987, thanks @sharplet!)TestSchedulerdidn’t have the correctcurrentDatewhile advancing (#2991, thanks @inamiy!).
下載
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!