ReactiveCocoa v5.0.3 發布

jopen 8年前發布 | 6K 次閱讀 MVVM ReactiveCocoa

 

ReactiveCocoa的核心為signals即RACSignal類。Signals發出三種類型的事件流:next、completed、和error。

通過此模式,ReactiveCocoa可以用來替代delegate、target-action、key-value observing等模式。

通過signal API創建的代碼更加統一且易讀.但ReactiveCocoa真正強大之處在于通過這些信號源能進行更多高級操作.這些操作能在相當簡潔高雅的操作下執行復雜的篩選、轉換、信號協調等。在MVVM中,ReactiveCocoa扮演著重要角色.它提供ViewModel和View之間的綁定操作。

更新日志

  • New KVO API: NSObject.reactive(self:).signal(forKeyPath:). (#3413, kudos to @Burgestrand)
  • New binding targets for UINavigationItem and UITabBarItem. (#3444, kudos to @Marcocanc)
  • New binding targets for UIFeedbackGenerator and its subclasses. (#3447, kudos to @Marcocanc)
  • NSObject.reactive(self:).values(forKeyPath:) is deprecated and replaced byNSObject.reactive(self:).producer(forKeyPath:). (#3413)
  • The KVO API now supports object values that are of native Swift classes properly. (#3439, kudos to@andersio)
  • A bug that could lead to deadlocks and unexpected nil in the KVO API on any arbitrary key path was fixed. (#3439)
  • Continuous text signals of UITextField now emits the latest value for all editing events emitted. In other words, replacements due to autocompletions are now covered by the signals. (#3442 , kudos to@andersio)
  • Fixed a ObjC swizzling bug that caused ActionProxy not working well with KVO and RAC method interception. (#3435, kudos to @andersio)

下載

本站原創,轉載時保留以下信息:
本文轉自:深度開源(open-open.com)
原文地址:http://www.baiduhome.net/news/view/158e6d4c

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!