From d5c977109a48bddcf5ace80fe751a4e43d27d469 Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Sun, 5 Jul 2015 18:40:06 +0200 Subject: [PATCH] Update documentation and polishing. --- README.md | 87 ++++++++------ RxCocoa/RxCocoa/Common/DelegateProxy.swift | 4 +- .../RxCocoa/Common/DelegateProxyType.swift | 24 ++-- RxCocoa/RxCocoa/Common/RxCocoa.swift | 10 ++ RxCocoa/RxCocoa/OSX/NSTextField+Rx.swift | 2 +- ...ollectionViewReactiveArrayDataSource.swift | 4 +- .../RxTableViewReactiveArrayDataSource.swift | 4 +- RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift | 2 +- .../RxCollectionViewDataSourceProxy.swift | 2 +- .../RxCollectionViewDelegateProxy.swift | 29 ----- .../Proxies/RxScrollViewDelegateProxy.swift | 12 +- .../iOS/Proxies/RxSeachBarDelegateProxy.swift | 2 +- .../Proxies/RxTableViewDataSourceProxy.swift | 2 +- .../Proxies/RxTableViewDelegateProxy.swift | 29 ----- RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift | 86 +++++++------- RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift | 4 +- RxCocoa/RxCocoa/iOS/UITableView+Rx.swift | 106 +++++++++++------- .../PartialUpdatesViewController.swift | 15 ++- .../TableView/TableViewController.swift | 2 +- .../Views/WikipediaSearchViewController.swift | 2 + RxSwift/RxSwift/Subjects/PublishSubject.swift | 7 ++ RxTests/RxTests.xcodeproj/project.pbxproj | 41 ------- 22 files changed, 227 insertions(+), 249 deletions(-) diff --git a/README.md b/README.md index e1cf09ca..3cbd17fb 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ Now something a little more interesting: * bind results to label (resultLabel.rx_subscribeTextTo) ```swift -let subscription/*: Disposable */ = primeTextField.rx_text // type is Observable +let subscription/*: Disposable */ = primeTextField.rx_text // type is Observable >- map { WolframAlphaIsPrime($0.toInt() ?? 0) } // type is Observable> >- concat // type is Observable >- map { "number \($0.n) is prime? \($0.isPrime)" } // type is Observable @@ -245,6 +245,7 @@ Operators are stateless by default. * [`distinctUntilChanged`](http://reactivex.io/documentation/operators/distinct.html) * [`filter` / `where`](http://reactivex.io/documentation/operators/filter.html) * [`sample`](http://reactivex.io/documentation/operators/sample.html) + * [`skip`](http://reactivex.io/documentation/operators/skip.html) * [`take`](http://reactivex.io/documentation/operators/take.html) #### Combining Observables @@ -325,6 +326,16 @@ extension NSNotificationCenter { } ``` +```swift +class DelegateProxy { + + public func observe(selector: Selector) -> Observable<[AnyObject]> {} + + public dispose() {} + +} +``` + **iOS** ```swift @@ -333,6 +344,8 @@ extension UIControl { public func rx_controlEvents(controlEvents: UIControlEvents) -> Observable { } + public func rx_subscribeEnabledTo(source: Observable) -> Disposable {} + } ``` @@ -356,6 +369,8 @@ extension UITextField { ```swift extension UISearchBar { + public var rx_delegate: DelegateProxy {} + public var rx_searchText: Observable {} } @@ -393,6 +408,10 @@ extension UIImageView { ```swift extension UIScrollView { + public var rx_delegate: DelegateProxy {} + + public func rx_setDelegate(delegate: UIScrollViewDelegate) {} + public var rx_contentOffset: Observable {} } @@ -416,51 +435,54 @@ extension UISlider { ```swift extension UITableView { + + public var rx_dataSource: DelegateProxy {} - public func rx_elementTap() -> Observable {} + public func rx_setDataSource(dataSource: UITableViewDataSource) -> Disposable {} - public func rx_rowTap() -> Observable<(UITableView, Int)> {} + public func rx_subscribeWithReactiveDataSource>(dataSource: DataSource) + -> Observable -> Disposable {} - public func rx_subscribeRowsTo - (dataSource: TableViewDataSource) - (source: Observable<[E]>) - -> Disposable {} + public func rx_subscribeItemsTo(cellFactory: (UITableView, Int, Item) -> UITableViewCell) + -> Observable<[Item]> -> Disposable {} - public func rx_subscribeRowsTo - (cellFactory: (UITableView, NSIndexPath, E) -> UITableViewCell) - (source: Observable<[E]>) - -> Disposable {} + public func rx_subscribeItemsToWithCellIdentifier(cellIdentifier: String, configureCell: (NSIndexPath, Item, Cell) -> Void) + -> Observable<[Item]> -> Disposable {} - public func rx_subscribeRowsToCellWithIdentifier - (cellIdentifier: String, configureCell: (UITableView, NSIndexPath, E, Cell) -> Void) - (source: Observable<[E]>) - -> Disposable {} + public var rx_itemSelected: Observable {} + + public var rx_itemInserted: Observable {} + + public var rx_itemDeleted: Observable {} + + public var rx_itemMoved: Observable {} + + // This method only works in case one of the `rx_subscribeItemsTo` methods was used. + public func rx_modelSelected() -> Observable {} } ``` ```swift extension UICollectionView { + + public var rx_dataSource: DelegateProxy {} - public var rx_itemTap: -> Observable<(UICollectionView, Int)> {} + public func rx_setDataSource(dataSource: UICollectionViewDataSource) -> Disposable {} + + public func rx_subscribeWithReactiveDataSource>(dataSource: DataSource) + -> Observable -> Disposable {} - public func rx_elementTap() -> Observable {} + public func rx_subscribeItemsTo(cellFactory: (UICollectionView, Int, Item) -> UICollectionViewCell) + -> Observable<[Item]> -> Disposable {} - public func rx_subscribeItemsTo - (dataSource: CollectionViewDataSource) - (source: Observable<[E]>) - -> Disposable {} + public func rx_subscribeItemsToWithCellIdentifier(cellIdentifier: String, configureCell: (Int, Item, Cell) -> Void) + -> Observable<[Item]> -> Disposable {} - public func rx_subscribeItemsTo - (cellFactory: (UICollectionView, NSIndexPath, E) -> UICollectionViewCell) - (source: Observable<[E]>) - -> Disposable {} - - public func rx_subscribeItemsWithIdentifierTo - (cellIdentifier: String, configureCell: (UICollectionView, NSIndexPath, E, Cell) -> Void) - (source: Observable<[E]>) - -> Disposable {} + public var rx_itemSelected: Observable {} + // This method only works in case one of the `rx_subscribeItemsTo` methods was used. + public func rx_modelSelected() -> Observable {} } ``` **OSX** @@ -504,10 +526,11 @@ extension NSImageView { ```swift extension NSTextField { - public func rx_subscribeTextTo(source: Observable) -> Disposable {} - + public var rx_delegate: DelegateProxy {} + public var rx_text: Observable {} + public func rx_subscribeTextTo(source: Observable) -> Disposable {} } ``` diff --git a/RxCocoa/RxCocoa/Common/DelegateProxy.swift b/RxCocoa/RxCocoa/Common/DelegateProxy.swift index 214bc0ad..6907cbd0 100644 --- a/RxCocoa/RxCocoa/Common/DelegateProxy.swift +++ b/RxCocoa/RxCocoa/Common/DelegateProxy.swift @@ -70,7 +70,7 @@ public class DelegateProxy : _RXDelegateProxy { return self(parentObject: object) } - public class func getAssignedProxyFor(object: AnyObject) -> Self? { + public class func assignedProxyFor(object: AnyObject) -> Self? { let maybeDelegate: AnyObject! = objc_getAssociatedObject(object, self.delegateAssociatedObjectTag()) return castOptionalOrFatalError(maybeDelegate) } @@ -85,7 +85,7 @@ public class DelegateProxy : _RXDelegateProxy { self._setForwardToDelegate(delegate, retainDelegate: retainDelegate) } - public func getForwardToDelegate() -> AnyObject? { + public func forwardToDelegate() -> AnyObject? { return self._forwardToDelegate } diff --git a/RxCocoa/RxCocoa/Common/DelegateProxyType.swift b/RxCocoa/RxCocoa/Common/DelegateProxyType.swift index 282cde22..d7f342e0 100644 --- a/RxCocoa/RxCocoa/Common/DelegateProxyType.swift +++ b/RxCocoa/RxCocoa/Common/DelegateProxyType.swift @@ -84,16 +84,16 @@ public protocol DelegateProxyType : AnyObject { // There can be only one registered proxy per object // These functions control that. + static func assignedProxyFor(object: AnyObject) -> Self? static func assignProxy(proxy: AnyObject, toObject object: AnyObject) - static func getAssignedProxyFor(object: AnyObject) -> Self? // Set/Get current delegate for object - static func getCurrentDelegateFor(object: AnyObject) -> AnyObject? + static func currentDelegateFor(object: AnyObject) -> AnyObject? static func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) // Set/Get current delegate on proxy + func forwardToDelegate() -> AnyObject? func setForwardToDelegate(forwardToDelegate: AnyObject?, retainDelegate: Bool) - func getForwardToDelegate() -> AnyObject? } // future extensions :) @@ -102,25 +102,25 @@ public protocol DelegateProxyType : AnyObject { func proxyForObject(object: AnyObject) -> P { MainScheduler.ensureExecutingOnScheduler() - let maybeProxy = P.getAssignedProxyFor(object) + let maybeProxy = P.assignedProxyFor(object) let proxy: P if maybeProxy == nil { proxy = P.createProxyForObject(object) P.assignProxy(proxy, toObject: object) - assert(P.getAssignedProxyFor(object) === proxy) + assert(P.assignedProxyFor(object) === proxy) } else { proxy = maybeProxy! } - let currentDelegate: AnyObject? = P.getCurrentDelegateFor(object) + let currentDelegate: AnyObject? = P.currentDelegateFor(object) if currentDelegate !== proxy { proxy.setForwardToDelegate(currentDelegate, retainDelegate: false) P.setCurrentDelegate(proxy, toObject: object) - assert(P.getCurrentDelegateFor(object) === proxy) - assert(proxy.getForwardToDelegate() === currentDelegate) + assert(P.currentDelegateFor(object) === proxy) + assert(proxy.forwardToDelegate() === currentDelegate) } return proxy @@ -129,7 +129,7 @@ func proxyForObject(object: AnyObject) -> P { func installDelegate(proxy: P, delegate: AnyObject, retainDelegate: Bool, onProxyForObject object: AnyObject) -> Disposable { //assert(proxy === proxyForObject(object)) - assert(proxy.getForwardToDelegate() === nil, "There is already a set delegate \(proxy.getForwardToDelegate())") + assert(proxy.forwardToDelegate() === nil, "There is already a set delegate \(proxy.forwardToDelegate())") proxy.setForwardToDelegate(delegate, retainDelegate: retainDelegate) @@ -138,12 +138,12 @@ func installDelegate(proxy: P, delegate: AnyObject, retain P.setCurrentDelegate(nil, toObject: object) P.setCurrentDelegate(proxy, toObject: object) - assert(proxy.getForwardToDelegate() === delegate, "Setting of delegate failed") + assert(proxy.forwardToDelegate() === delegate, "Setting of delegate failed") return AnonymousDisposable { MainScheduler.ensureExecutingOnScheduler() - assert(proxy.getForwardToDelegate() === delegate, "Delegate was changed from time it was first set. Current \(proxy.getForwardToDelegate()), and it should have been \(proxy)") + assert(proxy.forwardToDelegate() === delegate, "Delegate was changed from time it was first set. Current \(proxy.forwardToDelegate()), and it should have been \(proxy)") proxy.setForwardToDelegate(nil, retainDelegate: retainDelegate) } @@ -175,7 +175,7 @@ func setProxyDataSourceForObject(object: AnyObjec let subscription = source.subscribe(AnonymousObserver { event in MainScheduler.ensureExecutingOnScheduler() - assert(proxy === P.getCurrentDelegateFor(object), "Proxy changed from the time it was first set.\nOriginal: \(proxy)\nExisting: \(P.getCurrentDelegateFor(object))") + assert(proxy === P.currentDelegateFor(object), "Proxy changed from the time it was first set.\nOriginal: \(proxy)\nExisting: \(P.currentDelegateFor(object))") binding(proxy, event) }) diff --git a/RxCocoa/RxCocoa/Common/RxCocoa.swift b/RxCocoa/RxCocoa/Common/RxCocoa.swift index 6d6c839b..36189452 100644 --- a/RxCocoa/RxCocoa/Common/RxCocoa.swift +++ b/RxCocoa/RxCocoa/Common/RxCocoa.swift @@ -97,6 +97,16 @@ func castOptionalOrFatalError(value: AnyObject?) -> T? { return v } +func castOrFatalError(value: AnyObject!, message: String) -> T { + let result: RxResult = castOrFail(value) + + if result.isFailure { + rxFatalError(message) + } + + return result.get() +} + func castOrFatalError(value: AnyObject!) -> T { let result: RxResult = castOrFail(value) diff --git a/RxCocoa/RxCocoa/OSX/NSTextField+Rx.swift b/RxCocoa/RxCocoa/OSX/NSTextField+Rx.swift index e1f121de..2c683fe6 100644 --- a/RxCocoa/RxCocoa/OSX/NSTextField+Rx.swift +++ b/RxCocoa/RxCocoa/OSX/NSTextField+Rx.swift @@ -31,7 +31,7 @@ class RxTextFieldDelegate : DelegateProxy dispatchNext(nextValue, observers) } - class func getCurrentDelegateFor(object: AnyObject) -> AnyObject? { + class func currentDelegateFor(object: AnyObject) -> AnyObject? { let textField: NSTextField = castOrFatalError(object) return textField.delegate } diff --git a/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift b/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift index 2f8d1b13..6a338b5c 100644 --- a/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift +++ b/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift @@ -39,7 +39,7 @@ class RxCollectionViewReactiveArrayDataSource : _RxCollectionViewRe , RxCollectionViewDataSourceType { typealias Element = [ElementType] - typealias CellFactory = (UICollectionView, NSIndexPath, ElementType) -> UICollectionViewCell + typealias CellFactory = (UICollectionView, Int, ElementType) -> UICollectionViewCell var itemModels: [ElementType]? = nil @@ -60,7 +60,7 @@ class RxCollectionViewReactiveArrayDataSource : _RxCollectionViewRe } override func _collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - return cellFactory(collectionView, indexPath, itemModels![indexPath.item]) + return cellFactory(collectionView, indexPath.item, itemModels![indexPath.item]) } // reactive diff --git a/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift b/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift index 229896ce..005bae91 100644 --- a/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift +++ b/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift @@ -39,7 +39,7 @@ class RxTableViewReactiveArrayDataSource : _RxTableViewReactiveArra , RxTableViewDataSourceType { typealias Element = [ElementType] - typealias CellFactory = (UITableView, NSIndexPath, ElementType) -> UITableViewCell + typealias CellFactory = (UITableView, Int, ElementType) -> UITableViewCell var itemModels: [ElementType]? = nil @@ -58,7 +58,7 @@ class RxTableViewReactiveArrayDataSource : _RxTableViewReactiveArra } override func _tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - return cellFactory(tableView, indexPath, itemModels![indexPath.row]) + return cellFactory(tableView, indexPath.item, itemModels![indexPath.row]) } // reactive diff --git a/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift b/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift index 51507ac9..f871389e 100644 --- a/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift +++ b/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift @@ -9,4 +9,4 @@ import Foundation import UIKit -public typealias ItemMovedEvent = (sourceIndexPath: NSIndexPath, destinationIndexPath: NSIndexPath) \ No newline at end of file +public typealias ItemMovedEvent = (sourceIndex: NSIndexPath, destinationIndex: NSIndexPath) \ No newline at end of file diff --git a/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift b/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift index 5e2f7ab9..4698648c 100644 --- a/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift +++ b/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift @@ -61,7 +61,7 @@ class RxCollectionViewDataSourceProxy : DelegateProxy collectionView.dataSource = castOptionalOrFatalError(delegate) } - class func getCurrentDelegateFor(object: AnyObject) -> AnyObject? { + class func currentDelegateFor(object: AnyObject) -> AnyObject? { let collectionView: UICollectionView = castOrFatalError(object) return collectionView.dataSource } diff --git a/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift b/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift index 53379061..a406ea50 100644 --- a/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift +++ b/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift @@ -10,37 +10,8 @@ import Foundation import UIKit import RxSwift -let collectionViewDelegateNotSet = CollectionViewDelegateNotSet() - -class CollectionViewDelegateNotSet : NSObject - , UICollectionViewDelegate { -} - // Please take a look at `DelegateProxyType.swift` class RxCollectionViewDelegateProxy : RxScrollViewDelegateProxy , UICollectionViewDelegate { - typealias ItemSelectedObserver = ObserverOf - typealias ItemSelectedDisposeKey = Bag.KeyType - - unowned let collectionView: UICollectionView - - var itemSelectedObservers: Bag = Bag() - - required init(parentObject: AnyObject) { - self.collectionView = parentObject as! UICollectionView - - super.init(parentObject: parentObject) - } - - func addItemSelectedObserver(observer: ItemSelectedObserver) -> ItemSelectedDisposeKey { - return itemSelectedObservers.put(observer) - } - - func removeItemSelectedObserver(key: ItemSelectedDisposeKey) { - let element = itemSelectedObservers.removeKey(key) - if element == nil { - removingObserverFailed() - } - } } \ No newline at end of file diff --git a/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift b/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift index 099eb9e2..ef322be0 100644 --- a/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift +++ b/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift @@ -10,12 +10,6 @@ import Foundation import RxSwift import UIKit -let scrollViewDelegateNotSet = ScrollViewDelegateNotSet() - -class ScrollViewDelegateNotSet : NSObject - , UIScrollViewDelegate { -} - // Please take a look at `DelegateProxyType.swift` class RxScrollViewDelegateProxy : DelegateProxy , UIScrollViewDelegate @@ -27,8 +21,6 @@ class RxScrollViewDelegateProxy : DelegateProxy unowned let scrollView: UIScrollView - unowned var scrollViewDelegate: UIScrollViewDelegate = scrollViewDelegateNotSet - required init(parentObject: AnyObject) { self.scrollView = parentObject as! UIScrollView super.init(parentObject: parentObject) @@ -57,7 +49,7 @@ class RxScrollViewDelegateProxy : DelegateProxy func scrollViewDidScroll(scrollView: UIScrollView) { dispatchNext(scrollView.contentOffset, contentOffsetObservers) - scrollViewDelegate.scrollViewDidScroll?(scrollView) + self._forwardToDelegate?.scrollViewDidScroll?(scrollView) } // delegate proxy @@ -73,7 +65,7 @@ class RxScrollViewDelegateProxy : DelegateProxy collectionView.delegate = castOptionalOrFatalError(delegate) } - class func getCurrentDelegateFor(object: AnyObject) -> AnyObject? { + class func currentDelegateFor(object: AnyObject) -> AnyObject? { let collectionView: UIScrollView = castOrFatalError(object) return collectionView.delegate } diff --git a/RxCocoa/RxCocoa/iOS/Proxies/RxSeachBarDelegateProxy.swift b/RxCocoa/RxCocoa/iOS/Proxies/RxSeachBarDelegateProxy.swift index 663127a9..df917a82 100644 --- a/RxCocoa/RxCocoa/iOS/Proxies/RxSeachBarDelegateProxy.swift +++ b/RxCocoa/RxCocoa/iOS/Proxies/RxSeachBarDelegateProxy.swift @@ -14,7 +14,7 @@ class RxSearchBarDelegateProxy : DelegateProxy , UISearchBarDelegate , DelegateProxyType { - class func getCurrentDelegateFor(object: AnyObject) -> AnyObject? { + class func currentDelegateFor(object: AnyObject) -> AnyObject? { let searchBar: UISearchBar = castOrFatalError(object) return searchBar.delegate } diff --git a/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift b/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift index d9cda4f7..47fd383c 100644 --- a/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift +++ b/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift @@ -66,7 +66,7 @@ class RxTableViewDataSourceProxy : DelegateProxy collectionView.dataSource = castOptionalOrFatalError(delegate) } - class func getCurrentDelegateFor(object: AnyObject) -> AnyObject? { + class func currentDelegateFor(object: AnyObject) -> AnyObject? { let collectionView: UITableView = castOrFatalError(object) return collectionView.dataSource } diff --git a/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift b/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift index 6571de0e..b826cbaa 100644 --- a/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift +++ b/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift @@ -10,37 +10,8 @@ import Foundation import UIKit import RxSwift -let tableViewDelegateNotSet = TableViewDelegateNotSet() - -class TableViewDelegateNotSet : NSObject - , UITableViewDelegate { - -} - // Please take a look at `DelegateProxyType.swift` class RxTableViewDelegateProxy : RxScrollViewDelegateProxy , UITableViewDelegate { - typealias ItemSelectedObserver = ObserverOf - typealias ItemSelectedDisposeKey = Bag.KeyType - unowned let tableView: UITableView - - var itemSelectedObservers: Bag = Bag() - - required init(parentObject: AnyObject) { - self.tableView = parentObject as! UITableView - - super.init(parentObject: parentObject) - } - - func addItemSelectedObserver(observer: ItemSelectedObserver) -> ItemSelectedDisposeKey { - return itemSelectedObservers.put(observer) - } - - func removeItemSelectedObserver(key: ItemSelectedDisposeKey) { - let element = itemSelectedObservers.removeKey(key) - if element == nil { - removingObserverFailed() - } - } } \ No newline at end of file diff --git a/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift b/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift index 182de037..2d28d758 100644 --- a/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift +++ b/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift @@ -26,6 +26,13 @@ extension UICollectionView { } } + // For more detailed explanations, take a look at `DelegateProxyType.swift` + public func rx_setDataSource(dataSource: UICollectionViewDataSource) + -> Disposable { + let proxy: RxCollectionViewDataSourceProxy = proxyForObject(self) + return installDelegate(proxy, dataSource, false, onProxyForObject: self) + } + // data source // Registers reactive data source with collection view. @@ -40,32 +47,15 @@ extension UICollectionView { public func rx_subscribeWithReactiveDataSource> (dataSource: DataSource) -> Observable -> Disposable { - return setProxyDataSourceForObject(self, dataSource, false) { (_: RxCollectionViewDataSourceProxy, event) -> Void in - dataSource.collectionView(self, observedEvent: event) - } + return setProxyDataSourceForObject(self, dataSource, false) { (_: RxCollectionViewDataSourceProxy, event) -> Void in + dataSource.collectionView(self, observedEvent: event) + } } - - // Registers `UICollectionViewDataSource`. - // For more detailed explanations, take a look at `RxCollectionViewDataSourceType.swift` and `DelegateProxyType.swift` - public func rx_setDataSource(dataSource: UICollectionViewDataSource) - -> Disposable { - let proxy: RxCollectionViewDataSourceProxy = proxyForObject(self) - return installDelegate(proxy, dataSource, false, onProxyForObject: self) - } - - // delegate - - // For more detailed explanations, take a look at `DelegateProxyType.swift` - public func rx_setDelegate(delegate: UICollectionViewDelegate) - -> Disposable { - let proxy: RxCollectionViewDelegateProxy = proxyForObject(self) - return installDelegate(proxy, delegate, false, onProxyForObject: self) - } - + // `reloadData` - items subscription methods (it's assumed that there is one section, and it is typed `Void`) public func rx_subscribeItemsTo - (cellFactory: (UICollectionView, NSIndexPath, Item) -> UICollectionViewCell) + (cellFactory: (UICollectionView, Int, Item) -> UICollectionViewCell) -> Observable<[Item]> -> Disposable { return { source in let dataSource = RxCollectionViewReactiveArrayDataSource(cellFactory: cellFactory) @@ -74,12 +64,13 @@ extension UICollectionView { } public func rx_subscribeItemsToWithCellIdentifier - (cellIdentifier: String, configureCell: (NSIndexPath, Item, Cell) -> Void) + (cellIdentifier: String, configureCell: (Int, Item, Cell) -> Void) -> Observable<[Item]> -> Disposable { return { source in - let dataSource = RxCollectionViewReactiveArrayDataSource { (cv, indexPath, item) in + let dataSource = RxCollectionViewReactiveArrayDataSource { (cv, i, item) in + let indexPath = NSIndexPath(forItem: i, inSection: 0) let cell = cv.dequeueReusableCellWithReuseIdentifier(cellIdentifier, forIndexPath: indexPath) as! Cell - configureCell(indexPath, item, cell) + configureCell(i, item, cell) return cell } @@ -90,32 +81,47 @@ extension UICollectionView { // events public var rx_itemSelected: Observable { - return _proxyObservableForObject({ d, o in - return d.addItemSelectedObserver(o) - }, removeObserver: { (delegate, disposeKey) -> Void in - delegate.removeItemSelectedObserver(disposeKey) - }) + return rx_delegate.observe("collectionView:didSelectItemAtIndexPath:") + >- map { a in + return a[1] as! NSIndexPath + } } // typed events public func rx_modelSelected() -> Observable { return rx_itemSelected >- map { indexPath in - let dataSource: RxCollectionViewReactiveArrayDataSource = castOrFatalError(self.rx_dataSource.getForwardToDelegate()) + let dataSource: RxCollectionViewReactiveArrayDataSource = castOrFatalError(self.rx_dataSource.forwardToDelegate(), "This method only works in case one of the `rx_subscribeItemsTo` methods was used.") return dataSource.modelAtIndex(indexPath.item)! } } - - // private methods - - private func _proxyObservableForObject(addObserver: (RxCollectionViewDelegateProxy, ObserverOf) -> DisposeKey, removeObserver: (RxCollectionViewDelegateProxy, DisposeKey) -> Void) -> Observable { - return proxyObservableForObject(self, addObserver, removeObserver) +} + +// deprecated +extension UICollectionView { + @availability(*, deprecated=1.7, message="Replaced by `rx_subscribeItemsToWithCellIdentifier`") + public func rx_subscribeItemsWithIdentifierTo + (cellIdentifier: String, configureCell: (UICollectionView, NSIndexPath, E, Cell) -> Void) + (source: Observable<[E]>) + -> Disposable { + let l = rx_subscribeItemsToWithCellIdentifier(cellIdentifier) { (i: Int, e: E, cell: Cell) in + return configureCell(self, NSIndexPath(forItem: i, inSection: 0), e, cell) + } + + return l(source) } - private func _dataSourceObservable(addObserver: (RxCollectionViewDataSourceProxy, ObserverOf) -> DisposeKey, - removeObserver: (RxCollectionViewDataSourceProxy, DisposeKey) -> Void) - -> Observable { - return proxyObservableForObject(self, addObserver, removeObserver) + @availability(*, deprecated=1.7, message="Replaced by `rx_itemSelected`") + public func rx_itemTap() -> Observable<(UICollectionView, Int)> { + return rx_itemSelected + >- map { i in + return (self, i.item) + } + } + + @availability(*, deprecated=1.7, message="Replaced by `rx_modelSelected`") + public func rx_elementTap() -> Observable { + return rx_modelSelected() } } \ No newline at end of file diff --git a/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift b/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift index d208200c..a1844ecf 100644 --- a/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift +++ b/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift @@ -37,9 +37,9 @@ extension UIScrollView { // delegate // For more detailed explanations, take a look at `DelegateProxyType.swift` - public func rx_setDelegate(delegate: UIScrollViewDelegate, retainDelegate: Bool) + public func rx_setDelegate(delegate: UIScrollViewDelegate) -> Disposable { let proxy: RxScrollViewDelegateProxy = proxyForObject(self) - return installDelegate(proxy, delegate, retainDelegate, onProxyForObject: self) + return installDelegate(proxy, delegate, false, onProxyForObject: self) } } \ No newline at end of file diff --git a/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift b/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift index 8ac7fd00..2e966a2e 100644 --- a/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift +++ b/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift @@ -24,6 +24,13 @@ extension UITableView { return proxyForObject(self) as RxTableViewDataSourceProxy } + public func rx_setDataSource(dataSource: UITableViewDataSource) + -> Disposable { + let proxy: RxTableViewDataSourceProxy = proxyForObject(self) + + return installDelegate(proxy, dataSource, false, onProxyForObject: self) + } + // data source // Registers reactive data source with table view. @@ -43,29 +50,10 @@ extension UITableView { } } - // Registers `UITableViewDataSource`. - // For more detailed explanations, take a look at `RxTableViewDataSourceType.swift` and `DelegateProxyType.swift` - public func rx_setDataSource(dataSource: UITableViewDataSource) - -> Disposable { - let proxy: RxTableViewDataSourceProxy = proxyForObject(self) - - return installDelegate(proxy, dataSource, false, onProxyForObject: self) - } - - // delegate - - // For more detailed explanations, take a look at `DelegateProxyType.swift` - public func rx_setDelegate(delegate: UITableViewDelegate) - -> Disposable { - let proxy: RxTableViewDelegateProxy = proxyForObject(self) - - return installDelegate(proxy, delegate, false, onProxyForObject: self) - } - // `reloadData` - items subscription methods (it's assumed that there is one section, and it is typed `Void`) public func rx_subscribeItemsTo - (cellFactory: (UITableView, NSIndexPath, Item) -> UITableViewCell) + (cellFactory: (UITableView, Int, Item) -> UITableViewCell) -> Observable<[Item]> -> Disposable { return { source in let dataSource = RxTableViewReactiveArrayDataSource(cellFactory: cellFactory) @@ -78,7 +66,8 @@ extension UITableView { (cellIdentifier: String, configureCell: (NSIndexPath, Item, Cell) -> Void) -> Observable<[Item]> -> Disposable { return { source in - let dataSource = RxTableViewReactiveArrayDataSource { (tv, indexPath, item) in + let dataSource = RxTableViewReactiveArrayDataSource { (tv, i, item) in + let indexPath = NSIndexPath(forItem: i, inSection: 0) let cell = tv.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath) as! Cell configureCell(indexPath, item, cell) return cell @@ -92,11 +81,10 @@ extension UITableView { public var rx_itemSelected: Observable { - return _proxyObservableForObject({ d, o in - return d.addItemSelectedObserver(o) - }, removeObserver: { (delegate, disposeKey) -> Void in - delegate.removeItemSelectedObserver(disposeKey) - }) + return rx_delegate.observe("tableView:didSelectRowAtIndexPath:") + >- map { a in + return a[1] as! NSIndexPath + } } public var rx_itemInserted: Observable { @@ -105,7 +93,7 @@ extension UITableView { return UITableViewCellEditingStyle(rawValue: (a[1] as! NSNumber).integerValue) == .Insert } >- map { a in - return a[2] as! NSIndexPath + return (a[2] as! NSIndexPath) } } @@ -115,36 +103,72 @@ extension UITableView { return UITableViewCellEditingStyle(rawValue: (a[1] as! NSNumber).integerValue) == .Delete } >- map { a in - return a[2] as! NSIndexPath + return (a[2] as! NSIndexPath) } } public var rx_itemMoved: Observable { return rx_dataSource.observe("tableView:moveRowAtIndexPath:toIndexPath:") >- map { a in - return (a[1] as! NSIndexPath, a[2] as! NSIndexPath) + return ((a[1] as! NSIndexPath), (a[2] as! NSIndexPath)) } } // typed events - + // This method only works in case one of the `rx_subscribeItemsTo` methods was used. public func rx_modelSelected() -> Observable { - return rx_itemSelected >- map { indexPath in - let dataSource: RxTableViewReactiveArrayDataSource = castOrFatalError(self.rx_dataSource.getForwardToDelegate()) + return rx_itemSelected >- map { ip in + let dataSource: RxTableViewReactiveArrayDataSource = castOrFatalError(self.rx_dataSource.forwardToDelegate(), "This method only works in case one of the `rx_subscribeItemsTo` methods was used.") - return dataSource.modelAtIndex(indexPath.item)! + return dataSource.modelAtIndex(ip.item)! } } - // private methods - - private func _proxyObservableForObject(addObserver: (RxTableViewDelegateProxy, ObserverOf) -> DisposeKey, removeObserver: (RxTableViewDelegateProxy, DisposeKey) -> Void) -> Observable { - return proxyObservableForObject(self, addObserver, removeObserver) +} + +// deprecated +extension UITableView { + @availability(*, deprecated=1.7, message="Replaced by `rx_subscribeWithReactiveDataSource`") + public func rx_subscribeRowsTo + (dataSource: UITableViewDataSource) + (source: Observable<[E]>) + -> Disposable { + return rx_setDataSource(dataSource) } - private func _createDataSourceObservable(addObserver: (RxTableViewDataSourceProxy, ObserverOf) -> DisposeKey, - removeObserver: (RxTableViewDataSourceProxy, DisposeKey) -> Void) - -> Observable { - return proxyObservableForObject(self, addObserver, removeObserver) + @availability(*, deprecated=1.7, message="Replaced by `rx_setDataSource`") + public func rx_subscribeRowsTo + (cellFactory: (UITableView, NSIndexPath, E) -> UITableViewCell) + (source: Observable<[E]>) + -> Disposable { + let l = rx_subscribeItemsTo { (tv: UITableView, i: Int, e: E) -> UITableViewCell in + return cellFactory(tv, NSIndexPath(forItem: i, inSection: 0), e) + } + + return l(source) + } + + @availability(*, deprecated=1.7, message="Replaced by `rx_subscribeItemsToWithCellIdentifier`") + public func rx_subscribeRowsToCellWithIdentifier + (cellIdentifier: String, configureCell: (UITableView, NSIndexPath, E, Cell) -> Void) + (source: Observable<[E]>) + -> Disposable { + let l = rx_subscribeItemsToWithCellIdentifier(cellIdentifier) { (ip: NSIndexPath, e: E, c: Cell) -> Void in + configureCell(self, ip, e, c) + } + return l(source) + } + + @availability(*, deprecated=1.7, message="Replaced by `rx_itemSelected`") + public func rx_rowTap() -> Observable<(UITableView, Int)> { + return rx_itemSelected + >- map { ip in + return (self, ip.item) + } + } + + @availability(*, deprecated=1.7, message="Replaced by `rx_modelSelected`") + public func rx_elementTap() -> Observable { + return rx_modelSelected() } } \ No newline at end of file diff --git a/RxExample/RxExample/Examples/PartialUpdates/PartialUpdatesViewController.swift b/RxExample/RxExample/Examples/PartialUpdates/PartialUpdatesViewController.swift index 9b3f411b..6e036695 100644 --- a/RxExample/RxExample/Examples/PartialUpdates/PartialUpdatesViewController.swift +++ b/RxExample/RxExample/Examples/PartialUpdates/PartialUpdatesViewController.swift @@ -138,7 +138,20 @@ class PartialUpdatesViewController : ViewController { updates >- partialUpdatesCollectionViewOutlet.rx_subscribeWithReactiveDataSource(cvAnimatedDataSource) >- disposeBag.addDisposable - + + // touches + + partialUpdatesCollectionViewOutlet.rx_itemSelected + >- subscribeNext { [unowned self] i in + println("Let me guess, it's .... It's \(self.generator.sections[i.section].items[i.item]), isn't it? Yeah, I've got it.") + } + >- disposeBag.addDisposable + + merge(from([partialUpdatesTableViewOutlet.rx_itemSelected, reloadTableViewOutlet.rx_itemSelected])) + >- subscribeNext { [unowned self] i in + println("I have a feeling it's .... \(self.generator.sections[i.section].items[i.item])?") + } + >- disposeBag.addDisposable } override func viewWillDisappear(animated: Bool) { diff --git a/RxExample/RxExample/Examples/TableView/TableViewController.swift b/RxExample/RxExample/Examples/TableView/TableViewController.swift index b88f6a6f..c44370a0 100644 --- a/RxExample/RxExample/Examples/TableView/TableViewController.swift +++ b/RxExample/RxExample/Examples/TableView/TableViewController.swift @@ -62,7 +62,7 @@ class TableViewController: ViewController, UITableViewDelegate { // customization using delegate // RxTableViewDelegateBridge will forward correct messages - tableView.rx_setDelegate(self, retainDelegate: false) + tableView.rx_setDelegate(self) >- disposeBag.addDisposable tableView.rx_itemSelected diff --git a/RxExample/RxExample/Examples/WikipediaImageSearch/Views/WikipediaSearchViewController.swift b/RxExample/RxExample/Examples/WikipediaImageSearch/Views/WikipediaSearchViewController.swift index 094ed8d0..59d90bde 100644 --- a/RxExample/RxExample/Examples/WikipediaImageSearch/Views/WikipediaSearchViewController.swift +++ b/RxExample/RxExample/Examples/WikipediaImageSearch/Views/WikipediaSearchViewController.swift @@ -24,6 +24,8 @@ class WikipediaSearchViewController: ViewController { override func viewDidLoad() { super.viewDidLoad() + let a = Subject() + sendNext(a, 1) let resultsTableView = self.searchDisplayController!.searchResultsTableView let searchBar = self.searchDisplayController!.searchBar diff --git a/RxSwift/RxSwift/Subjects/PublishSubject.swift b/RxSwift/RxSwift/Subjects/PublishSubject.swift index a6ebf4c5..22ab154a 100644 --- a/RxSwift/RxSwift/Subjects/PublishSubject.swift +++ b/RxSwift/RxSwift/Subjects/PublishSubject.swift @@ -34,6 +34,13 @@ class Subscription : Disposable { } } +@availability(*, deprecated=1.7, message="Replaced by PublishSubject") +public class Subject : PublishSubject { + + public override init() { + super.init() + } +} public class PublishSubject : SubjectType, Disposable { typealias ObserverOf = Observer diff --git a/RxTests/RxTests.xcodeproj/project.pbxproj b/RxTests/RxTests.xcodeproj/project.pbxproj index 9e2a2e9d..6eba41e4 100644 --- a/RxTests/RxTests.xcodeproj/project.pbxproj +++ b/RxTests/RxTests.xcodeproj/project.pbxproj @@ -73,12 +73,6 @@ C88BB8AE1B07E64B0064D411 /* VariableTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C814CEA21AF5622600E98087 /* VariableTest.swift */; }; C88BB8B01B07E64B0064D411 /* RxCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C811086A1AF50E43001C13E4 /* RxCocoa.framework */; }; C88BB8B11B07E64B0064D411 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C811086B1AF50E43001C13E4 /* RxSwift.framework */; }; - C88C78821B3EB0C50061C5AB /* RxTableViewSectionedAnimatedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88C78781B3EB0C50061C5AB /* RxTableViewSectionedAnimatedDataSource.swift */; }; - C88C78831B3EB0C50061C5AB /* RxTableViewSectionedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88C78791B3EB0C50061C5AB /* RxTableViewSectionedDataSource.swift */; }; - C88C78841B3EB0C50061C5AB /* RxTableViewSectionedReloadDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88C787A1B3EB0C50061C5AB /* RxTableViewSectionedReloadDataSource.swift */; }; - C88C78881B3EB0C50061C5AB /* SectionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88C787F1B3EB0C50061C5AB /* SectionModel.swift */; }; - C88C78911B3F17C40061C5AB /* SectionedViewType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88C78901B3F17C40061C5AB /* SectionedViewType.swift */; }; - C88C78931B3F17CB0061C5AB /* Changeset.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88C78921B3F17CB0061C5AB /* Changeset.swift */; }; C897EC3B1B10E000009C2CB0 /* BehaviorSubjectTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C897EC3A1B10E000009C2CB0 /* BehaviorSubjectTest.swift */; }; C897EC3C1B10E000009C2CB0 /* BehaviorSubjectTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C897EC3A1B10E000009C2CB0 /* BehaviorSubjectTest.swift */; }; C897EC471B112070009C2CB0 /* Observable+MultipleTest+Zip.tt in Resources */ = {isa = PBXBuildFile; fileRef = C897EC461B112070009C2CB0 /* Observable+MultipleTest+Zip.tt */; }; @@ -134,12 +128,6 @@ C814CEA61AF642D600E98087 /* UI+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UI+RxTests.swift"; sourceTree = ""; }; C8633AE41B0A9FF300375D60 /* KVOObservableTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KVOObservableTests.swift; sourceTree = ""; }; C88BB8B71B07E64B0064D411 /* RxTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RxTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - C88C78781B3EB0C50061C5AB /* RxTableViewSectionedAnimatedDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTableViewSectionedAnimatedDataSource.swift; sourceTree = ""; }; - C88C78791B3EB0C50061C5AB /* RxTableViewSectionedDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTableViewSectionedDataSource.swift; sourceTree = ""; }; - C88C787A1B3EB0C50061C5AB /* RxTableViewSectionedReloadDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTableViewSectionedReloadDataSource.swift; sourceTree = ""; }; - C88C787F1B3EB0C50061C5AB /* SectionModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SectionModel.swift; sourceTree = ""; }; - C88C78901B3F17C40061C5AB /* SectionedViewType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SectionedViewType.swift; sourceTree = ""; }; - C88C78921B3F17CB0061C5AB /* Changeset.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Changeset.swift; sourceTree = ""; }; C897EC3A1B10E000009C2CB0 /* BehaviorSubjectTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BehaviorSubjectTest.swift; sourceTree = ""; }; C897EC461B112070009C2CB0 /* Observable+MultipleTest+Zip.tt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Observable+MultipleTest+Zip.tt"; sourceTree = ""; }; C897EC491B1123DA009C2CB0 /* Observable+MultipleTest+Zip.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Observable+MultipleTest+Zip.swift"; sourceTree = ""; }; @@ -177,7 +165,6 @@ children = ( C811086A1AF50E43001C13E4 /* RxCocoa.framework */, C811086B1AF50E43001C13E4 /* RxSwift.framework */, - C88C78761B3EB0C50061C5AB /* RxDataSourceStarterKit */, C81108221AF50E11001C13E4 /* Tests */, C81108211AF50E11001C13E4 /* Products */, ); @@ -296,28 +283,6 @@ path = Tests; sourceTree = ""; }; - C88C78761B3EB0C50061C5AB /* RxDataSourceStarterKit */ = { - isa = PBXGroup; - children = ( - C88C78771B3EB0C50061C5AB /* DataSources */, - C88C78921B3F17CB0061C5AB /* Changeset.swift */, - C88C78901B3F17C40061C5AB /* SectionedViewType.swift */, - C88C787F1B3EB0C50061C5AB /* SectionModel.swift */, - ); - name = RxDataSourceStarterKit; - path = ../RxDataSourceStarterKit; - sourceTree = ""; - }; - C88C78771B3EB0C50061C5AB /* DataSources */ = { - isa = PBXGroup; - children = ( - C88C78781B3EB0C50061C5AB /* RxTableViewSectionedAnimatedDataSource.swift */, - C88C78791B3EB0C50061C5AB /* RxTableViewSectionedDataSource.swift */, - C88C787A1B3EB0C50061C5AB /* RxTableViewSectionedReloadDataSource.swift */, - ); - path = DataSources; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -411,13 +376,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C88C78821B3EB0C50061C5AB /* RxTableViewSectionedAnimatedDataSource.swift in Sources */, C8B787FA1AF55CDE00206D02 /* Observable+ConcurrencyTest.swift in Sources */, C81108691AF50E2A001C13E4 /* RxTest.swift in Sources */, - C88C78831B3EB0C50061C5AB /* RxTableViewSectionedDataSource.swift in Sources */, C81108581AF50E2A001C13E4 /* Result+Equatable.swift in Sources */, C81108671AF50E2A001C13E4 /* Observable+TimeTest.swift in Sources */, - C88C78931B3F17CB0061C5AB /* Changeset.swift in Sources */, C81108551AF50E2A001C13E4 /* TestObservable.swift in Sources */, C8E3812B1B2083C2008CDC33 /* PrimitiveMockObserver.swift in Sources */, C811085B1AF50E2A001C13E4 /* Subscription.swift in Sources */, @@ -430,7 +392,6 @@ C81108561AF50E2A001C13E4 /* TestObserver.swift in Sources */, C811085A1AF50E2A001C13E4 /* VirtualTimeSchedulerBase.swift in Sources */, C811085F1AF50E2A001C13E4 /* DisposableTest.swift in Sources */, - C88C78881B3EB0C50061C5AB /* SectionModel.swift in Sources */, C8E381281B207D03008CDC33 /* PrimitiveHotObservable.swift in Sources */, C81108661AF50E2A001C13E4 /* Observable+StandardSequenceOperatorsTest.swift in Sources */, C81108641AF50E2A001C13E4 /* Observable+MultipleTest.swift in Sources */, @@ -448,9 +409,7 @@ C81108591AF50E2A001C13E4 /* TestScheduler.swift in Sources */, C81108601AF50E2A001C13E4 /* Observable+AggregateTest.swift in Sources */, C81108521AF50E2A001C13E4 /* MockObserver.swift in Sources */, - C88C78841B3EB0C50061C5AB /* RxTableViewSectionedReloadDataSource.swift in Sources */, C8633AE51B0A9FF300375D60 /* KVOObservableTests.swift in Sources */, - C88C78911B3F17C40061C5AB /* SectionedViewType.swift in Sources */, C811085C1AF50E2A001C13E4 /* TestExtensions.swift in Sources */, C811085D1AF50E2A001C13E4 /* AssumptionsTest.swift in Sources */, C81108501AF50E2A001C13E4 /* ConnectableObservable.swift in Sources */,