From a9ae7d9ee648c103c6553ea50f1813be39923271 Mon Sep 17 00:00:00 2001 From: Gilbertat Date: Mon, 23 Jan 2017 08:49:02 +0800 Subject: [PATCH] update to swift 3 and RxSwift 3.1 RxCocoa 3.1 RxDataSources 1.0.9 --- RxTableViewDemo/Podfile | 8 +- RxTableViewDemo/Podfile.lock | 28 +- RxTableViewDemo/Pods/Manifest.lock | 28 +- .../Pods/Pods.xcodeproj/project.pbxproj | 2755 +++++++++-------- .../RxCocoa/Platform/DataStructures/Bag.swift | 167 + .../DataStructures/InfiniteSequence.swift | 16 +- .../DataStructures/PriorityQueue.swift | 54 +- .../Platform}/DataStructures/Queue.swift | 128 +- .../Platform/DispatchQueue+Extensions.swift | 22 + .../RxCocoa/Platform/Platform.Darwin.swift | 49 + .../RxCocoa/Platform/Platform.Linux.swift | 97 + RxTableViewDemo/Pods/RxCocoa/README.md | 151 +- .../CocoaUnits/ControlEvent.swift | 44 +- .../RxCocoa/CocoaUnits/ControlProperty.swift | 124 + .../Driver/ControlEvent+Driver.swift | 13 +- .../Driver/ControlProperty+Driver.swift | 13 +- .../Driver/Driver+Subscription.swift | 125 + .../RxCocoa/CocoaUnits/Driver/Driver.swift | 89 + .../ObservableConvertibleType+Driver.swift | 21 +- .../CocoaUnits/Driver/Variable+Driver.swift | 15 +- ...rvableConvertibleType+SharedSequence.swift | 60 + .../SharedSequence+Operators+arity.swift | 351 +++ .../SharedSequence+Operators.swift} | 308 +- .../SharedSequence/SharedSequence.swift | 191 ++ .../Variable+SharedSequence.swift | 23 + .../CocoaUnits/UIBindingObserver.swift | 65 + .../RxCocoa/Common/CLLocationManager+Rx.swift | 218 -- .../Common/CocoaUnits/ControlProperty.swift | 110 - .../Driver/Driver+Operators+arity.swift | 322 -- .../Driver/Driver+Subscription.swift | 103 - .../Common/CocoaUnits/Driver/Driver.swift | 221 -- .../Common/CocoaUnits/UIBindingObserver.swift | 62 - .../Implementations => }/ControlTarget.swift | 24 +- .../RxCocoa/Common/DelegateProxy.swift | 275 +- .../RxCocoa/Common/DelegateProxyType.swift | 312 +- .../Common/NSLayoutConstraint+Rx.swift | 34 +- .../RxCocoa/Common/Observable+Bind.swift | 49 +- .../Implementations/DeallocObservable.swift | 24 - .../Implementations/KVOObservable.swift | 147 - .../Implementations/KVOObserver.swift | 46 - .../Implementations/MessageSentObserver.swift | 74 - .../NSObject+Rx+KVORepresentable.swift | 45 - .../NSObject+Rx+RawRepresentable.swift | 51 - .../Common/Observables/NSObject+Rx.swift | 240 -- .../RxCLLocationManagerDelegateProxy.swift | 27 - .../Pods/RxCocoa/RxCocoa/Common/RxCocoa.swift | 343 -- .../RxCocoaObjCRuntimeError+Extensions.swift | 162 + .../RxCocoa/RxCocoa/Common/RxTarget.swift | 6 +- .../Common/SectionedViewDataSourceType.swift | 22 +- .../RxCocoa/RxCocoa/Common/TextInput.swift | 82 + .../RxCocoa/RxCocoa/Common/_RXDelegateProxy.h | 21 - .../KVORepresentable+CoreGraphics.swift | 20 +- .../KVORepresentable+Swift.swift | 53 +- .../KVORepresentable.swift | 18 +- .../{Common => Foundation}/Logging.swift | 12 +- .../NSNotificationCenter+Rx.swift | 17 +- .../NSObject+Rx+KVORepresentable.swift | 47 + .../NSObject+Rx+RawRepresentable.swift | 53 + .../RxCocoa/Foundation/NSObject+Rx.swift | 532 ++++ .../URLSession+Rx.swift} | 130 +- .../RxCocoa/RxCocoa/{Common => Runtime}/_RX.m | 2 +- .../{Common => Runtime}/_RXDelegateProxy.m | 40 +- .../{Common => Runtime}/_RXKVOObserver.m | 4 +- .../{Common => Runtime}/_RXObjCRuntime.m | 185 +- .../RxCocoa/Runtime/include/RxCocoaRuntime.h | 19 + .../RxCocoa/{Common => Runtime/include}/_RX.h | 8 +- .../Runtime/include/_RXDelegateProxy.h | 26 + .../include}/_RXKVOObserver.h | 4 +- .../include}/_RXObjCRuntime.h | 62 +- .../Pods/RxCocoa/RxCocoa/RxCocoa.swift | 148 + ...ollectionViewReactiveArrayDataSource.swift | 37 +- .../RxTableViewReactiveArrayDataSource.swift | 36 +- .../RxCocoa/iOS/Events/ItemEvents.swift | 6 +- .../RxCocoa/iOS/NSTextStorage+Rx.swift | 26 +- .../RxCollectionViewDataSourceType.swift | 20 +- .../Protocols/RxTableViewDataSourceType.swift | 20 +- .../RxCollectionViewDataSourceProxy.swift | 89 +- .../RxCollectionViewDelegateProxy.swift | 18 +- .../Proxies/RxImagePickerDelegateProxy.swift | 41 - .../Proxies/RxPickerViewDelegateProxy.swift | 34 + .../Proxies/RxScrollViewDelegateProxy.swift | 100 +- .../Proxies/RxSearchBarDelegateProxy.swift | 27 +- .../RxSearchControllerDelegateProxy.swift | 19 +- .../RxTabBarControllerDelegateProxy.swift | 42 + .../iOS/Proxies/RxTabBarDelegateProxy.swift | 43 + .../Proxies/RxTableViewDataSourceProxy.swift | 191 +- .../Proxies/RxTableViewDelegateProxy.swift | 19 +- .../Proxies/RxTextStorageDelegateProxy.swift | 14 +- .../iOS/Proxies/RxTextViewDelegateProxy.swift | 26 +- .../iOS/Proxies/RxWebViewDelegateProxy.swift | 40 + .../iOS/UIActivityIndicatorView+Rx.swift | 18 +- .../RxCocoa/iOS/UIAlertAction+Rx.swift | 29 + .../RxCocoa/iOS/UIApplication+Rx.swift | 16 +- .../RxCocoa/iOS/UIBarButtonItem+Rx.swift | 45 +- .../RxCocoa/RxCocoa/iOS/UIButton+Rx.swift | 38 +- .../RxCocoa/iOS/UICollectionView+Rx.swift | 271 +- .../RxCocoa/RxCocoa/iOS/UIControl+Rx.swift | 101 +- .../RxCocoa/RxCocoa/iOS/UIDatePicker+Rx.swift | 16 +- .../RxCocoa/iOS/UIGestureRecognizer+Rx.swift | 38 +- .../iOS/UIImagePickerController+Rx.swift | 52 - .../RxCocoa/RxCocoa/iOS/UIImageView+Rx.swift | 27 +- .../Pods/RxCocoa/RxCocoa/iOS/UILabel+Rx.swift | 22 +- .../RxCocoa/iOS/UINavigationItem+Rx.swift | 28 + .../RxCocoa/iOS/UIPageControl+Rx.swift | 27 + .../RxCocoa/RxCocoa/iOS/UIPickerView+Rx.swift | 35 + .../RxCocoa/iOS/UIProgressView+Rx.swift | 16 +- .../RxCocoa/iOS/UIRefreshControl+Rx.swift | 18 +- .../RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift | 100 +- .../RxCocoa/RxCocoa/iOS/UISearchBar+Rx.swift | 124 +- .../RxCocoa/iOS/UISearchController+Rx.swift | 70 +- .../RxCocoa/iOS/UISegmentedControl+Rx.swift | 16 +- .../RxCocoa/RxCocoa/iOS/UISlider+Rx.swift | 12 +- .../RxCocoa/RxCocoa/iOS/UIStepper+Rx.swift | 12 +- .../RxCocoa/RxCocoa/iOS/UISwitch+Rx.swift | 23 +- .../RxCocoa/RxCocoa/iOS/UITabBar+Rx.swift | 105 + .../RxCocoa/iOS/UITabBarController+Rx.swift | 92 + .../RxCocoa/RxCocoa/iOS/UITabBarItem+Rx.swift | 14 +- .../RxCocoa/RxCocoa/iOS/UITableView+Rx.swift | 263 +- .../RxCocoa/RxCocoa/iOS/UITextField+Rx.swift | 25 +- .../RxCocoa/RxCocoa/iOS/UITextView+Rx.swift | 77 +- .../Pods/RxCocoa/RxCocoa/iOS/UIView+Rx.swift | 26 +- .../RxCocoa/iOS/UIViewController+Rx.swift | 28 + .../RxCocoa/RxCocoa/iOS/UIWebView+Rx.swift | 55 + RxTableViewDemo/Pods/RxDataSources/README.md | 132 +- ...ctionViewSectionedAnimatedDataSource.swift | 84 +- ...lectionViewSectionedReloadDataSource.swift | 9 +- ...TableViewSectionedAnimatedDataSource.swift | 20 +- ...RxTableViewSectionedReloadDataSource.swift | 11 +- ...ctionedViewType+RxAnimatedDataSource.swift | 54 - .../DataSources/AnimatableSectionModel.swift | 44 +- .../DataSources/AnimationConfiguration.swift | 8 +- .../DataSources/Array+Extensions.swift | 29 + .../Sources/DataSources/Changeset.swift | 8 +- .../CollectionViewSectionedDataSource.swift | 142 +- .../Sources/DataSources/DataSources.swift | 16 +- .../Sources/DataSources/Differentiator.swift | 402 ++- .../FloatingPointType+IdentifiableType.swift | 25 + .../DataSources/IdentifiableValue.swift | 22 +- .../IntegerType+IdentifiableType.swift | 59 + .../Sources/DataSources/ItemPath.swift | 15 +- .../DataSources/Optional+Extensions.swift | 4 +- .../Sources/DataSources/SectionModel.swift | 29 +- .../DataSources/String+IdentifiableType.swift | 17 + .../TableViewSectionedDataSource.swift | 241 +- .../DataSources/UI+SectionedViewType.swift | 98 +- .../RxSwift/Platform/DataStructures/Bag.swift | 167 + .../DataStructures/InfiniteSequence.swift | 28 + .../DataStructures/PriorityQueue.swift | 114 + .../Platform/DataStructures/Queue.swift | 154 + .../Platform/DispatchQueue+Extensions.swift | 22 + .../RxSwift/Platform/Platform.Darwin.swift | 49 + .../RxSwift/Platform/Platform.Linux.swift | 97 + RxTableViewDemo/Pods/RxSwift/README.md | 151 +- .../Pods/RxSwift/RxSwift/AnyObserver.swift | 78 +- .../Pods/RxSwift/RxSwift/Cancelable.swift | 14 +- .../RxSwift/Concurrency/AsyncLock.swift | 6 +- .../RxSwift/RxSwift/Concurrency/Lock.swift | 107 +- .../RxSwift/Concurrency/LockOwnerType.swift | 4 +- .../Concurrency/SynchronizedDisposeType.swift | 4 +- .../Concurrency/SynchronizedOnType.swift | 8 +- .../SynchronizedSubscribeType.swift | 8 +- .../SynchronizedUnsubscribeType.swift | 6 +- .../RxSwift/ConnectableObservableType.swift | 4 +- .../RxSwift/RxSwift/DataStructures/Bag.swift | 327 -- .../Pods/RxSwift/RxSwift/Disposable.swift | 12 +- .../Disposables/AnonymousDisposable.swift | 65 +- .../Disposables/BinaryDisposable.swift | 47 +- .../Disposables/BooleanDisposable.swift | 42 +- .../Disposables/CompositeDisposable.swift | 141 +- .../RxSwift/Disposables/Disposables.swift | 15 + .../RxSwift/Disposables/DisposeBag.swift | 50 +- .../RxSwift/Disposables/DisposeBase.swift | 12 +- .../RxSwift/Disposables/NAryDisposable.swift | 10 - .../RxSwift/Disposables/NopDisposable.swift | 34 +- .../Disposables/RefCountDisposable.swift | 36 +- .../Disposables/ScheduledDisposable.swift | 28 +- .../Disposables/SerialDisposable.swift | 34 +- .../SingleAssignmentDisposable.swift | 112 +- .../StableCompositeDisposable.swift | 15 - .../Disposables/SubscriptionDisposable.swift | 4 +- .../Pods/RxSwift/RxSwift/Errors.swift | 72 +- .../Pods/RxSwift/RxSwift/Event.swift | 95 +- .../RxSwift/RxSwift/Extensions/Bag+Rx.swift | 58 + .../RxSwift/Extensions/String+Rx.swift | 21 +- .../RxSwift/ImmediateSchedulerType.swift | 12 +- .../Pods/RxSwift/RxSwift/Observable.swift | 29 +- .../RxSwift/ObservableConvertibleType.swift | 20 +- ....swift => ObservableType+Extensions.swift} | 105 +- .../Pods/RxSwift/RxSwift/ObservableType.swift | 25 +- .../Observables/Implementations/AddRef.swift | 24 +- .../Observables/Implementations/Amb.swift | 65 +- .../Implementations/AnonymousObservable.swift | 24 +- .../Observables/Implementations/Buffer.swift | 58 +- .../Observables/Implementations/Catch.swift | 82 +- ...e.swift => CombineLatest+Collection.swift} | 63 +- .../Implementations/CombineLatest+arity.swift | 203 +- .../Implementations/CombineLatest.swift | 46 +- .../Observables/Implementations/Concat.swift | 44 +- .../ConnectableObservable.swift | 14 +- .../Observables/Implementations/Debug.swift | 50 +- .../Observables/Implementations/Debunce.swift | 104 + .../Implementations/Deferred.swift | 30 +- .../Observables/Implementations/Delay.swift | 164 + .../Implementations/DelaySubscription.swift | 23 +- .../DistinctUntilChanged.swift | 32 +- .../Observables/Implementations/Do.swift | 38 +- .../Implementations/ElementAt.swift | 39 +- .../Observables/Implementations/Empty.swift | 10 +- .../Observables/Implementations/Error.swift | 14 +- .../Observables/Implementations/Filter.swift | 30 +- .../Implementations/Generate.swift | 34 +- .../Observables/Implementations/Just.swift | 34 +- .../Observables/Implementations/Map.swift | 95 +- .../Observables/Implementations/Merge.swift | 212 +- .../Implementations/Multicast.swift | 36 +- .../Observables/Implementations/Never.swift | 8 +- .../Implementations/ObserveOn.swift | 54 +- .../ObserveOnSerialDispatchQueue.swift | 46 +- .../Implementations/Optional.swift | 68 + .../Implementations/Producer.swift | 101 +- .../Observables/Implementations/Range.swift | 30 +- .../Observables/Implementations/Reduce.swift | 46 +- .../Implementations/RefCount.swift | 36 +- .../Observables/Implementations/Repeat.swift | 22 +- .../Implementations/RetryWhen.swift | 96 +- .../Observables/Implementations/Sample.swift | 73 +- .../Observables/Implementations/Scan.swift | 45 +- .../Implementations/Sequence.swift | 49 +- .../Implementations/ShareReplay1.swift | 34 +- .../ShareReplay1WhileConnected.swift | 32 +- .../Implementations/SingleAsync.swift | 41 +- .../Observables/Implementations/Sink.swift | 39 +- .../Observables/Implementations/Skip.swift | 58 +- .../Implementations/SkipUntil.swift | 66 +- .../Implementations/SkipWhile.swift | 78 +- .../Implementations/StartWith.swift | 8 +- .../Implementations/SubscribeOn.swift | 24 +- .../Observables/Implementations/Switch.swift | 118 +- .../Observables/Implementations/Take.swift | 78 +- .../Implementations/TakeLast.swift | 44 +- .../Implementations/TakeUntil.swift | 66 +- .../Implementations/TakeWhile.swift | 82 +- .../Implementations/Throttle.swift | 115 +- .../Observables/Implementations/Timeout.swift | 44 +- .../Observables/Implementations/Timer.swift | 49 +- .../Observables/Implementations/ToArray.swift | 32 +- .../Observables/Implementations/Using.swift | 49 +- .../Observables/Implementations/Window.swift | 70 +- .../Implementations/WithLatestFrom.swift | 73 +- ...lectionType.swift => Zip+Collection.swift} | 61 +- .../Implementations/Zip+arity.swift | 218 +- .../Observables/Implementations/Zip.swift | 48 +- .../Observables/Observable+Aggregate.swift | 9 +- .../Observables/Observable+Binding.swift | 25 +- .../Observables/Observable+Concurrency.swift | 10 +- .../Observables/Observable+Creation.swift | 107 +- .../Observables/Observable+Debug.swift | 8 +- .../Observables/Observable+Multiple.swift | 176 +- .../Observables/Observable+Single.swift | 114 +- ...Observable+StandardSequenceOperators.swift | 57 +- .../RxSwift/Observables/Observable+Time.swift | 85 +- .../Pods/RxSwift/RxSwift/ObserverType.swift | 56 +- .../RxSwift/Observers/AnonymousObserver.swift | 12 +- .../RxSwift/Observers/ObserverBase.swift | 12 +- .../RxSwift/Observers/TailRecursiveSink.swift | 54 +- .../RxSwift/Platform/Platform.Darwin.swift | 45 - .../RxSwift/Platform/Platform.Linux.swift | 222 -- .../Pods/RxSwift/RxSwift/Reactive.swift | 74 + RxTableViewDemo/Pods/RxSwift/RxSwift/Rx.swift | 54 +- .../Pods/RxSwift/RxSwift/RxMutableBox.swift | 20 +- .../Pods/RxSwift/RxSwift/SchedulerType.swift | 36 +- .../ConcurrentDispatchQueueScheduler.swift | 132 +- .../Schedulers/ConcurrentMainScheduler.swift | 39 +- .../Schedulers/CurrentThreadScheduler.swift | 92 +- .../DispatchQueueSchedulerQOS.swift | 54 - .../Schedulers/HistoricalScheduler.swift | 11 +- .../HistoricalSchedulerTimeConverter.swift | 78 +- .../Schedulers/ImmediateScheduler.swift | 14 +- .../Internal/AnonymousInvocable.swift | 6 +- .../Internal/DispatchQueueConfiguration.swift | 104 + .../Internal/InvocableScheduledItem.swift | 4 +- .../Schedulers/Internal/InvocableType.swift | 6 +- .../Schedulers/Internal/ScheduledItem.swift | 14 +- .../Internal/ScheduledItemType.swift | 2 +- .../RxSwift/Schedulers/MainScheduler.swift | 50 +- .../Schedulers/OperationQueueScheduler.swift | 49 +- .../Schedulers/RecursiveScheduler.swift | 187 +- .../SchedulerServices+Emulation.swift | 22 +- .../SerialDispatchQueueScheduler.swift | 128 +- .../Schedulers/VirtualTimeConverterType.swift | 90 +- .../Schedulers/VirtualTimeScheduler.swift | 105 +- .../RxSwift/Subjects/BehaviorSubject.swift | 112 +- .../RxSwift/Subjects/PublishSubject.swift | 90 +- .../RxSwift/Subjects/ReplaySubject.swift | 133 +- .../RxSwift/Subjects/SubjectType.swift | 27 +- .../RxSwift/RxSwift/Subjects/Variable.swift | 42 +- ...ods-RxTableViewDemo-acknowledgements.plist | 12 +- .../Pods-RxTableViewDemo-resources.sh | 14 +- .../Pods-RxTableViewDemo-umbrella.h | 2 + .../Pods-RxTableViewDemo.debug.xcconfig | 7 +- .../Pods-RxTableViewDemo.release.xcconfig | 7 +- .../Target Support Files/RxCocoa/Info.plist | 2 +- .../RxCocoa/RxCocoa-umbrella.h | 3 + .../RxCocoa/RxCocoa.xcconfig | 7 +- .../RxDataSources/Info.plist | 2 +- .../RxDataSources/RxDataSources-umbrella.h | 2 + .../RxDataSources/RxDataSources.xcconfig | 7 +- .../Target Support Files/RxSwift/Info.plist | 2 +- .../RxSwift/RxSwift-umbrella.h | 2 + .../RxSwift/RxSwift.xcconfig | 5 +- .../RxTableViewDemo.xcodeproj/project.pbxproj | 32 +- .../RxTableViewDemo/AppDelegate.swift | 14 +- .../RxTableViewController.swift | 8 +- .../RxTableViewDemo/TableViewCell.swift | 2 +- .../RxTableViewDemo/ViewModel.swift | 4 +- 315 files changed, 12429 insertions(+), 10184 deletions(-) create mode 100644 RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/Bag.swift rename RxTableViewDemo/Pods/{RxSwift/RxSwift => RxCocoa/Platform}/DataStructures/InfiniteSequence.swift (62%) rename RxTableViewDemo/Pods/{RxSwift/RxSwift => RxCocoa/Platform}/DataStructures/PriorityQueue.swift (66%) rename RxTableViewDemo/Pods/{RxSwift/RxSwift => RxCocoa/Platform}/DataStructures/Queue.swift (53%) create mode 100644 RxTableViewDemo/Pods/RxCocoa/Platform/DispatchQueue+Extensions.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/Platform/Platform.Darwin.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/Platform/Platform.Linux.swift rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => }/CocoaUnits/ControlEvent.swift (62%) create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/ControlProperty.swift rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => }/CocoaUnits/Driver/ControlEvent+Driver.swift (72%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => }/CocoaUnits/Driver/ControlProperty+Driver.swift (71%) create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Driver+Subscription.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Driver.swift rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => }/CocoaUnits/Driver/ObservableConvertibleType+Driver.swift (68%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => }/CocoaUnits/Driver/Variable+Driver.swift (61%) create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/ObservableConvertibleType+SharedSequence.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence+Operators+arity.swift rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common/CocoaUnits/Driver/Driver+Operators.swift => CocoaUnits/SharedSequence/SharedSequence+Operators.swift} (53%) create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/Variable+SharedSequence.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/UIBindingObserver.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CLLocationManager+Rx.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/ControlProperty.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Operators+arity.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Subscription.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/UIBindingObserver.swift rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/{Observables/Implementations => }/ControlTarget.swift (77%) delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/DeallocObservable.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/KVOObservable.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/KVOObserver.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/MessageSentObserver.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx+KVORepresentable.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx+RawRepresentable.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Proxies/RxCLLocationManagerDelegateProxy.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxCocoa.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxCocoaObjCRuntimeError+Extensions.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/TextInput.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXDelegateProxy.h rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Foundation}/KVORepresentable+CoreGraphics.swift (90%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Foundation}/KVORepresentable+Swift.swift (61%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Foundation}/KVORepresentable.swift (63%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Foundation}/Logging.swift (64%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common/Observables => Foundation}/NSNotificationCenter+Rx.swift (54%) create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+KVORepresentable.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+RawRepresentable.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx.swift rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common/Observables/NSURLSession+Rx.swift => Foundation/URLSession+Rx.swift} (59%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Runtime}/_RX.m (85%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Runtime}/_RXDelegateProxy.m (80%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Runtime}/_RXKVOObserver.m (93%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Runtime}/_RXObjCRuntime.m (88%) create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/RxCocoaRuntime.h rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Runtime/include}/_RX.h (90%) create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RXDelegateProxy.h rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Runtime/include}/_RXKVOObserver.h (89%) rename RxTableViewDemo/Pods/RxCocoa/RxCocoa/{Common => Runtime/include}/_RXObjCRuntime.h (69%) create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/RxCocoa.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxImagePickerDelegateProxy.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDelegateProxy.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarControllerDelegateProxy.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarDelegateProxy.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxWebViewDelegateProxy.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIAlertAction+Rx.swift delete mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIImagePickerController+Rx.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UINavigationItem+Rx.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIPageControl+Rx.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIPickerView+Rx.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBar+Rx.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBarController+Rx.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIViewController+Rx.swift create mode 100644 RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIWebView+Rx.swift delete mode 100644 RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/UISectionedViewType+RxAnimatedDataSource.swift create mode 100644 RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Array+Extensions.swift create mode 100644 RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/FloatingPointType+IdentifiableType.swift create mode 100644 RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/IntegerType+IdentifiableType.swift create mode 100644 RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/String+IdentifiableType.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/Bag.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/Queue.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/Platform/Platform.Darwin.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/Platform/Platform.Linux.swift delete mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/Bag.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/Disposables.swift delete mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/NAryDisposable.swift delete mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/StableCompositeDisposable.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift rename RxTableViewDemo/Pods/RxSwift/RxSwift/{Observable+Extensions.swift => ObservableType+Extensions.swift} (51%) rename RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/{CombineLatest+CollectionType.swift => CombineLatest+Collection.swift} (59%) create mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Debunce.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Optional.swift rename RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/{Zip+CollectionType.swift => Zip+Collection.swift} (64%) delete mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Platform/Platform.Darwin.swift delete mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Platform/Platform.Linux.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Reactive.swift delete mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/DispatchQueueSchedulerQOS.swift create mode 100644 RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift diff --git a/RxTableViewDemo/Podfile b/RxTableViewDemo/Podfile index b9d15b4..c5522a8 100644 --- a/RxTableViewDemo/Podfile +++ b/RxTableViewDemo/Podfile @@ -1,11 +1,11 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, ‘8.1’ +#platform :ios, ‘8.1’ use_frameworks! target:RxTableViewDemo do - pod 'RxSwift', '~> 2.0' - pod 'RxCocoa', '~> 2.0' - pod 'RxDataSources', '~> 0.7' + pod 'RxSwift', '~> 3.1' + pod 'RxCocoa', '~> 3.1' + pod 'RxDataSources', '~> 1.0.0’ end diff --git a/RxTableViewDemo/Podfile.lock b/RxTableViewDemo/Podfile.lock index 60d36d3..e9c3d7c 100644 --- a/RxTableViewDemo/Podfile.lock +++ b/RxTableViewDemo/Podfile.lock @@ -1,21 +1,21 @@ PODS: - - RxCocoa (2.4): - - RxSwift (~> 2.4) - - RxDataSources (0.7): - - RxCocoa (~> 2.2) - - RxSwift (~> 2.2) - - RxSwift (2.4) + - RxCocoa (3.1.0): + - RxSwift (~> 3.1) + - RxDataSources (1.0.2): + - RxCocoa (~> 3.0) + - RxSwift (~> 3.0) + - RxSwift (3.1.0) DEPENDENCIES: - - RxCocoa (~> 2.0) - - RxDataSources (~> 0.7) - - RxSwift (~> 2.0) + - RxCocoa (~> 3.1) + - RxDataSources (~> 1.0.0) + - RxSwift (~> 3.1) SPEC CHECKSUMS: - RxCocoa: 7d6cd877de99f5640306b3d6cf87f580c1d91b61 - RxDataSources: 99a8527f4de066d3f10522c1977e571efec034c3 - RxSwift: 67b9ef4e8b34fb394e200e754c6a09cc16559f94 + RxCocoa: 50d7564866da9299161e86a263ce12a0873904d8 + RxDataSources: 1de77880bf5b7fcee42102adcd5a5d65e5b81541 + RxSwift: 83ff553e7593fdfdcb2562933a64c0284dffdadc -PODFILE CHECKSUM: eb3bbdafd5256ac0399d7d6131c5f069cd8813c1 +PODFILE CHECKSUM: 81adbcd3120d2547dbd1e436f7380e69795d9f86 -COCOAPODS: 1.0.0.beta.8 +COCOAPODS: 1.1.1 diff --git a/RxTableViewDemo/Pods/Manifest.lock b/RxTableViewDemo/Pods/Manifest.lock index 60d36d3..e9c3d7c 100644 --- a/RxTableViewDemo/Pods/Manifest.lock +++ b/RxTableViewDemo/Pods/Manifest.lock @@ -1,21 +1,21 @@ PODS: - - RxCocoa (2.4): - - RxSwift (~> 2.4) - - RxDataSources (0.7): - - RxCocoa (~> 2.2) - - RxSwift (~> 2.2) - - RxSwift (2.4) + - RxCocoa (3.1.0): + - RxSwift (~> 3.1) + - RxDataSources (1.0.2): + - RxCocoa (~> 3.0) + - RxSwift (~> 3.0) + - RxSwift (3.1.0) DEPENDENCIES: - - RxCocoa (~> 2.0) - - RxDataSources (~> 0.7) - - RxSwift (~> 2.0) + - RxCocoa (~> 3.1) + - RxDataSources (~> 1.0.0) + - RxSwift (~> 3.1) SPEC CHECKSUMS: - RxCocoa: 7d6cd877de99f5640306b3d6cf87f580c1d91b61 - RxDataSources: 99a8527f4de066d3f10522c1977e571efec034c3 - RxSwift: 67b9ef4e8b34fb394e200e754c6a09cc16559f94 + RxCocoa: 50d7564866da9299161e86a263ce12a0873904d8 + RxDataSources: 1de77880bf5b7fcee42102adcd5a5d65e5b81541 + RxSwift: 83ff553e7593fdfdcb2562933a64c0284dffdadc -PODFILE CHECKSUM: eb3bbdafd5256ac0399d7d6131c5f069cd8813c1 +PODFILE CHECKSUM: 81adbcd3120d2547dbd1e436f7380e69795d9f86 -COCOAPODS: 1.0.0.beta.8 +COCOAPODS: 1.1.1 diff --git a/RxTableViewDemo/Pods/Pods.xcodeproj/project.pbxproj b/RxTableViewDemo/Pods/Pods.xcodeproj/project.pbxproj index db34c3e..9953517 100644 --- a/RxTableViewDemo/Pods/Pods.xcodeproj/project.pbxproj +++ b/RxTableViewDemo/Pods/Pods.xcodeproj/project.pbxproj @@ -7,738 +7,806 @@ objects = { /* Begin PBXBuildFile section */ - 012128A0A32D6054EEB5C1E358FBDE3C /* ControlProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C69ADF8078822CBD19CD14F47B6F9E3 /* ControlProperty.swift */; }; - 0328C32A29EAFEF738EC4377FD722F00 /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF402C98FBDFCD764DABB580BBD5A92F /* ElementAt.swift */; }; - 03EAB3EE5CC32A876B0B832498B886A8 /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5E7EA53DB3D5D30CB51B00FF87B98B0 /* WithLatestFrom.swift */; }; - 04A86219D00605B782DD8843117DE6F3 /* ControlProperty+Driver.swift in Sources */ = {isa = PBXBuildFile; fileRef = F833DECA352CF4719BD8D328C0A604D9 /* ControlProperty+Driver.swift */; }; - 04FBC9428D700D7C6D1DB5B227014BE1 /* RxCocoa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 253F3074EC6229806D793EE5BC790DD7 /* RxCocoa.swift */; }; - 06FC0B38C06C1140045410160D2AF9BE /* IdentifiableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AEA4F796D471264937E622EEE39CDB0 /* IdentifiableType.swift */; }; - 075DAA20E88BFE120B873B56F8FD683D /* TableViewSectionedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3285EBE3EA50F283EDDB0447240FBC6D /* TableViewSectionedDataSource.swift */; }; - 0809361453AE65E26F841990DFE9D632 /* NSNotificationCenter+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA1501FFEC2764B000C75C6FE6720688 /* NSNotificationCenter+Rx.swift */; }; - 08BD4E4B1A362F779FA0C52DA21781F7 /* NSLayoutConstraint+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6F514CE43EB2B495A8CB396A3172 /* NSLayoutConstraint+Rx.swift */; }; - 09A5568D518B6BAD6CCE46EAB022C356 /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC437B95850CF049580A759EF78FCD22 /* Logging.swift */; }; - 09ED8F3F0D6D5431C271C697CDA43D03 /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBEF846E0BE80EC9413288C89DD06A11 /* OperationQueueScheduler.swift */; }; - 0E64DDE37B54E5289144762DA908C558 /* Pods-RxTableViewDemo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D9F628699A419A3C47CE8B21C414182 /* Pods-RxTableViewDemo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0EC5BDD69BF4DEBAADBED034CDB9A313 /* UIActivityIndicatorView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73C2DB4767095B7BF87B87CB3F2BA027 /* UIActivityIndicatorView+Rx.swift */; }; - 0EC6460C46EE9CFF0E409F5268388B93 /* RxCocoa-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D95D8ACFAEE78C376ED41959325B60D0 /* RxCocoa-dummy.m */; }; - 11461C0FDC551282BD0F2D7B337331EA /* Observable+StandardSequenceOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = F19C8D14EA987F1E7C5F35655CE67F11 /* Observable+StandardSequenceOperators.swift */; }; - 126CFEA26B4312E551C32FD9AE336ACA /* Observable+Time.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66E1CED1F24BC209F28FB9AB2CE36321 /* Observable+Time.swift */; }; - 13E1343F494B16F92D963C4193C07182 /* RxCollectionViewSectionedReloadDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70FC1E38BD4520AE00C1118D9080894A /* RxCollectionViewSectionedReloadDataSource.swift */; }; - 14D9A18004C5C26CFC3A5DC9312451BE /* UIImagePickerController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 893108B148617406E5E52E049FE18947 /* UIImagePickerController+Rx.swift */; }; - 14E3EFBCA71F89CA017C5B1E75118A1B /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EE92C8296FEA0714F3B1602F002C801 /* Lock.swift */; }; - 15277CA93D96A86135550636293296B3 /* RxDataSources-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = ECBB636B5778CB2A4BD242DDAB909F2D /* RxDataSources-dummy.m */; }; - 155E179F0F01DD0651D6256C3F43EEA5 /* RxCollectionViewReactiveArrayDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08FD137986322B00234DE85B29CA20D9 /* RxCollectionViewReactiveArrayDataSource.swift */; }; - 15919BBB6C559246A23C4AAA1041DF41 /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = AABC984B312B612E61DA0432EEF855AD /* DistinctUntilChanged.swift */; }; - 16BD3698D6FB3F529EA8BEEE6ABC030E /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72FFBE4418D0F05D5908CB1BD8F25B46 /* AnyObserver.swift */; }; - 17281C5957928AAD5CF1824E9E382A30 /* RxCollectionViewDataSourceProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A790E621CBEA7E8400BB9E01A92D81D /* RxCollectionViewDataSourceProxy.swift */; }; - 1766EBFB8F061A2844136E869A6E4B95 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1807EEC2EE195F432D66A3E773B2EBAE /* Range.swift */; }; - 18B688E0467217EC09B88E43C038DF8A /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94E4E29734B00F6A8D1C0C60F98CEBCE /* SynchronizedUnsubscribeType.swift */; }; - 1961AA0B521CDAD384F84329F1CD2877 /* RxDataSources-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A25A17CDEA8DD2CACC6D71504578783 /* RxDataSources-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1A18606341C0BDD84A17823E740C4A61 /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 294A013F1543C0F3766547B48E88A768 /* ReplaySubject.swift */; }; - 1A20C43237AB8007B1DAFBCC7F422A0E /* UIScrollView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87D39C04E658CDA40D6AA0E86EB0F583 /* UIScrollView+Rx.swift */; }; - 1A785CACDCF9CF23C2B028D4588E3696 /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A4F069B74DDA5D9541A4BAB7460EF29 /* ConnectableObservableType.swift */; }; - 1B56FE4A3AC7AAAC26B0D40C99B0EAD9 /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = C108BF7EF189CCA8A8B41E6FB8795BA2 /* AnonymousObserver.swift */; }; - 1DE139D0FE7B7F7243B3F824E8A2F078 /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8F6A19B3940ECB4D8EA3BF65D4DA688 /* Timeout.swift */; }; - 1F132FCFC9530467561F58788538FADC /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413A521227912A7856BBCF53D2CA3C35 /* RecursiveScheduler.swift */; }; - 1FA965276AF0DFD24E4D54EE0EF0BE14 /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5ADDF63B5B91D7C8FA368E154FC02CF /* CurrentThreadScheduler.swift */; }; - 2160A32AB4777D408CD04A52684C1FC2 /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AB733502A3EC806A18171E8F29D873A /* ConcurrentMainScheduler.swift */; }; - 23B90A8FB82A094168E1E165CD09925D /* UITextField+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FF53FDAB2CF0CE6DC7E119F20DB7FA7 /* UITextField+Rx.swift */; }; - 240423E22F30942C210B752646E554B5 /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15910CF6CDD1132CA5CEBB1602BBE56 /* SkipWhile.swift */; }; - 24108C123BFDF65439C4586D791BC2F7 /* RxTableViewReactiveArrayDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD27C7D2E4AB5ECE09DB937383CCBFA5 /* RxTableViewReactiveArrayDataSource.swift */; }; - 24653C5B3FBFEB971DDF83D35257A601 /* ItemEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = D959AA83F85AE923BED4EA7F46CE92C4 /* ItemEvents.swift */; }; - 26717ABE776D1A2F90C74025DF078AB7 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B276DD384C2E03FB190F5A87AC073EB /* Debug.swift */; }; - 26835FE845484327C93CBAEE1066A1A6 /* ImmediateScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99245DB1B385301333323CB77EA5573A /* ImmediateScheduler.swift */; }; - 27679F295C2320A2A414883274A62EA7 /* UI+SectionedViewType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5CEF8310F2648176B5E68727F7DAACD /* UI+SectionedViewType.swift */; }; - 28B2700F7CD104D90F0FD8B2EC4F4D33 /* UITableView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A6BAB0858F38F20CCA7C965005D2C73 /* UITableView+Rx.swift */; }; - 2908BEE76BFA0E4EB8D096A7CB520542 /* RxTableViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65717987EB77FB6A73931AA405DFAFB3 /* RxTableViewDelegateProxy.swift */; }; - 2B669C57E94BFD1292F454CD7DF19413 /* Driver+Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E52DC1114EF77FF4BCBFCE7039822D1 /* Driver+Subscription.swift */; }; - 2CDBB4879A4734E81EC2B9B94771F024 /* _RXDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = EFACC162159C40B3EF2304B96D5937EE /* _RXDelegateProxy.m */; }; - 2D1E5C54BE0D6FD56E4BAABA0A40A9E2 /* Driver+Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = F79F2BB0C4F417A271C2E5DA5C84BD4B /* Driver+Operators.swift */; }; - 304B48E12D36DFFF7D4A325646A28DAC /* Changeset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F9FB8D541DC91CF19C6B0233D71EFF2 /* Changeset.swift */; }; - 313B1D9BDD6B8B32D497CC21E6932233 /* AnimatableSectionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44D604BE5C03392A356BBBB83B415FD1 /* AnimatableSectionModel.swift */; }; - 32732F26393B29CCF939B2B01155645C /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = F102A4CCC0A5CC8D2C99FA655B0E4FCC /* Deferred.swift */; }; - 3296B0D819BF113BE960FCF027E258F9 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2AAA3F1718D080B28C7879DCE6E987B /* Do.swift */; }; - 33A74B8D27265ACC3ADDCA5FBE4DDDCA /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D099263BC739575B2A7CC3A99A587B4E /* Cancelable.swift */; }; - 33E2ED6B0F82CAF010CCFB940AAB0295 /* SectionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCB5C34A8DEAA9F4C77313096F78896 /* SectionModel.swift */; }; - 344728B869744A4FFD12969491706D59 /* RxCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 321A1AB72255D084EE352876F54E8785 /* RxCocoa.framework */; }; - 34A1FE81DAC1419EED0A2F4430345042 /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43FD4B94002863A63FCE0A36B577080F /* Never.swift */; }; - 358C0785A323AD2B844CBC9C873E168F /* RxTextStorageDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32EE3DC65104719851158ECB7F9B2D91 /* RxTextStorageDelegateProxy.swift */; }; - 37ED9E34C3A8F0BD13A59456436AFFB5 /* Driver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1057BD977AAFAB283DE334152CC10DE4 /* Driver.swift */; }; - 3B17DF3A9F6589143DCF17495ADAF297 /* Variable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 615E8DDF355D8E3CB66BD8A027DF6508 /* Variable.swift */; }; - 3B4FA801AA71678CB6C0C49D1B9C6AC2 /* ObservableConvertibleType+Driver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20B63C1DC3468AF6F169750FCF27F07A /* ObservableConvertibleType+Driver.swift */; }; - 3B7ED85DA4BA145CAFBF6E3985FEBD83 /* NSObject+Rx+KVORepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AD04472D0C62247385153DC2EDB6DA9 /* NSObject+Rx+KVORepresentable.swift */; }; - 3B82C3775F719ACF6709512BE66C4A3C /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCB011D8486E8737BD64CFE641A4D88F /* TakeWhile.swift */; }; - 3E57AB5E2B5102CCE4FD49D354D5BFAA /* SectionedViewDataSourceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD167D1596E967B945491E05A371B0A4 /* SectionedViewDataSourceType.swift */; }; - 3F2ADE6BC22AC065B3D93B3A1FB64F42 /* Driver+Operators+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F7BC778C0B7CF2F20C295ED07B5C2C0 /* Driver+Operators+arity.swift */; }; - 4180E0CEB4B65A6CF6F8090D8FC09626 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E58B9FA1A58EECBA104A29D48FB98DD /* Filter.swift */; }; - 41DB38540861A8C09D80D8707DFF6DC3 /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CD18275BC156C2D0BA76427D7E3A082 /* HistoricalScheduler.swift */; }; - 422F9F5DE2F23A1DB5EAA91EFA4C5744 /* UILabel+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6AD2AC121321B31FC71C9C8B1CFA0C9 /* UILabel+Rx.swift */; }; - 43D0DB3DA8535DAEBCBA6A76DAC5FE95 /* Observable+Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0681630EDBD0AB8A6CC481C4EF003114 /* Observable+Single.swift */; }; - 4550B9021F155638AC4BFC0E2552F1AC /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDBDC532CF6FFADB848E3BCD43626D1B /* SchedulerType.swift */; }; - 460019DA293FE2818D0C6B810BCA74F4 /* Zip+CollectionType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1EEBEAF641A335CD34A975EADD918DB /* Zip+CollectionType.swift */; }; - 4627EEDF2A80C5FF6DDEF465A95BC82D /* RxCollectionViewDataSourceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E20EB5FFD6EE7A42F616691F9601065 /* RxCollectionViewDataSourceType.swift */; }; - 463305AA086B366064DEC1322C9E9610 /* Observable+Multiple.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEEF591BE779E562685FCF57EF0ACD4B /* Observable+Multiple.swift */; }; - 467B7670B56D5D07D09336901792F388 /* Observable+Binding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FAE6093B5F14D84E8003503C324FF39 /* Observable+Binding.swift */; }; - 46E9C9FE2CDB5044F53C095765642581 /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB307DCD42D95B8ABC61419C84E05EC /* NopDisposable.swift */; }; - 482D9FBA7FC98905390579539FF5485C /* UIBindingObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A37D2BA21FA863FBC3AAA3A8DDEE2A4 /* UIBindingObserver.swift */; }; - 48B9D9BBEEC0A62390D6EA98C43D512B /* Optional+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 468A52D5F2EB415DE203DFF7402F3F25 /* Optional+Extensions.swift */; }; - 4A9D1E851AD1C1EAB08F4899DFBF29C5 /* ControlEvent+Driver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 181357241FEB2F5FAFC9E9DACAA53EA7 /* ControlEvent+Driver.swift */; }; - 4B0875959A0286D84F4B00D2F2DB5032 /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6385DB0C808924B04A64179013B6BD33 /* Reduce.swift */; }; - 4B40D1F5DBE8B569019495C77FEE004C /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A1DD9FA1C819A439BE6A81736E3949 /* HistoricalSchedulerTimeConverter.swift */; }; - 4C4367FB3914D51C198215A0FA976143 /* UIView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 743466BA119447B722D28093BDCB06A2 /* UIView+Rx.swift */; }; - 4D9DA91D148C634DFF1D942C2CFA0F59 /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 810C95C628521A677E6EEA632B68F292 /* BooleanDisposable.swift */; }; - 4E4912EC91D5007408E6D8B77DD13690 /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F08BEC40B90CDE21AAA4BBB5463DD347 /* ConcurrentDispatchQueueScheduler.swift */; }; - 4E609793FB705AD174EBD02878196981 /* NSObject+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA5750D9CACFE39064BC26FE1C49601C /* NSObject+Rx.swift */; }; - 5561AC703CEB3AEFF6D974C10C8CE5A5 /* RxScrollViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3F28F854FF205AB52C03D0A2D3BCC /* RxScrollViewDelegateProxy.swift */; }; - 558072440BB794201909DA8F9F75607C /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C29FCB424A53A2675DD78E1C1106FA6 /* AddRef.swift */; }; - 55DA71F363908238F42E8A11AF75E031 /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8900BC0E4077BA162B5F92716A38926A /* ToArray.swift */; }; - 5765AC5169688976A8996E6AF6FEAE35 /* _RX.h in Headers */ = {isa = PBXBuildFile; fileRef = CB53C15A732C6BBD1E9DFC72D8973B41 /* _RX.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 57754728166C2263BE7796291D7CE550 /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184B4D586FE1EA0C0374ABE025577283 /* Switch.swift */; }; - 587948BE620947B8FC48A9D95FFA3EAE /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBB13270955220EC8A5D77CCE75D46E2 /* StartWith.swift */; }; - 58A973997ADAC73423CA454B1DD90525 /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D810981FFE2D0972C135671069A3506 /* RxSwift-dummy.m */; }; - 58C6FCC953E33AB2079427CE24786279 /* RxCollectionViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E7A719D313A9EBCA713AEE2E2C1C51 /* RxCollectionViewDelegateProxy.swift */; }; - 590A7D88C1D57B4C9ADE3AAA3046880B /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D3FE26AED138E388B1B310FF2B3378 /* Buffer.swift */; }; - 596351CB3AE4D53189CB97529E02394A /* ShareReplay1WhileConnected.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54B7B10403A4A77F3392370D026F27BD /* ShareReplay1WhileConnected.swift */; }; - 5966A5E82F147F53A48E673340423751 /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C29A87C527CDE40C797251A11E4265B0 /* BinaryDisposable.swift */; }; - 59A7DA94D72B62BE2B7F363584FB9C8F /* MessageSentObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 334C0CB4E9C795C172F30CFE3ACC067A /* MessageSentObserver.swift */; }; - 5A41C5E2F8B88263FE5970E6257C85C4 /* UISearchController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7824E09ABB12A10694F86A691318B852 /* UISearchController+Rx.swift */; }; - 5A68239F9EA7D8ACFA2DDBCD6D74AF86 /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0582EE76327F57C431C0B27E47265803 /* CompositeDisposable.swift */; }; - 5AE60805BAF75D5FA3ABF33DEAC240BF /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AAE98466991CACE40D7AB63B71982B8 /* Platform.Darwin.swift */; }; - 5B43592105A79008E2E7A6A6D40FED6F /* RxTextViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC00A785BECB74CD4E13A567F3498EF9 /* RxTextViewDelegateProxy.swift */; }; - 5BC01B27D48ABFC858969606BE0C48B9 /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25C2CB8BD4E25AA71E23ED9C0597FDC5 /* String+Rx.swift */; }; - 5C64C73BE6B693A0B7DF9DBC2B3530C6 /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF81535C24861FAF5532B5AC1D9411D1 /* TakeLast.swift */; }; - 5F49196D2CBFDD2DDD72D0DA7EBD6008 /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9010DA3CCB56499680D3F414AE154556 /* Window.swift */; }; - 60BC26B7BECBDCD6A7D703976AEDCB93 /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09901DEB3F47DF71E41021FABF7ACB54 /* AnonymousDisposable.swift */; }; - 61B571F041F99B54E3AAAF05A761FD8E /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6765F5A72FC0814CD9D3A206BD93A931 /* InfiniteSequence.swift */; }; - 67A267F04166A6F3C845CEB4D1168A2D /* UISegmentedControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C02D582FFECC19580D960EDAA83BEFD /* UISegmentedControl+Rx.swift */; }; - 686A3E9E36103A1A69743420ED7409A4 /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 593FE1AEE6B3775E79D541DD35A0DD94 /* InvocableType.swift */; }; - 6AFDE84A2FF9C4ED8611076AB83B9BDE /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF3769D2AEFD0E9BED36B715EFAF3450 /* Map.swift */; }; - 6B5AD62BEE438C83A77C6CA2088CD714 /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C271B0D387892379051F510E6DC99BA2 /* ScheduledItemType.swift */; }; - 6C52C872B36BB4BE99391BD235F247DA /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6818193AADDA6666EC3A00E4D9FD97A0 /* Empty.swift */; }; - 6C7F9E0DF4E05047DFDC2B578C079D26 /* Observable+Creation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31658B3F03A2CD58D3B54F8725912C69 /* Observable+Creation.swift */; }; - 6D12D98DF058EF2A39E3975DB651B84A /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA5D4D92E6856CF24268861FE753AC70 /* SkipUntil.swift */; }; - 6E5FD82CBCFF294FA1710AB836F6CFDA /* RxTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA8DA65540E3CBBB74078941C198EDA8 /* RxTarget.swift */; }; - 6EA3F5A75A66B8717D6F08FC19E7037C /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 293CB66CE3A8E4453A272DF9BDCDA74D /* Disposable.swift */; }; - 6EE0ADE81C4B6B7FC3C07C4D50930625 /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BAF9C976A5DB0D56034C76BE483545 /* SchedulerServices+Emulation.swift */; }; - 6EF44287E99026389B1DCB9D745AEF1E /* _RXObjCRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C5192AD95FB6638E5369DEA4298E9C /* _RXObjCRuntime.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6F3A0513E550040330F4520A0178C2EA /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAB89611364FD0A06C308A8E88FA31F8 /* Concat.swift */; }; - 70A444399494595E64AE089E0706DA5B /* UIProgressView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CE48245E99517E338431B5A4246A91F /* UIProgressView+Rx.swift */; }; - 70EC40D92D48C7F18D19C67AE596DEE6 /* DelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD84B5FB0FA7E1315DFC9D996118433F /* DelegateProxy.swift */; }; - 72FA1B6EB1839C1045E17571E0C742E1 /* UISwitch+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDF9DB536B519873D02E74EC58EE142B /* UISwitch+Rx.swift */; }; - 73246A2196C92C01502362183D85E5BB /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 773C619279B2D4F76F88550324A29E16 /* ScheduledItem.swift */; }; - 75BF34ABD19599B6893ABEF0AE4FBC2B /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ABBC0E46182222A25EE951E542805FB /* Scan.swift */; }; - 76248B503DB9116D0597BE4AD1FD7212 /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCDEBBEB8EFB34258C6FF20C1DFD949A /* TailRecursiveSink.swift */; }; - 7629A08B422FB1AF4EA99719F8181A6F /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEB3BE6CADAD33DDC4E2E6D661EAB827 /* ImmediateSchedulerType.swift */; }; - 768C00D55E243168C68A0C003B2380AB /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F9A5644E09CAE916AA476851C05D831 /* Platform.Linux.swift */; }; - 771EBF091D26307CE45B4A1CE14B596B /* AnonymousObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FBD02AE35F01E2D42901B3B420A162F /* AnonymousObservable.swift */; }; - 77F456E50C1C025FC5E158ADD91F87EF /* UIControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA7414D0265E5636FAF93F0A7359FA05 /* UIControl+Rx.swift */; }; - 79FD8631420C04047217AB87C21E9BBF /* NSURLSession+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03739089D04D7EC6A7E10167130E076C /* NSURLSession+Rx.swift */; }; - 7B45064A9C3AF4D6BC3AEA33F7173FC9 /* RxCollectionViewSectionedAnimatedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1048968DA3DA7263A5B7280CBEF86576 /* RxCollectionViewSectionedAnimatedDataSource.swift */; }; - 7E7777B2952F155CCE337D84E681D587 /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CA5E77C275DFB70B28C8DCF4BAA9540 /* SingleAssignmentDisposable.swift */; }; - 7ED762A32BDE1E5C7D03499B3838CFA2 /* RefCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C9592AFAAB6D33901CDEF7FAB51A44 /* RefCount.swift */; }; - 7F8F188CC42F82085B639FD758E2A6C2 /* UIRefreshControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89568F01DA538A84617B3A81A1FC28A9 /* UIRefreshControl+Rx.swift */; }; - 7FF0B8AD5079328F5322DB75AFFA6537 /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D59B1888F122DCBE9CB026DCA3B58E8 /* LockOwnerType.swift */; }; - 806FA4B61793303B21FB444CCBB1E7A1 /* Observable+Aggregate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0037E94E6A80FC3A7DFB1A61DFB1B337 /* Observable+Aggregate.swift */; }; - 81EE00824EC16A9AC4DEB177830B3C7D /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B439314567AD34DE20A724F30E5C01E /* Multicast.swift */; }; - 82C326881436A772AC093828037CA00E /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87CD92D796873475E7B918E325B36E07 /* ObservableType.swift */; }; - 8490102EEE109E6AD9C8EBE26E01AC27 /* AnimatableSectionModelType+ItemPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B0F4073F5F04C70C2EC71C6A303EDB1 /* AnimatableSectionModelType+ItemPath.swift */; }; - 85A6B7427B1FBEBBAE0BE8B8250CB3E8 /* ObserveOnSerialDispatchQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA48DA435E0822818D9D45D2A2B93629 /* ObserveOnSerialDispatchQueue.swift */; }; - 860BB989195078997A78E68B02110353 /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 243972BCF048DD5F70457821234EB924 /* AsyncLock.swift */; }; - 86CB12DF1BBA915D05E065B15FAF9B03 /* KVORepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66C8D88E7EDFB9029D04AD389F7574D /* KVORepresentable.swift */; }; - 87CC2C264A387670D3B51E500495444E /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDEADEB12CF5029DF5DE52C441FA1EEA /* RetryWhen.swift */; }; - 88B52AC68DEA8472518E0F8EF523548F /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB4E2641DCD66C7DCE9F5DE64221139B /* DelaySubscription.swift */; }; - 88F4D7DB6129148FD8038468C528910B /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB94AEBFB3F6135B5255C11741A267DA /* SingleAsync.swift */; }; - 89BF1309EEED3AE8096A4A9CA2C84C0C /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0411A964DB7A0BFC02EDD0DEAEC3EC01 /* Timer.swift */; }; - 8AB2A7AEF1F68F4A057AEE3B86C40F8B /* SectionModelType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7972E47CB3597AD008C068283CC1BB9 /* SectionModelType.swift */; }; - 8D5D0B1FE11910E44CE8937AB1E3682A /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89BFE0FAAB0D0EF6C242BCC7405C721 /* Using.swift */; }; - 8F2F1C6F5AA04841AC74E6C2042C2033 /* UIImageView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = A30E8B5A4FF0F7768B5DB43C954822C7 /* UIImageView+Rx.swift */; }; - 9034871EC543924259F626823C2FDABE /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BC450A25A4BA1426C472806FFB12CB8 /* RefCountDisposable.swift */; }; - 92D3C2D6AB659DA2CED141EC3C69FF63 /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51C25411309C7DD1982D6026FD446D2 /* Sequence.swift */; }; - 93A7F75AC9CE5EFD4132B9B8D2FC8179 /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 589E6C4267B5CB27E3B4F543955B262B /* Amb.swift */; }; - 961430E2CE1DB219CD53F20F0219C013 /* RxCLLocationManagerDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74739FB1DC050F05B335E9D6AF98846 /* RxCLLocationManagerDelegateProxy.swift */; }; - 971D4A35F49CA921B244A8FC75FA763B /* NSTextStorage+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01EFD8D639D2DAEF40FAFA2B595BC01 /* NSTextStorage+Rx.swift */; }; - 9746C32B2846598757C8A38E6CB44BF4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EDA82B7D4B853FDF29D03F2F794C77A /* Foundation.framework */; }; - 987A6D9E1402FA9BA8870EDDF5179908 /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB6959360565ACA756599E05FEB87F62 /* ObservableConvertibleType.swift */; }; - 9B58F434F23782FF732358FB40617B93 /* UIGestureRecognizer+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A23481F6AC8BB36B96833439716FC94 /* UIGestureRecognizer+Rx.swift */; }; - 9C19F8DDEBFA95F708478A90654DCF1B /* UIApplication+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB060A574526AEEFDE79D9F1507EBEA9 /* UIApplication+Rx.swift */; }; - 9D516412F1C1B3D68E38C7037DB8B6D0 /* SynchronizedSubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4374DECBF203956E169DC2D7CC0AE33 /* SynchronizedSubscribeType.swift */; }; - 9EB58D77556955EA06D33916D026AC4F /* RxCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 9EB182837D2AF8D9E96C31E7A89B7295 /* RxCocoa.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9ED3640C1F0465426E3BEFD52AEBD4FA /* _RXDelegateProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 80BB7690641103D11923A61E6D30A8FB /* _RXDelegateProxy.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9FDC68007490AF33AA4DC2A76C185934 /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 127ED21A1397087977CA062A680CB8B4 /* Zip+arity.swift */; }; - 9FF3999BCF0AE1EA19ADF0C2E31D3488 /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40FDA44E1A674BE132F0BCA82279A9D3 /* MainScheduler.swift */; }; - A1C0D819EA2D977A099DB47D1638A7A0 /* RxTableViewSectionedReloadDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = A49FBB58244EF989D67BDD8FD435D2FB /* RxTableViewSectionedReloadDataSource.swift */; }; - A1C10BABF900A180C24CF96A5BD63133 /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06F77AC0EE43068F7421A0404E61E71F /* Skip.swift */; }; - A4E1DC925EADD03137EE289927427A9F /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EFE87973CB523C0769AA1C09A9546D2 /* CombineLatest.swift */; }; - A5FA5C450D0C574E308A88748CAB71E4 /* UIDatePicker+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05F4E541AC000E543D8FA5837D3E79D5 /* UIDatePicker+Rx.swift */; }; - A5FC77560A928072F586F05963A37C4F /* KVOObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C009E7674A00A4A0F1A66122FA348D0 /* KVOObserver.swift */; }; - A7431F821EA567E9047B2D00E387F2A2 /* RxImagePickerDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 446EB30B1E367F1197A2BA1655A7DF5B /* RxImagePickerDelegateProxy.swift */; }; - A7F44450B4F3B8C4FAEB98BC2558DD9D /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C93EC8BC218095EEF97EBA3F909222 /* Sample.swift */; }; - AAA40A15F9FF0C577F1915A444F38009 /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D17B042E4E0BAFC25250DBBF69652DFB /* ObserverBase.swift */; }; - ABE1E3EF7518F38900149FD7093DB5D5 /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9E1DEF91E51E7F1FB72036F35441557 /* Sink.swift */; }; - ABFB401A8A571E2C7688A3A9279119BB /* CLLocationManager+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85CD3A198E048E0D42549B45D4F726C /* CLLocationManager+Rx.swift */; }; - AC77858CC6DF2E318FB24008BCF6AB38 /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B4A67A85BC175836C7931DAF1BB417D /* SubscribeOn.swift */; }; - AC95496269EED64F8ED5D6FC9B5C1343 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EDA82B7D4B853FDF29D03F2F794C77A /* Foundation.framework */; }; - ACA1626DE112857F4983F5639108C64A /* ShareReplay1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 499B07095919C853FD3E90F8D0EA9DE4 /* ShareReplay1.swift */; }; - ACACBFE54603E0FCA79C36237DBC7F33 /* RxCocoa-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 98A3B272DED1C3FFAB35F9960988B669 /* RxCocoa-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AE704F23A196C6DF3911C7D524EA708E /* Variable+Driver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4CA10C75F652D494B168D293B95819C /* Variable+Driver.swift */; }; - B0C7AE51A24BC4F4D8497FFDDC20614A /* UIStepper+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFD9ADBC4BB16D2EAE1A500F25C3D07 /* UIStepper+Rx.swift */; }; - B2F23ACF9529FB71B304D490C900BC24 /* IdentifiableValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7AE05FDC7B02D33FA873B56A3799F91 /* IdentifiableValue.swift */; }; - B333BB1742AAE9C9EA922CFA053A3064 /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0D4EDC4A4F274B87F40614FB04179B3 /* DisposeBase.swift */; }; - B3E70C89FEE9A197F9CA44BCE65616D6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EDA82B7D4B853FDF29D03F2F794C77A /* Foundation.framework */; }; - B4227346AB55F843F1B5C48EFD091C41 /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2789FC08E46B2063B0141B4E24055DCE /* Throttle.swift */; }; - B6ACB4E1AA60CF842CD45E33B455824E /* ControlEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = A94797B637505C0BDDBDF6AA95C224BF /* ControlEvent.swift */; }; - B6DA7B4FADFDFCB541CE6EC950E291CD /* RxTableViewSectionedAnimatedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0996C5683D08C9055B962CC413DFA602 /* RxTableViewSectionedAnimatedDataSource.swift */; }; - B73B8DCD1A5D9C791101548A40C0845F /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAD607A687F0024A07D86BAD94464A81 /* ObserverType.swift */; }; - B761DD8AF7F8BA9B24A5F0319C6F3C79 /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C5FDB7A1FFEE8C3D70FD4EBCFE5134 /* TakeUntil.swift */; }; - B81B4430F71617143331C5B9817829A3 /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A095554D7FB3D0A411C47D89E9FB1172 /* Producer.swift */; }; - B91D5446D05D22FB6DB6A8792D72D4C3 /* DeallocObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F705EC9FD8F6D6C0953B4CD060B3F530 /* DeallocObservable.swift */; }; - BA4A81F6CC3522D1C481007D7C91AF58 /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3B72C9CED8672443B889BE07AE4C9C4 /* SubscriptionDisposable.swift */; }; - BA7F60B73F4EF76A254B848ACB51F207 /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BAB60D0A7B49E70FA33A3052993C6D /* InvocableScheduledItem.swift */; }; - BD1E8014615C30C460CCECF804C4451B /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65DEDE5D454F568D23F62AB207F2D4F4 /* Zip.swift */; }; - BE4D7B62E9DA7623A9AF96E55EDE9915 /* RxTableViewDataSourceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6456747197F30D6470CDA30C7EB54084 /* RxTableViewDataSourceType.swift */; }; - C00F7601226FF9C0E2D8589598D4757A /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B149505C1AE51A9E37078D433941135E /* ScheduledDisposable.swift */; }; - C0E8D687D4806FA1FFDDE7183BC2F4A5 /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA5AD683C34B914BCAB1976A0926BDBC /* Generate.swift */; }; - C131C0439F39511B5B55E3FE30236EED /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA65CC84E46823F8529911D1DCBD3787 /* SerialDisposable.swift */; }; - C247FFB5B73835CD3C3E6E1F723EBDAB /* Pods-RxTableViewDemo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F2AFA1C99F51E8831E2A910DDF5E7A3A /* Pods-RxTableViewDemo-dummy.m */; }; - C257AB5EB05D2B6C550232C961CFE64D /* KVORepresentable+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E689C6EAA268B984911F48829C5FA4C /* KVORepresentable+Swift.swift */; }; - C503C9EB33E07EDFC8A272C5C091F843 /* Observable+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB54E1471B82610011CF139FC19D0B40 /* Observable+Extensions.swift */; }; - C59416520E601698248D4DA1CE7D1F56 /* UITabBarItem+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72748232D690009B11E33C78D1F54D10 /* UITabBarItem+Rx.swift */; }; - C5D3FDC03FFA1A5EDEC471A821F4F00D /* RxTableViewDataSourceProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3037F1D4AF2721851F9E43056218F7ED /* RxTableViewDataSourceProxy.swift */; }; - C5F30F8CF7A73BADA7E69D968010115B /* NSObject+Rx+RawRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DA0B4B2601B0524D3150E6AC5425223 /* NSObject+Rx+RawRepresentable.swift */; }; - C66090EE747F98EFFCBBD435E5D866CC /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 394DEA29C33545B33E41CCB9E3E23095 /* RxMutableBox.swift */; }; - C67DF513BA69CF9ED33EAD5C8C19F9D6 /* _RX.m in Sources */ = {isa = PBXBuildFile; fileRef = EB946CCE233F12221EDC728507945C2E /* _RX.m */; }; - C6ED83F18C0F9D86D13ABDFFCC160B9C /* Observable+Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DCEF9D5318A070C3D427135B8882D79 /* Observable+Debug.swift */; }; - C739D5054B4CD7BBFE26F2E0F16614CE /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 005BF06B373C56888847BBA883C81899 /* Merge.swift */; }; - C79C1D04D0E38F128AB59A5ED89EBC1B /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C82BCBE5E555223D21BA6B4D87F5FB /* SynchronizedOnType.swift */; }; - C7B3119B5EA8CF76E315AF247AA27A1B /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75A421CFB92FFE874F5B36575A783A22 /* RxSwift.framework */; }; - C7F8FF2F0D922D28DB71E01D23232D66 /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = B82CD0ED461793723F68A396EFC3C75A /* PriorityQueue.swift */; }; - C82C3C7315B0EDEA5C73F83E85B6E957 /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F57B5F1DD2CC43694F5A2FE2CB89D74 /* CombineLatest+arity.swift */; }; - CA43DE1F40C6580AC5FA12A27C3A651D /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3432D2B36218CBB59EA988271295A0FE /* Just.swift */; }; - CAEFB81D8E2F0F6BBD8CDCADCE03414F /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 952F37E31F033A130FFA31E6EA48DC6E /* VirtualTimeConverterType.swift */; }; - CB029D264580E3A9CB10C2D264E4B287 /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = A710A2CA347C31D4AF7921A6FD7AD05C /* DisposeBag.swift */; }; - CB889D377A116991D0139201F3EE3763 /* _RXObjCRuntime.m in Sources */ = {isa = PBXBuildFile; fileRef = 6154396DF3F83867E1E0E6690F9BA673 /* _RXObjCRuntime.m */; }; - CBA5D5B8F8FDBCE3DDCA5E8A8ED47F13 /* CombineLatest+CollectionType.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED74A87F0C83A760A9CDC92D24A8B64E /* CombineLatest+CollectionType.swift */; }; - CEA3496D0E0442C905BB113762100AFC /* AnonymousInvocable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4D12B680F061CB855B5FF6EE4C70809 /* AnonymousInvocable.swift */; }; - CEC07AED858DCC7B67939408B416FBA9 /* KVORepresentable+CoreGraphics.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC03A4068F8149A09EAEEEA2E4311D58 /* KVORepresentable+CoreGraphics.swift */; }; - CF1F7A253C906B23C3913629A97A89EF /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2047E1C7B0EC35B2140C021B90EEEF5F /* BehaviorSubject.swift */; }; - CF4673C3470A9BA694AA2CF330737108 /* Observable+Bind.swift in Sources */ = {isa = PBXBuildFile; fileRef = E760976DAA7ED684F2644D09D2EB09AA /* Observable+Bind.swift */; }; - D05ED02F8449C018E86CDB6F6A911A66 /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = 488BF24EBDB4184D655691A9F0846484 /* Take.swift */; }; - D31025721A8CD8BF455DA79D97CEA7B5 /* ConnectableObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83D964365738F68246F330076C21713C /* ConnectableObservable.swift */; }; - D4D0BAF62228F821AA26B7DA618CD42A /* ItemPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1AAB9AC6A42F2BEA32741BEA3AD3CEE /* ItemPath.swift */; }; - D4D8CDED8939A001AE998508705E8E4F /* DelegateProxyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC0A51E37010BD270FA3FBBAED79AC9 /* DelegateProxyType.swift */; }; - D508980DB2A45BCACF09ABB7011A423D /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 392B5175213C1FFF6337996AC9991EB7 /* SerialDispatchQueueScheduler.swift */; }; - D5B89ED24C859593943D984AA7EE4290 /* DispatchQueueSchedulerQOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = E85178FF7FE09585BA1DB5CCEC977422 /* DispatchQueueSchedulerQOS.swift */; }; - D5F29F6809272BFEF1F5E9955896AD7B /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFA9CD5809D72EC238C686E5A7EC1B76 /* Queue.swift */; }; - D7D84BD5322C51642BD0845932820ABB /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44684986AE704B6231DD21184EB433B9 /* Error.swift */; }; - D829F05DA4F33CE44046D9DF8444C6A0 /* Observable+Concurrency.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B5111AD9BE7E2A19ACB4203A2C24715 /* Observable+Concurrency.swift */; }; - D8597589706CCD7A400AD61310BBEC6E /* _RXKVOObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C942C00ED1563E5B059D9A9BA59965C /* _RXKVOObserver.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D9AF8E1A378E23B497554CBD19308E57 /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = E052B5824C1D5DF14E13BD18EF18E72A /* VirtualTimeScheduler.swift */; }; - DA9734B3E5A753ECA090355DD04D69E3 /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7506EC23F801FAD45B52F5B17547767 /* ObserveOn.swift */; }; - DA99500B103CA92D85FEEE7ED369926E /* UISearchBar+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67532E9C78A05F28C589045CFC327363 /* UISearchBar+Rx.swift */; }; - DD03295BDAD5F9FC1E94C71D71732FE0 /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBAFF4EF0BEF26EEA549366B74A0E66 /* PublishSubject.swift */; }; - DE196C1615725DAAAA515753BBEA00CF /* UISlider+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6E70F60941C0AE3C8AF49CB3D6E1F73 /* UISlider+Rx.swift */; }; - DE3840E3B7340B2F5DCB7FE2FBC78612 /* CollectionViewSectionedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DB4C9F8D83202C536F3BBDFE9BABC96 /* CollectionViewSectionedDataSource.swift */; }; - E00BC65957827B9143C6E3917BB93EC1 /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A28218965EEFAA631B0C167D30B95BB /* SynchronizedDisposeType.swift */; }; - E20B7FA9B40B5C15C0D65A0A2C707349 /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F317DBB6D505BBB0DC95943D4F69D3AB /* Observable.swift */; }; - E2270D856910B457FD8C59B78392764B /* ControlTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45E4E56B19CB2CF8D08539C369B1BBE4 /* ControlTarget.swift */; }; - E26EDB83D37C459CEA8C14AD41BF5398 /* _RXKVOObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ED138F98853F93C4CBA5C4D5E4E4673 /* _RXKVOObserver.m */; }; - E4062F3BDA221F997448EC19F2BE275F /* AnimatableSectionModelType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B375AFFE8390D151F82161AD24D6A69E /* AnimatableSectionModelType.swift */; }; - E41CFEF34729CE6007CB898E47DBA760 /* KVOObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041EC25768988058038140847684499C /* KVOObservable.swift */; }; - E5C3270F7483983BB27436D43D158111 /* RxSearchControllerDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F2999F516C37F7542C0800AA5232161 /* RxSearchControllerDelegateProxy.swift */; }; - E6A6747216DFE19937557090B1AD1C2E /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3B637F17226674CA93F1ED73411C0D9 /* SubjectType.swift */; }; - E6B2814F52482B2BE841F7977B95AC95 /* UISectionedViewType+RxAnimatedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 655E5641A59A1D6EFDFF4D5998F711D0 /* UISectionedViewType+RxAnimatedDataSource.swift */; }; - E838BC98C86C647B39CAE6D2EF97C51C /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 702674FD5E17EFDE9994190E75E6DE8D /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E874EE9C596AC6C9538DE0C6C8F237C6 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = F75C6B0786BBF6AAF20B2F6E96335770 /* Errors.swift */; }; - E98FC3ECE54790237C8EDE646574147A /* UICollectionView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 479F065BFA55D3FB755A21D027D0D77A /* UICollectionView+Rx.swift */; }; - EA55E57583085B574C83D030D5D8DE88 /* NAryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA899A54921C5F415D9F70E659E2AD1D /* NAryDisposable.swift */; }; - EBFE52DD24AEAD08340C6DAC705185AB /* UIBarButtonItem+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = A50E62FE23EAAD062EFA44BC8C1A2B9A /* UIBarButtonItem+Rx.swift */; }; - ED22E780421DCA998965FCC17A2B3F76 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75A421CFB92FFE874F5B36575A783A22 /* RxSwift.framework */; }; - EE618CE8A175CEC1215D288E3CEB9D43 /* RxSearchBarDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = E082772BF515653ED7A782FC0768378D /* RxSearchBarDelegateProxy.swift */; }; - EFFABD76A8528AE7C951DE17EC1289E2 /* AnimationConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = AADC84D579724A650B42A9FDD2803F53 /* AnimationConfiguration.swift */; }; - F014C4CC1DF0F3D81C4FE677FB8640BD /* StableCompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BE7EC0ADC83CD760B32F2E1D7020AD3 /* StableCompositeDisposable.swift */; }; - F23B7EBF1FD37B0067AB0040096D9970 /* UITextView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 855FBA980626C92A023773B91B79761E /* UITextView+Rx.swift */; }; - F3AB05EE7FE5FA5526787EED1BF02D35 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F26F4C06723F6264A751593D3DC5D1C /* Bag.swift */; }; - F3D18E2C3954C783D32897465274B2EB /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42B348176A6AE942E9D4566E0CDCE4A /* Repeat.swift */; }; - F43C35033D3C8C5959CBCF67205FD92D /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0680DCC217EF3E5B83A63A377FC6BEC5 /* Catch.swift */; }; - F9B93A60F0E7786ABA3E7F8456ED56F8 /* UIButton+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = E200AA2D1F8A26811491BCC4ECEDF1CF /* UIButton+Rx.swift */; }; - F9E9196D47FAA329B956B24F3640C355 /* DataSources.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D7D41E1572A48C669C88A5D32CCB483 /* DataSources.swift */; }; - FA9596BE0A8C0A7AF60227030DA5299A /* Differentiator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EF4A589D4D868E5449082BA9FA93908 /* Differentiator.swift */; }; - FAA67191B4ACB0374B3A22403AD6EC21 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AEC9C79D8D6C0E2A213C2E450FD2729 /* Event.swift */; }; - FDEC792822318CA2E07FA279C5ACCA12 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EDA82B7D4B853FDF29D03F2F794C77A /* Foundation.framework */; }; - FFF7161A515B5CCDAC2ED90BE8CDBFC8 /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F544C5FCAFD9627D960A2E6354C5D84 /* Rx.swift */; }; + 0007B1D335EDE8E2010CBB104F40098E /* ControlProperty+Driver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B8325346DC1B197EACFC386C0AD44B /* ControlProperty+Driver.swift */; }; + 00139D7766AB33E9E9BC1A65032CEDB7 /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4006BEDD4DAA52848CF3B216376E9CAC /* RecursiveScheduler.swift */; }; + 006A6B2BD68FCD1356F0C0570BAEA7B4 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F45BF3B35C2D03FE86935B38C12F3CD /* Repeat.swift */; }; + 02EC5C852C4A5B9A0494E5E1D52DB801 /* RxCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = B8FCDA60BE0589C6ABC254986EAF4BF0 /* RxCocoa.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0314AE2523003F5E1814CC51102454C6 /* Differentiator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BC5AA66E878C50B3DB4B7509F1168AB /* Differentiator.swift */; }; + 06F6275DC4F1F7CB9E48DCE2FE15D70C /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9EDF092ADE13227D6481C788DCF1AC /* ReplaySubject.swift */; }; + 0918FD215ED4E66D444D2E771ABDB092 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2510927F7010746B9E8CC5406B9739AE /* Do.swift */; }; + 0992C74EE4D284B5473E98DBA1B27B3B /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE108D8124D02DD3B9711D9039959CC /* CombineLatest+Collection.swift */; }; + 0A3B1C3DB7F99911303443377B3EB2E8 /* Driver.swift in Sources */ = {isa = PBXBuildFile; fileRef = D74D7DCF803852212751CFBB1FC3CF8C /* Driver.swift */; }; + 0A45BB7AA801C93F982AD8252012447B /* DataSources.swift in Sources */ = {isa = PBXBuildFile; fileRef = 743C1B565B4FB9A488667C0279E27C6C /* DataSources.swift */; }; + 0A5B1E4FF6A3C9FAB96B3CDCB06808AC /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9CD6CFF97E31C65FE26ADA366FD3382 /* DisposeBase.swift */; }; + 0BEBF22BECA0BAD19AC2117BCE907481 /* UINavigationItem+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4F88ECA9634C669655B255E60A28780 /* UINavigationItem+Rx.swift */; }; + 0C10E4BAE123C6EAA08B5485D9557B03 /* UITabBarItem+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB6633997DFB57381792DD05E21B11F1 /* UITabBarItem+Rx.swift */; }; + 0C2FC9BE770A8DEDBE0D0F272EDFB361 /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D0EA58BF90FA8F357EA11581554E5 /* Zip+Collection.swift */; }; + 0CEC80AF9C9898BEC66A887F3DD20BD2 /* RxCocoaRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A491E0C9A736CDD8C4E8B6CFD2BFC20 /* RxCocoaRuntime.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0DBE9164873721FDBD48DA2E7B31384A /* ItemEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC89814AA8AF5F2C7670B068E97BBDC0 /* ItemEvents.swift */; }; + 0F58530BCC963A307890258D383D0AE1 /* RxTabBarControllerDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD51F4CAC068A7C8573A9D1CF3DB552E /* RxTabBarControllerDelegateProxy.swift */; }; + 0F91903E10EDF79F5ADF8E2457580334 /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B72C441E4F2A3D0313CEA984E9E7E23 /* ScheduledItemType.swift */; }; + 10A17B543D1569C84BCBD8355190246C /* UISlider+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC893C5E6BE4610B9B6B8FBF761AB18 /* UISlider+Rx.swift */; }; + 10E8A94085824A8B295D7AF0F4CC8A06 /* IdentifiableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8917BF3C86ECE85EAE8715AE790058D0 /* IdentifiableType.swift */; }; + 1140E414CE59956847963D1FDDD94BE1 /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5147159BE6C37D791066D042FAED0057 /* Timer.swift */; }; + 11ACCC0C8E6333D02DB90A0FEAB97C79 /* RxSearchControllerDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79CF583F517003EEEBBA175950E58FF0 /* RxSearchControllerDelegateProxy.swift */; }; + 12D1487EBD8576DB5E3C2A0AAE5273CB /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F910801F5540E10170E5776FFAB3A20 /* DispatchQueueConfiguration.swift */; }; + 13300167F0DBA4E84225EC0CFF6803F6 /* NSLayoutConstraint+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40641DD8AC285294383CED3CAB0C215A /* NSLayoutConstraint+Rx.swift */; }; + 148B4001DDCBE19EC113633F7E396F6D /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00D74670F352B6A2CB4241A11DBAE8B2 /* AddRef.swift */; }; + 1504EB9108CC7E0E6274AD47EEBA2101 /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2D408ACBB078C3685B6C2005571EA9 /* TakeUntil.swift */; }; + 16567CC5F4E3045DAC7DDED3052065C7 /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED4554BF134A0F8867096D893E533BAD /* Observable.swift */; }; + 16B4E128E3804B5C877E68C3469F59C4 /* RxTableViewSectionedReloadDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9390570A331F71DF4DD24C34D5A1CFC8 /* RxTableViewSectionedReloadDataSource.swift */; }; + 16EEA6671C39EA56EC29FFCAC4EB2085 /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FC642622CB0847042301AA4DCDC48EC /* ElementAt.swift */; }; + 181F0F79C8F872636B253143431FC7DE /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C0307B25815F14F6DC4D9FC4E392DFD /* Throttle.swift */; }; + 190CB94ED8CC6BF0D5FD3858FEF8CFFF /* UIProgressView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CC69B6B28CF138AE1FDCCCFD3885AC8 /* UIProgressView+Rx.swift */; }; + 1C3B7B5BA84D4EB21FA3E5AEE38F8DC5 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9B27F03951F457975B3E4574D16D7C /* Filter.swift */; }; + 1D045955DE092317223DA1ABD0E19298 /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58A1CB0ACC84D50250128B3B7B07F7FB /* ImmediateSchedulerType.swift */; }; + 1D40EFC73D8D04E84FEFAB9382E80B4D /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBF478DBBC6F39BD90331969E24299C6 /* CompositeDisposable.swift */; }; + 1DE0C7BFB7E8CA77371680A43FC6D64F /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 339F2C69A27359156735F6EB36951899 /* SubscribeOn.swift */; }; + 1E9F7B700DDBD89CAA31FAA73DBFCFBF /* AnonymousObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E4BE5E1978E4A55DA8CA00E73743AF /* AnonymousObservable.swift */; }; + 1F2F5A36732D3437505FF567CC0D3F73 /* _RXObjCRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DB09772F77198F67371FAF0E024B4CD /* _RXObjCRuntime.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 20D1B850A1E7B1C22E8DA624312B0D90 /* ConnectableObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 684514ABF683B577B531A0128E916F77 /* ConnectableObservable.swift */; }; + 21D150A9BF3F64DAB0216DBF678104A0 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAF6C9368AA254574CE4495C48758546 /* Error.swift */; }; + 21D4B10B9E595D66F04E940CC3D6C2C9 /* Variable+SharedSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE17138F0A53770C27A74EFD37C78604 /* Variable+SharedSequence.swift */; }; + 226971DE23902B9A089FE1CB4DCAA66F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01D9C2D9C585135E52772795B81818D1 /* Foundation.framework */; }; + 2345C25677E6AFB2FBA8B4E6FC2979EC /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFE92D0B5B2A0EDD65C4EE276D3ED1A7 /* RefCountDisposable.swift */; }; + 245813C36ADBE2651FD552D36E35C831 /* ControlEvent+Driver.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD6F3192EA9B6A26016AAE0D0AEE6151 /* ControlEvent+Driver.swift */; }; + 2490EF155CFCDCD9B6EC25EF4E02D3BE /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79737138836EA4257B36989FDF985E26 /* Event.swift */; }; + 2537CEC3C8607BC79C7B74A7B1C06873 /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B1247B87FD19B5DA573A2E7C0D2B6DC /* TailRecursiveSink.swift */; }; + 25A8AC2C7F2D6E5162CC3C9E73FBB93D /* Observable+Creation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73149E7D9DE54413D26FEC89897CDF81 /* Observable+Creation.swift */; }; + 278B5DE32CF7AAA9D2D0EA978E67AFFB /* SynchronizedSubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C84AC925EEE76D8FC0BA48C8219E9DC1 /* SynchronizedSubscribeType.swift */; }; + 27FE2C047EF2020D95B255348D0A9EA6 /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9880F56A5D1D3CF95FDE16F92114588 /* Just.swift */; }; + 296BC2B44D09EDCD5997264B228ED907 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F3443DD1A1DD5FAEEFBB9B6B74727AA /* Range.swift */; }; + 2A0FFD6BACDBD10A58D6892A48BBDB31 /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90F317F493C90EAE016FBF5DFB2E119 /* BehaviorSubject.swift */; }; + 2B917E43DC48D93F82D827AFCCEFABE0 /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 189E20B84B8A214335F806CEA7A0D83F /* Empty.swift */; }; + 2C146D9AD229B990B3E04D3A040386C9 /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DD03E271530955B973BB8A7F2D89FC8 /* Switch.swift */; }; + 2CB3D4838A158E19C3EE3C4C9D0AA41E /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2ECC6673140C7D1193479B46A85F91B3 /* HistoricalSchedulerTimeConverter.swift */; }; + 2D325FA1F506B305DD668CB466AAB51E /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0514789A279CC2BB38F50920421D5499 /* DispatchQueue+Extensions.swift */; }; + 2D47C1E570F4E7DA993799165BFFA090 /* UITabBarController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50D29CA3427E3B8D414F0C1FDE2BEFDD /* UITabBarController+Rx.swift */; }; + 2DC12F11CA151541D4F67AFF20F98CE8 /* ObserveOnSerialDispatchQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03452D24880A96E98449D89748B08B1A /* ObserveOnSerialDispatchQueue.swift */; }; + 2ED2458E37BFE7D1B67E0951221E4CA6 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 852130AA68065C3ED52E035A0CA8740C /* SingleAsync.swift */; }; + 2F5476D30A385A7AD57E3CF703CF3BFC /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16208F035A97D8DAA5B39E645C1C4F10 /* AnyObserver.swift */; }; + 2FB3064859F8447EAE1C581C761B96A0 /* KVORepresentable+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0B2BE316CCC751E39D31F45CC238A3B /* KVORepresentable+Swift.swift */; }; + 3014D005CE3BEF48C0904132B0D6EB6D /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D2EE4A4251F29AB74E1D07AD9F6EEEA /* VirtualTimeConverterType.swift */; }; + 31E8AFAF37FD221C2644E104910C12E3 /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C732FA2FD7072204C390B99B2F73AC6B /* BinaryDisposable.swift */; }; + 325CDA87ED9C6D4AE69823BFE72634AE /* RxCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 321A1AB72255D084EE352876F54E8785 /* RxCocoa.framework */; }; + 32747C78A16B7F8231F7F9934CF344FD /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1004CCBDC6E16A1D08DA5B56535C617 /* SkipUntil.swift */; }; + 3302F4D823C72F359A7ED134DC9EF00B /* UITextField+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9461F9CD3C08AECF8B5E84F30234FC7C /* UITextField+Rx.swift */; }; + 35812F38DDC38F246BDE725FA05DBD28 /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 657C6DE400A4C5867CB148CD837AD21D /* Sink.swift */; }; + 37224546FA870141D9318A940379B5CC /* NSNotificationCenter+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2B78FC2120BDDC9307B1E6EBCE19A53 /* NSNotificationCenter+Rx.swift */; }; + 3926861756AA8892CD13B6F5C350AF3B /* RxCollectionViewDataSourceProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 127703607F1828A678FC26281986B1CE /* RxCollectionViewDataSourceProxy.swift */; }; + 39E2BD706F10D78E67A6AF8BC8242F6D /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCB4E3C5E11416C80C03BB1B27D95D2F /* Debug.swift */; }; + 3BF2CFF8CF1FD3E5F4D1AC44E6B486E6 /* Variable+Driver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B92A15158431EB7AC93808840DD462BD /* Variable+Driver.swift */; }; + 40F737BBCBD2984D2A0FB3597E0B314A /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CC7E2DC52F26D1F514677B6A7CF665 /* ScheduledItem.swift */; }; + 419AC734B94514E4B944243D7C9503A5 /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 377B58AE725891176FDFA20ADE58BB37 /* Merge.swift */; }; + 41A558D94AE85BCEB4F49BFFC0337E47 /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA1DC5325DFC96AA78459F287165EBA5 /* Zip+arity.swift */; }; + 41BC5D238C5135499B6E898071A9A3D0 /* AnonymousInvocable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D7CDFCB6B25D9EDBD84E3DD2BEFD817 /* AnonymousInvocable.swift */; }; + 425DC043C56313EB64C1EC768692C312 /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAFD2858013A4A0FC8AA7ABBBA200B87 /* CurrentThreadScheduler.swift */; }; + 431BE243E802EB93F943938872738F4B /* TextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = E547AA941916DE768E2E55FB66D1B154 /* TextInput.swift */; }; + 4395DE2B75F7072E6D69891D3FDFB38A /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 869AE380E194D3CE7C60FD4697F8458B /* ConcurrentDispatchQueueScheduler.swift */; }; + 443AAE329C8D4EB46EE8A3DFE8F81436 /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19AD52A69E88FFC1F95266147C75FF09 /* ObserveOn.swift */; }; + 44BAB9A8DE10D89D1E4DBB665E405699 /* UISegmentedControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05197BE4DF3E8C32CFC8B30BD20C9304 /* UISegmentedControl+Rx.swift */; }; + 451840574CCD8C29E493B9D83614BEE7 /* Observable+Bind.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB93952A89F5FBAC11B7B01CCF1CB4D7 /* Observable+Bind.swift */; }; + 452234C4344563DE25471D1A999EAE15 /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B00433C133AF960134BFAF587EC839 /* PriorityQueue.swift */; }; + 45328870A8F8A552789BD2C5B69851FF /* ControlProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6466E3293A8FBCED83909AE63C998D52 /* ControlProperty.swift */; }; + 453DE72C85C1C730AFEE693567448780 /* NSObject+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFAFC0E14D28F48AED1B736EF5E9A5E0 /* NSObject+Rx.swift */; }; + 4669F342B9CA122BAB8E03A4F10F970B /* RxCollectionViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6751B86FC81127FB8BA5F6A9E15F3207 /* RxCollectionViewDelegateProxy.swift */; }; + 46C3D38F3A1F06C162B3D3254F59D601 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9BBD35661FC6A2FF8972150D0EBDB16 /* Disposable.swift */; }; + 48402B4CB662C2997A5C9131B7157FC1 /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = E40AF20CFAD7FAB0036AC0ABEBA3F7FC /* TakeLast.swift */; }; + 4A5266451C94684D9A0A97A9A43AD7D1 /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = A29CD84AEE57E781369C5248490C7B95 /* Platform.Darwin.swift */; }; + 4B06C44AF7FAD7109E1E7CCCDE18FE7B /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7E92FE04C7E040B3654E7B37B3761C /* ToArray.swift */; }; + 4CF66DFD0D0081C700FFD00D70145704 /* RxTabBarDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE1301E583B81945D8ACCDEE2D1132AE /* RxTabBarDelegateProxy.swift */; }; + 4D86AC921D39A24A67EB85F80DCD7D1E /* Observable+Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC83987589DF96B1BB905F8EFACC5B2B /* Observable+Single.swift */; }; + 4DF2F06AC16725DEEEA71FD913A55BEF /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8C10F2FCFD40F473F4F8F4915608214 /* Platform.Linux.swift */; }; + 4E775D87DA2640DAD2C8A8D761F3ECA0 /* RxPickerViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12DF80D8438E62F520A580A722B3EEC3 /* RxPickerViewDelegateProxy.swift */; }; + 4ED9E740B452DDAF7FB84BAE1BD8AAFE /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4503C81FA4AD8772FFABCEE119CE7EA /* PriorityQueue.swift */; }; + 4FFCC591B4B66875ECA740B7D98BCC0D /* Driver+Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE6DD87F65CE23BAAB2F4A1C3053CD39 /* Driver+Subscription.swift */; }; + 5180D0776D86ED0DB222E98D05979E5A /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2B864AC43C1EE9AFB7BEF9C61018041 /* Queue.swift */; }; + 53182293B7F833C19C726989E7496E64 /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19596F590330DF7D3A07E08F5F2B5C74 /* Bag+Rx.swift */; }; + 53EE54FD79B627E248BAF1357DCD8038 /* SectionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 980DBD518A1D666B2C4CAD2550DA37B4 /* SectionModel.swift */; }; + 53EEDDB18E7FF987FC2A07822C5D09AC /* UIWebView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1845E70698AD1C4873D0FC2DAE56211B /* UIWebView+Rx.swift */; }; + 54F990AC55379260077E1976357FC69A /* UIView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA27C8A01F351F55BBBE1C83E12D08CC /* UIView+Rx.swift */; }; + 555FA3C095FB80491012F3710477FFFC /* UIPickerView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4378606ACBC0E0F9B45918A454192827 /* UIPickerView+Rx.swift */; }; + 57187FAEAF682F535E8C6936C34E1B07 /* Observable+Time.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF567303460AFC3F6889F792F6249F6 /* Observable+Time.swift */; }; + 57AAD55ECF31573852903A17FE512F2C /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6CCBC945AEA3F09360E82953F3BA52D /* String+Rx.swift */; }; + 5B72C4FB1EFBB07149AAE705AC3BC692 /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE688C443FEBD47CF88E6E9ACE777F92 /* Concat.swift */; }; + 5BEF138B70C1462AB2943B2E9F3D14D0 /* Observable+Multiple.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BFAD5F5ADE258F03BEA2077D0A71A92 /* Observable+Multiple.swift */; }; + 5C3D74CFBDA69B8D7B77D7D7372E90AE /* IdentifiableValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 221E107E86C50FB6E44F30B981110B24 /* IdentifiableValue.swift */; }; + 5DFE81D6E9FD1979FF036F031D22A07E /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8238596AA612F349E4F3BAA4C2C19A5 /* ConcurrentMainScheduler.swift */; }; + 5E3B4E99B24EF78687C79693235C7326 /* RxCollectionViewDataSourceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19E4179A74FD91A109CC77170AC1C07D /* RxCollectionViewDataSourceType.swift */; }; + 5E7E645BA471F7B46C6626D0A6335656 /* CollectionViewSectionedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = F15DBE915B5D4221FC833D492EB0531E /* CollectionViewSectionedDataSource.swift */; }; + 5E801EB5F95A54F7FAC31F14326309CB /* RxTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95FAF9E104BD90785AA592AF3BD731B3 /* RxTarget.swift */; }; + 5F711B99C486F09C302F75DE343D0875 /* _RXDelegateProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B1946348174826F2E14A6A1DD8DF2F5 /* _RXDelegateProxy.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 60794624BA7748C1D44AE36A11D739AA /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EA5CB8391A8D19DD4A88FF8035380EA /* LockOwnerType.swift */; }; + 637DF151E54CFA05B230ED88220CD377 /* SectionModelType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6033C3BED54E9BB077AFEE321A39A1E6 /* SectionModelType.swift */; }; + 63C4F0A492CC9C51CB05E8307751E176 /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97B773A121AC39E64B90D3B8CBF63C8E /* SchedulerType.swift */; }; + 65EFAA5D59B616EEE55707950C219C99 /* TableViewSectionedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 427E84BBFD90EDEF90109A18DD34804E /* TableViewSectionedDataSource.swift */; }; + 683F9520E869860C446BD88215B413D0 /* AnimatableSectionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5B8808945E2DED4FC91DFA3009D35C /* AnimatableSectionModel.swift */; }; + 68BFBBEE42A64D958D25CC99CF87F1C4 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93FB9D0F50A61FD9DA2D571E9BF17630 /* Disposables.swift */; }; + 69C6FC76261CB914ADF2128F2798030B /* Variable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2ED51F3FC3DA3D63830EA042CBB21F3 /* Variable.swift */; }; + 6A252F4FDCD05A1CEA471C9FFA5656C5 /* UIControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1307A0286B0234D1232190B72D10E2F8 /* UIControl+Rx.swift */; }; + 6AC4457C056A42F6381FE6C98CA295C5 /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7579FBC648A274C123A55948C001A701 /* Lock.swift */; }; + 6AEC8D609B08969AAF3D587E5739960B /* RxTextViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C5BEC4447AEEC1DBBD28570BD35EC65 /* RxTextViewDelegateProxy.swift */; }; + 6BA27C8BBF6F2AA922EEC1069318FF52 /* UIPageControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1AB286AD7A86211D6472DAB9979F289 /* UIPageControl+Rx.swift */; }; + 6BE7D8F331C1CFE84986DFBD785B69AF /* ObservableConvertibleType+SharedSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DD7CB5736774192BEF2CDFD8A6C6F87 /* ObservableConvertibleType+SharedSequence.swift */; }; + 6BF237EE5053D573585F9D5DAC362563 /* String+IdentifiableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72CE22701097144CA7CC4EB148EACB83 /* String+IdentifiableType.swift */; }; + 6D504D7851A607232B477B3D76DADF73 /* RxTextStorageDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = A27D37507872FF62F32DFB99F25836D5 /* RxTextStorageDelegateProxy.swift */; }; + 6EB44A361EB0C947DB3CE8DEE9A371BC /* FloatingPointType+IdentifiableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38155259B88266E27F21AB107279C602 /* FloatingPointType+IdentifiableType.swift */; }; + 6F775E150F6A5782A6CC1771B262D8CF /* UILabel+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3530C7475412D4E9E9AA6FFF82ADE45A /* UILabel+Rx.swift */; }; + 6F8DCC6BFBAC07E78249BF0BD0EE9B46 /* UIScrollView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE0FF21EE6A82F6A64508A8FCEFD846E /* UIScrollView+Rx.swift */; }; + 6F9D974EA9655515011290F323B731B6 /* RxDataSources-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3330D0BF0343C874E61299E5AE33869B /* RxDataSources-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 70B4272E34A9B612819F266948A65909 /* IntegerType+IdentifiableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53A508A97A09EC388234D8F1D8DCAEEC /* IntegerType+IdentifiableType.swift */; }; + 71738713CD8C6CBD2A4C736AA9890C13 /* RxCocoaObjCRuntimeError+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24061A57EA0C9D585615887AA5475671 /* RxCocoaObjCRuntimeError+Extensions.swift */; }; + 72407882EF1419269B67C924B3E38B1C /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEF274221E81A61B9AB9FA3643A84920 /* InvocableScheduledItem.swift */; }; + 7242897A0DF4C86C7E63268831B58973 /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = B24921F8011FCA825C4993B5604EA685 /* Sequence.swift */; }; + 732A4DAA3D48E95C8AD1D26BB70790CD /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10F7C2E0701280D569FB3712A8776205 /* Bag.swift */; }; + 73C0E4ECFDEC148175C9068E25D31CD3 /* RxDataSources-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 291CFB4C3259A633A84A313993208033 /* RxDataSources-dummy.m */; }; + 7691433C9BE1190F64D5D1C95F3F062F /* SharedSequence+Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4CBA2BAB8C40F798DEBE7CA11359018 /* SharedSequence+Operators.swift */; }; + 76EE5632CAD09FB2CB712F467524BD22 /* UITabBar+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAE6D893E606E509B23161511B21E358 /* UITabBar+Rx.swift */; }; + 78CB5ABC036989C3A265F7CBEB95AEE4 /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 051378B8AFFF58F217C73BE5B488A1AE /* ConnectableObservableType.swift */; }; + 798314F1A6C02B12BD1065851529D769 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D91A20A5ECE9166064F7F1F6FFA8A17 /* Multicast.swift */; }; + 7C5DEB8DC7EE2AFFDC26EE0F616FDEDC /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB1F493DC4C7C329871D6869A276715C /* RxMutableBox.swift */; }; + 7C8EA1593DFB636597909F434568176F /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1BC94DD14D9C23D96A534A70158DB94 /* StartWith.swift */; }; + 7C99AB32B2961BAA7B6EB54089CE29A9 /* RxTableViewSectionedAnimatedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ACCC67C4B931519FDF6F0816C36733F /* RxTableViewSectionedAnimatedDataSource.swift */; }; + 7D0B0C268268BE1AE71907353C2A6FC0 /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9915AB6370C154295AA80909F00CC339 /* Using.swift */; }; + 7D22D7B74732C329832AFFCD115836C5 /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD87B02A5CCD9A86CB1466EF1329BFB5 /* Logging.swift */; }; + 7D68071D6915C2FDB4C0B422821776EE /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = C64B127FE517B8381A0CA7837861480E /* InfiniteSequence.swift */; }; + 7E87FE4433C8BB4D3E9902F23EEDCFDF /* UIActivityIndicatorView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2ED8C638B0245A2D38FE292BB9C190D /* UIActivityIndicatorView+Rx.swift */; }; + 7F785047F9A55CA4BEF576F4B0DD03FE /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC0736D33646BED3FA3AC26C5B5B507 /* ObserverBase.swift */; }; + 805CC54E8C3AC88E333B61CD323C00CC /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D762629889D889F112E7D816858549E /* ObservableConvertibleType.swift */; }; + 818AFFB1F9E3E5C125702403F6C1C2EB /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D5B73DC7EBEB64055E983754AB36F05 /* CombineLatest+arity.swift */; }; + 819EE7A6BA4AB69300EC666FBE0FE625 /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D28CE0B28254A169E2C9EB6284C0CDA /* DistinctUntilChanged.swift */; }; + 825C9623078E2622EF3670907E0B955C /* Observable+Aggregate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99CE535BBDC0C2CB7BBA0EE9CC2AEA88 /* Observable+Aggregate.swift */; }; + 82FE85C15E97D68C43D09D01F29F10EE /* KVORepresentable+CoreGraphics.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE1A26A4EDC1E35AA985515078033CD0 /* KVORepresentable+CoreGraphics.swift */; }; + 83E3BD8D7899AF643F22046BDD62C1B2 /* Pods-RxTableViewDemo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D9F628699A419A3C47CE8B21C414182 /* Pods-RxTableViewDemo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 852D45D97359E61B65EA9944E76D85DB /* Changeset.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7060A1FD245453BAC22D582DFF9F4E8 /* Changeset.swift */; }; + 8646C747FE420FEDD89091292B30ABC9 /* RxCollectionViewReactiveArrayDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B06FD86B4E625B3BDF15946849B290 /* RxCollectionViewReactiveArrayDataSource.swift */; }; + 86C025C0019B4C43D9028E2E58F402DE /* UIBarButtonItem+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF4E6389098BE0EAE3DE7910B6CB879B /* UIBarButtonItem+Rx.swift */; }; + 87272089D68F744FBE1B8D781F15DDA9 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32F757633B0F07C4957B8C3231604669 /* Delay.swift */; }; + 87B6321863461C276DD99B8ECFC18E38 /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D15B3C86D48DC76CA660652C6407860 /* ScheduledDisposable.swift */; }; + 881FBBF2F97E31A8D3475627F81B98DC /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87146B45AEBD0C6D18AC8BFB71B01AEA /* ObserverType.swift */; }; + 8859481FE6D307CA236D7AB4EB48FB22 /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 523A789FABFAA08BE5E5E84E4AC47A3A /* SynchronizedUnsubscribeType.swift */; }; + 88AC81493FA51CE38DE61997D3C81E06 /* RxCocoa-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C661E1633FD2A389545DF68756A930A /* RxCocoa-dummy.m */; }; + 8C89E9799318F4CA143D99355BF2E48F /* _RXKVOObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AB4ED031A3078660AC89780D6892A22 /* _RXKVOObserver.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8DDBED4318875523E05308CD3D858458 /* RxWebViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E2F2CCA79D89A37403B1D5F0301A76B /* RxWebViewDelegateProxy.swift */; }; + 8E8AE7C863742C759A246FD64AF6541B /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 832B6FA48CE3355090F92ADC2DD99479 /* ObservableType.swift */; }; + 8EACB41BBD1EC9770E293EACA4FB7830 /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FEB07B88186F63A0F1F073AC6738814 /* Sample.swift */; }; + 8EBE3F035E427052202F5B31F36BA7D0 /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7EE2C16CBE8B75D8267C33C933851E9 /* HistoricalScheduler.swift */; }; + 914F8081CBCDF862C65BCE9B5514E433 /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE761CE7535CAFB9FB8480F2B3CA51A /* ObservableType+Extensions.swift */; }; + 9445754D2BC1443619641FCC390DD758 /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09FAF9E2225308DFFF2B9332B6024009 /* OperationQueueScheduler.swift */; }; + 952B3B887D6232E388E29E0C850AA871 /* UIRefreshControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8FF6BF3429FD6E36FEC130258CCD8C0 /* UIRefreshControl+Rx.swift */; }; + 959F0474ADA4B5AED935D14072184047 /* Array+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32DF670CEE7A47B53258D6A78B53508F /* Array+Extensions.swift */; }; + 965AA9C5F4B56EA03CA5DE45CA3A99EE /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1565E6686382B6BD1D3EA6B3FA099C0 /* Errors.swift */; }; + 977BB7AE9F1DEEAFD986F2DF15DB9D16 /* UIViewController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98B83B2A3FE4B3B16036852D9ECACB7F /* UIViewController+Rx.swift */; }; + 97AA4F3E19E10126D4593F88A63D710B /* DelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EABB406476742E787C28F02080FB25B /* DelegateProxy.swift */; }; + 986F160D245503C9D252FDB4969C4AA8 /* SharedSequence+Operators+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5283DEDC76BDE4D1C06091B0195CD0D /* SharedSequence+Operators+arity.swift */; }; + 9950B62BC1C5B8461AC20E440B9F1884 /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4629741798D2D8BEE194A348DFF9BA1 /* InvocableType.swift */; }; + 997D5C9DC20A04CA6156895BAB1E8DA2 /* URLSession+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DD4582A12EF95BDF70518B0344EC0BE /* URLSession+Rx.swift */; }; + 9982326FDF687307959ECCC310B14016 /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17043A6D116B83A4A676764185F788AC /* SkipWhile.swift */; }; + 9A6D00036D5A077513DFDB9D350DDB9D /* ShareReplay1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 172A5863E3187787382DCC9E848399B0 /* ShareReplay1.swift */; }; + 9B4B3C940A1023FC0F5775C5A9EE538B /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BD41054BE944C2519276E3064A12BC8 /* NopDisposable.swift */; }; + 9BAC78BD7D0F21561C7EBD2BF6655ECC /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AB233A0E4C3CC531D351E5B11EE50AC /* SubjectType.swift */; }; + 9C0AE1C5C533D53C4712946376765648 /* RxCollectionViewSectionedReloadDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D02D7EB5F4C4393A7F4DA6C09ED4315 /* RxCollectionViewSectionedReloadDataSource.swift */; }; + 9C689738BD170B254F7A694707509DD4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01D9C2D9C585135E52772795B81818D1 /* Foundation.framework */; }; + 9D7A9F44AF20BF42DE293A17517AC791 /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23999F5B8E8DE251A3398353C7B0D17E /* SingleAssignmentDisposable.swift */; }; + 9E7132A6A93C696C69D9A1180C9FB0B6 /* RxTableViewDataSourceProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = D495497C3E2F13810BED4B99CACAEE97 /* RxTableViewDataSourceProxy.swift */; }; + 9FD0BAE660027CFCB5176AD43C7D0D0F /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43AAB0393652252135400A32CAD4EFAA /* InfiniteSequence.swift */; }; + A03399E839BEB38C312123DBE12F99F3 /* _RXKVOObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = A0E15A68BFE737B4ABC80BF534498CEE /* _RXKVOObserver.m */; }; + A0AB22C391ADBEA5BB4926E8E9E69AAC /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3C103C29B17E0EA44D22A95C70041FB /* Deferred.swift */; }; + A63437671241D8492EA44ABB0E018178 /* RxSearchBarDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A724BF8AF9AA6448CDF906A2DD85467 /* RxSearchBarDelegateProxy.swift */; }; + A72E46C85B519A77219EDF6D9D40265F /* NSTextStorage+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C447B0686A8743C6BE6822CC1BC469 /* NSTextStorage+Rx.swift */; }; + A7E8EDF2541830E6BD2823E85AAD835E /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA08EBA9939A568FD22A56560CF82A6 /* Queue.swift */; }; + A8675186C1FD8FD66041BAAAF9793BE8 /* RxCocoa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C02B7D8A52AB7C160EFC99EBE8BD9C3 /* RxCocoa.swift */; }; + A95CC5AE9B8A3B8FE651F5E3496C7D91 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE2E42F729F51BBF43E301F48A17DE94 /* Buffer.swift */; }; + AA3EB7542AC4078703408EBB5731A1CD /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9D1D08446CE4A5AC12159A35BD77F29 /* DispatchQueue+Extensions.swift */; }; + AA6CA7E80CC82382B2503CA6296BBF92 /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B510A4164AA4F979F46D323A8E5F9539 /* SubscriptionDisposable.swift */; }; + AA76713BC0CD396AA1378B84A0BAE1D6 /* ControlTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70B9A6F940B9E1C17A9B79DD42D3229D /* ControlTarget.swift */; }; + AB17F387E029A47EF1884695685C0D26 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75A421CFB92FFE874F5B36575A783A22 /* RxSwift.framework */; }; + ACA744496C6F813BD877FDC0ADD0E77F /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E82F975CF41C0107B973778D2918320 /* Skip.swift */; }; + AF03069DDBAB161BB85720A5589FA021 /* Observable+StandardSequenceOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013FBA8A5113AAF4783874719F359C6D /* Observable+StandardSequenceOperators.swift */; }; + AF4D488DC153DBCA04B7877326A62AD7 /* AnimatableSectionModelType+ItemPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC70151EB564F794525C7A70F7BF0C4 /* AnimatableSectionModelType+ItemPath.swift */; }; + AF999C27C2C53D23A89A4E64E15E19A6 /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C6A0CADA7469243BCCEBBA7B9A98E48 /* RetryWhen.swift */; }; + B00F65FB35968C7A4C4FEC742AB4AD94 /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4264024D6AC172108C4A7F9E55AB380 /* Producer.swift */; }; + B099A362AEF32F23F5F6EDD00804A684 /* UISearchController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE96C109C3FA524C0A497102331903A4 /* UISearchController+Rx.swift */; }; + B0A9C370F766EB92C4467A8870783A2C /* _RX.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C8FCECA2AC0678E3E81C9785027BF10 /* _RX.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B2121D473C7D93E153580D6B7A240389 /* _RXDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BD5D588AAC043DA6B8E44798E30A26D /* _RXDelegateProxy.m */; }; + B343B89BE4B35D0893B19FDF823B9552 /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2A5B3CA83E3495E9AA59559311BA7E6 /* Platform.Darwin.swift */; }; + B5DCAD02BEACAAF1BEB3B29D0D011968 /* UITableView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B4AB91342F61FAB8AA0223932F7BD8D /* UITableView+Rx.swift */; }; + B640EFC87EA932E41AFF5760A7CA6240 /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 869AC1C17901CD096909FB0EE91579E1 /* Rx.swift */; }; + B86AF653407E6CA44343F4CF75EE6B57 /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4D35493523A754297AD996F29CB67CC /* Never.swift */; }; + B9AFD303A2AE898AC598F6A0DAFAA6F1 /* UIGestureRecognizer+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 810029361B36506BB7FD50E2FE03F1C5 /* UIGestureRecognizer+Rx.swift */; }; + BA40EC6BF8F5C49E15EB2A83AD5A7D71 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = B913C81B23EDE7019262E54ECB2125F3 /* TakeWhile.swift */; }; + BA4890978FB2C10C01DB102202B10A52 /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BB83A405F56A8C0BFA54FCC352D09BC /* AnonymousDisposable.swift */; }; + BBA85E8BA90E520952FF3E98C76AAF07 /* UIDatePicker+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE262CAD5DB3E5BDE032447B163A5015 /* UIDatePicker+Rx.swift */; }; + BC34FEC2CDAE974D9D4505DD2A4F3147 /* RxScrollViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9264C5CCC62EF6F7A6090D773A540B76 /* RxScrollViewDelegateProxy.swift */; }; + BD92BEC9271FAFF5ADAB642A54C17209 /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76C32DAC6927855DDBE7ED9E0DFFE78 /* Cancelable.swift */; }; + BF0BA72601D23AA49FA51A94805EEC5D /* Observable+Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9665BDD20C6F6A0EC28B094969176995 /* Observable+Debug.swift */; }; + BF6FD676B062D7AA76C184A41336E0F5 /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4F5FC72244269F775F2D662CF98560C /* Generate.swift */; }; + BFB84181F6BF5797A66ACF432ECEBB1B /* RxTableViewReactiveArrayDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0E580271F48B4D9CCB860D358BEEA3D /* RxTableViewReactiveArrayDataSource.swift */; }; + BFDC869E3CC474F8D6C390FF41B7064C /* UIApplication+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6744986236AA450C4E9302AA70ECAF85 /* UIApplication+Rx.swift */; }; + C0577F87A34D6D57CAA6D64F37DA91AE /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF40BE60D9A9AD76037CE2D55FE5D0B /* Scan.swift */; }; + C063EB96B041F1D95CD8189DFF3F68F6 /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DB4309CC71C0ACDEC46942D13573EC /* Zip.swift */; }; + C0D25CC1CF642D847C1621F43909A691 /* RxTableViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2C0A7AD94DFF22EF5B97153F3AC613F /* RxTableViewDelegateProxy.swift */; }; + C1E1FDCBDFB0CEBEF488F0E55735B994 /* SectionedViewDataSourceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D9ACA2F2E0F34F4D2AE9FD326D9430A /* SectionedViewDataSourceType.swift */; }; + C228C2F8BAEF309B358E45B24A920DCE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01D9C2D9C585135E52772795B81818D1 /* Foundation.framework */; }; + C5404F62142D6675AFDC93DBBA79E952 /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9505C24933BEA431DD25371A190E97 /* PublishSubject.swift */; }; + C61ADB9C925DDD683E5206AF6597730C /* ItemPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BD2D92E919693886670B9B4EBEC8F6D /* ItemPath.swift */; }; + C85A2238774748CB850283EEEB32CCCA /* UIButton+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10633C42E25FD1F7F1C7EF52C46BD76E /* UIButton+Rx.swift */; }; + C8831164BCF3E451215528B67D49C89C /* RxCocoa-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C79C0F60B88BADD8F7C07431BF109F1F /* RxCocoa-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C90D97923769A222A35FB3E84D86CE9D /* ImmediateScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F390118714681385CA5229413841772 /* ImmediateScheduler.swift */; }; + C9411D0E1371BB2F6814C50D6C20C8BF /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3024C065E240FAA704FCBD8A54DC715F /* Reduce.swift */; }; + CD8973CD740E72271D5BFEE3BD7EFF7E /* UISwitch+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF8BA2BB9371A2D5589996E379CE78EF /* UISwitch+Rx.swift */; }; + CE36A343334CB448F4B6B589851B3376 /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BE2F8EED54B4656A049C330711FA96 /* Reactive.swift */; }; + CE4677E95523D22583A83BE5196618C9 /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8086FD8D79795386146C374A3AA16F14 /* Take.swift */; }; + CEA2EAB64E868FA9CD39390E237F09AF /* _RXObjCRuntime.m in Sources */ = {isa = PBXBuildFile; fileRef = B4336587650CA1BE7C1383CE27D78FDD /* _RXObjCRuntime.m */; }; + D0E2A76382F9935453CE7CE5795E7081 /* KVORepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F2476DEBAA382E2E914042A1D89F671 /* KVORepresentable.swift */; }; + D25FE11BF178099EF6A939CD9FE9373C /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BD51A634092E983F8E7DE121A9496E9 /* SerialDisposable.swift */; }; + D323704835C00DDB02746CDC30D44D5F /* UIStepper+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 862434FB6CF031CD1771E4628418BA20 /* UIStepper+Rx.swift */; }; + D338C398B18E14B28FCBAF139D50B677 /* ControlEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D654389F1798482CED41BDA1ADF01402 /* ControlEvent.swift */; }; + D3697BBE86203B702168E06F1C7CAD58 /* UITextView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = C184188A26EA5CB2CF09E94C621ED10A /* UITextView+Rx.swift */; }; + D52F5210CE451A5C6CE5CBA2D97D83BA /* Observable+Concurrency.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6E39A688B5EA2D9711749166DE954B2 /* Observable+Concurrency.swift */; }; + D565C7D307D63EC43E503C0DEF5C14D2 /* Pods-RxTableViewDemo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F2AFA1C99F51E8831E2A910DDF5E7A3A /* Pods-RxTableViewDemo-dummy.m */; }; + D56F3D9A489EF755BF7D6319B8735E10 /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5408250A6EB0BEC07FA9A5A43BDA62A6 /* SynchronizedDisposeType.swift */; }; + D57681CEB0F68FF7930BDE710141D108 /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F0545435CD3C2A53F56B1D8393D728E /* Amb.swift */; }; + D613ECEA1BEE3AE60A911525CBBFDB91 /* Observable+Binding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FB6A05C08676ECAF208C0E888D163A2 /* Observable+Binding.swift */; }; + D6512BDCF94AD93925D9B18B39ACB4DE /* NSObject+Rx+RawRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5BC3A7288E41845D582B2084649532A /* NSObject+Rx+RawRepresentable.swift */; }; + D6DD187037435BD53E11DC16A097E95E /* UISearchBar+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A77476BE569C811D03B26630F89E8C0 /* UISearchBar+Rx.swift */; }; + D78170F8FDCA9A93504103DA7C55EE5A /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA782D0DF31E10E208B914F67B7A277F /* Optional.swift */; }; + D8F1031375926D703231F4901AECE4CD /* AnimatableSectionModelType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A4FB40C6AF984668836B9A72545E3F7 /* AnimatableSectionModelType.swift */; }; + DA3CF61D78EBCD667E3A1EAF1B947EBE /* AnimationConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 210DE31176244C428519FCFE436AA1B8 /* AnimationConfiguration.swift */; }; + DA8D0DF948018CAAF45274BEFE1499EE /* ShareReplay1WhileConnected.swift in Sources */ = {isa = PBXBuildFile; fileRef = 820C50078774408B612769C4E4EF4678 /* ShareReplay1WhileConnected.swift */; }; + DBBCAD10DF6B3BFC978B9563203E19BC /* UIImageView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4C8C9BDEE366BCBC316FFC3334C2833 /* UIImageView+Rx.swift */; }; + DD53600F24BBA8C3CA15E4FA08448851 /* Optional+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6759EC5C53A1278D009D5D308135BC8B /* Optional+Extensions.swift */; }; + DDEA1A471E3B824E8FF22C898D9611BF /* RxTableViewDataSourceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0051A66B8413069430CDAC2130A8305 /* RxTableViewDataSourceType.swift */; }; + DEEC05FE899AEEF1BEDFFDDD9BBE1278 /* SharedSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78BDDEDD1A47A3FAEBEB0220797BE299 /* SharedSequence.swift */; }; + E061DA3F0382C6891953365C2A385758 /* Debunce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D994AA39CBDC3F270ED98EC0473D73E /* Debunce.swift */; }; + E180629EFE5A172F45EEC7A4D1D98765 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BEBE0A95FD3996906F40DC3BAFD0501 /* Platform.Linux.swift */; }; + E2EFAA33B224F51FE879996FDA494C2A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01D9C2D9C585135E52772795B81818D1 /* Foundation.framework */; }; + E328DCA0657A8FD6DEF6097660DD549E /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90991732D0FE5C4A62BABB930191D474 /* DisposeBag.swift */; }; + E380E33928B9EDB3CDA6AC8175B64F21 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0267D21A277D9BCFAFBD0373A5C4C27 /* Bag.swift */; }; + E5D99DB0F663997389EB9F7D8F1BEF66 /* UIBindingObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B380E0576862E2CBCF039C17ABC697EB /* UIBindingObserver.swift */; }; + E60913F6A49D9E6085E857A93B14AA63 /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B5DE634E75FA6D457829430BC81E655 /* SynchronizedOnType.swift */; }; + E7DB4C9C927AF29A94041F50B724B44C /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6155299EDA67841B6C93E87FBA7B9D98 /* MainScheduler.swift */; }; + EB6A15FA131F6E7BEAF4F697AB134441 /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736B78D8E1D065433E242C88D1B819F5 /* VirtualTimeScheduler.swift */; }; + ED27D81FE0B22D494BBF527D8E8576A1 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FE327A1DD4D599C36D7DE80D99C8223 /* Catch.swift */; }; + EDC0DEC9AE29A870D8F865693D9008FF /* ObservableConvertibleType+Driver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E5AB4F7B3F45A791743F678F4075274 /* ObservableConvertibleType+Driver.swift */; }; + EDD607B09F54A84FFED968CF0C2DAE5B /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7629BA368F1573401A5D839A73051E4 /* Map.swift */; }; + EE3BEB35CBD869D5966060FF12AC8930 /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA72CF1FC793F094D4DC585D5BFED77 /* SerialDispatchQueueScheduler.swift */; }; + EE7E244EAB0FA2D9DB3B536229E25312 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75A421CFB92FFE874F5B36575A783A22 /* RxSwift.framework */; }; + F01EE20B974C1F6AD2AF6360E3A2FDD6 /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59F3AE0069577C62D548CDB17D6C1A47 /* WithLatestFrom.swift */; }; + F0BB6FD08AC24F8F33FF6789BD42A8C8 /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E2BE220D80F23B167D1A66107E6169B /* AnonymousObserver.swift */; }; + F0EA3343EF0C3A50B5BE98543938591C /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11D7A0E4E9ACF5AC99DFFDE69C51A585 /* Timeout.swift */; }; + F1712D8A547B3516848674E86DC10B6B /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F40826E669763178BFF7D91C4B6B193D /* BooleanDisposable.swift */; }; + F222B94F70306B2B179351A287BBC200 /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94855BF33184CE8D6AED90AFECF18721 /* DelaySubscription.swift */; }; + F2ABE7069E30C94B271627EA74939D1B /* _RX.m in Sources */ = {isa = PBXBuildFile; fileRef = A59C14BF6BE255CA7CDE190D2B5C118A /* _RX.m */; }; + F2C6C849CCF1E1CCE81D37E8ADB55D59 /* RxCollectionViewSectionedAnimatedDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = F154381A27E497DC49CBD3B7166739E3 /* RxCollectionViewSectionedAnimatedDataSource.swift */; }; + F2E26DD4450D533CE1F6CDB0B4C85FC5 /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D152A471C350F907242B93C07D985920 /* CombineLatest.swift */; }; + F331A66C1922A953BD6A29486203E4A7 /* NSObject+Rx+KVORepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 365401E220E33E4556A50402E209ABCC /* NSObject+Rx+KVORepresentable.swift */; }; + F33E9C504C68B67FF0902E6B8896EAB4 /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 183F1D4AFB5A34EA924635B16C80F7ED /* SchedulerServices+Emulation.swift */; }; + F4F65346DB2641057F1D95C6EF85EF01 /* DelegateProxyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA6A9DE3DFA270724D36E0D3630B805E /* DelegateProxyType.swift */; }; + F6FCA56AABBDBD43ED95EDFDA2F5B0A1 /* RefCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A6F855B744AE06E7859E4139BC30513 /* RefCount.swift */; }; + F7879F55E2E3FA9ED491BDDCF1564D0A /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3225DF98FAF6190B4506A077DAAE904A /* RxSwift-dummy.m */; }; + F7B252048FA1C80838E18BFD46897ACB /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AE2CB072F74B4206AFA09CCC63A1B1 /* Window.swift */; }; + FA89D1B03BB5D1E1A09262ACCDFF2F41 /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A52094D8B54994F95E7D988F12A5DCF1 /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FB9BCA373CDBDB53EA1D0B659630A3A6 /* UIAlertAction+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = F064B380DADC7AD8C2443C53378E8D7C /* UIAlertAction+Rx.swift */; }; + FCFB905CE99BA25A72A31C53236E6B61 /* UI+SectionedViewType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1634D43A0871B5A57B860D01F60F0FE /* UI+SectionedViewType.swift */; }; + FD976E68F48D05A35B7BB58BA36A3BE9 /* UICollectionView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D17586255C27E7C56F479CC84F792C /* UICollectionView+Rx.swift */; }; + FDE005611E1E3730F33FE4EAA201285A /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD4BB38BBC43CC6CBE9A5E5B74BFB32E /* AsyncLock.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 039D38894DDF8211F00995FC5B0FD343 /* PBXContainerItemProxy */ = { + 33054E37AA7288043D4A334FF4B58497 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F4DD11F54BDEA61E7187E0C1CCC41577; - remoteInfo = RxSwift; + remoteGlobalIDString = E958CE527B5002EAE5DE63C4FE245059; + remoteInfo = RxCocoa; }; - 2FABEC2E8633D5D276BBA62F64C27DCD /* PBXContainerItemProxy */ = { + 64447168BF8B426550C40F31C559A3C0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 79867C45BAED3780AC32E6872F0EDC78; - remoteInfo = RxCocoa; + remoteGlobalIDString = 552436FA59024504867FCC4EFC55369C; + remoteInfo = RxSwift; }; - 3E159DD13D4D825698A612538ECA3E7F /* PBXContainerItemProxy */ = { + 94C736822F585734FB9E1C420306D906 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F4DD11F54BDEA61E7187E0C1CCC41577; + remoteGlobalIDString = 552436FA59024504867FCC4EFC55369C; remoteInfo = RxSwift; }; - 51CABC8066BA20C611FDF987AF72243D /* PBXContainerItemProxy */ = { + A2EF51A2D627C8F3D097716255C2BA3A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = D057EC329F500215553CD883023B9D4F; + remoteGlobalIDString = 13B0540A2A791159DBC198D8FA540AF5; remoteInfo = RxDataSources; }; - 85FA3FF0ED3C4F740CB80C74CC5F9DFE /* PBXContainerItemProxy */ = { + B5256C61250E1AE2BC4A4FDEB1B7B1B6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 79867C45BAED3780AC32E6872F0EDC78; - remoteInfo = RxCocoa; + remoteGlobalIDString = 552436FA59024504867FCC4EFC55369C; + remoteInfo = RxSwift; }; - A074049731B0800B1557EE80118FE43C /* PBXContainerItemProxy */ = { + EA200A0726AB36EB3B21633D5C3A34B0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F4DD11F54BDEA61E7187E0C1CCC41577; - remoteInfo = RxSwift; + remoteGlobalIDString = E958CE527B5002EAE5DE63C4FE245059; + remoteInfo = RxCocoa; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0037E94E6A80FC3A7DFB1A61DFB1B337 /* Observable+Aggregate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Aggregate.swift"; path = "RxSwift/Observables/Observable+Aggregate.swift"; sourceTree = ""; }; - 005BF06B373C56888847BBA883C81899 /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Implementations/Merge.swift; sourceTree = ""; }; - 02A1DD9FA1C819A439BE6A81736E3949 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; - 03739089D04D7EC6A7E10167130E076C /* NSURLSession+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Rx.swift"; path = "RxCocoa/Common/Observables/NSURLSession+Rx.swift"; sourceTree = ""; }; - 0411A964DB7A0BFC02EDD0DEAEC3EC01 /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Implementations/Timer.swift; sourceTree = ""; }; - 041EC25768988058038140847684499C /* KVOObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KVOObservable.swift; path = RxCocoa/Common/Observables/Implementations/KVOObservable.swift; sourceTree = ""; }; - 0582EE76327F57C431C0B27E47265803 /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; - 05F4E541AC000E543D8FA5837D3E79D5 /* UIDatePicker+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIDatePicker+Rx.swift"; path = "RxCocoa/iOS/UIDatePicker+Rx.swift"; sourceTree = ""; }; - 0680DCC217EF3E5B83A63A377FC6BEC5 /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Implementations/Catch.swift; sourceTree = ""; }; - 0681630EDBD0AB8A6CC481C4EF003114 /* Observable+Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Single.swift"; path = "RxSwift/Observables/Observable+Single.swift"; sourceTree = ""; }; - 06F77AC0EE43068F7421A0404E61E71F /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Implementations/Skip.swift; sourceTree = ""; }; - 08FD137986322B00234DE85B29CA20D9 /* RxCollectionViewReactiveArrayDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewReactiveArrayDataSource.swift; path = RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift; sourceTree = ""; }; - 09901DEB3F47DF71E41021FABF7ACB54 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; - 0996C5683D08C9055B962CC413DFA602 /* RxTableViewSectionedAnimatedDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewSectionedAnimatedDataSource.swift; path = "Sources/DataSources+Rx/RxTableViewSectionedAnimatedDataSource.swift"; sourceTree = ""; }; - 0AD04472D0C62247385153DC2EDB6DA9 /* NSObject+Rx+KVORepresentable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Rx+KVORepresentable.swift"; path = "RxCocoa/Common/Observables/NSObject+Rx+KVORepresentable.swift"; sourceTree = ""; }; - 0BC0A51E37010BD270FA3FBBAED79AC9 /* DelegateProxyType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelegateProxyType.swift; path = RxCocoa/Common/DelegateProxyType.swift; sourceTree = ""; }; - 0D810981FFE2D0972C135671069A3506 /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; - 0ED138F98853F93C4CBA5C4D5E4E4673 /* _RXKVOObserver.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _RXKVOObserver.m; path = RxCocoa/Common/_RXKVOObserver.m; sourceTree = ""; }; - 0FBD02AE35F01E2D42901B3B420A162F /* AnonymousObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObservable.swift; path = RxSwift/Observables/Implementations/AnonymousObservable.swift; sourceTree = ""; }; - 1048968DA3DA7263A5B7280CBEF86576 /* RxCollectionViewSectionedAnimatedDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewSectionedAnimatedDataSource.swift; path = "Sources/DataSources+Rx/RxCollectionViewSectionedAnimatedDataSource.swift"; sourceTree = ""; }; - 1057BD977AAFAB283DE334152CC10DE4 /* Driver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Driver.swift; path = RxCocoa/Common/CocoaUnits/Driver/Driver.swift; sourceTree = ""; }; - 127ED21A1397087977CA062A680CB8B4 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Implementations/Zip+arity.swift"; sourceTree = ""; }; - 16311EFFE1D8FB910A8909C201B77863 /* RxDataSources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxDataSources.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1807EEC2EE195F432D66A3E773B2EBAE /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Implementations/Range.swift; sourceTree = ""; }; - 181357241FEB2F5FAFC9E9DACAA53EA7 /* ControlEvent+Driver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ControlEvent+Driver.swift"; path = "RxCocoa/Common/CocoaUnits/Driver/ControlEvent+Driver.swift"; sourceTree = ""; }; - 184B4D586FE1EA0C0374ABE025577283 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Implementations/Switch.swift; sourceTree = ""; }; + 00D74670F352B6A2CB4241A11DBAE8B2 /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/Implementations/AddRef.swift; sourceTree = ""; }; + 013FBA8A5113AAF4783874719F359C6D /* Observable+StandardSequenceOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+StandardSequenceOperators.swift"; path = "RxSwift/Observables/Observable+StandardSequenceOperators.swift"; sourceTree = ""; }; + 01D9C2D9C585135E52772795B81818D1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 03452D24880A96E98449D89748B08B1A /* ObserveOnSerialDispatchQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOnSerialDispatchQueue.swift; path = RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift; sourceTree = ""; }; + 03B06FD86B4E625B3BDF15946849B290 /* RxCollectionViewReactiveArrayDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewReactiveArrayDataSource.swift; path = RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift; sourceTree = ""; }; + 04CC7E2DC52F26D1F514677B6A7CF665 /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; + 051378B8AFFF58F217C73BE5B488A1AE /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; + 0514789A279CC2BB38F50920421D5499 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; + 05197BE4DF3E8C32CFC8B30BD20C9304 /* UISegmentedControl+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISegmentedControl+Rx.swift"; path = "RxCocoa/iOS/UISegmentedControl+Rx.swift"; sourceTree = ""; }; + 0617ADF6FDE630DAB116773C8F0B123D /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = RxSwift.modulemap; sourceTree = ""; }; + 09FAF9E2225308DFFF2B9332B6024009 /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; + 0AB233A0E4C3CC531D351E5B11EE50AC /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; + 0AB4ED031A3078660AC89780D6892A22 /* _RXKVOObserver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _RXKVOObserver.h; path = RxCocoa/Runtime/include/_RXKVOObserver.h; sourceTree = ""; }; + 0ACCC67C4B931519FDF6F0816C36733F /* RxTableViewSectionedAnimatedDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewSectionedAnimatedDataSource.swift; path = "Sources/DataSources+Rx/RxTableViewSectionedAnimatedDataSource.swift"; sourceTree = ""; }; + 0BC70151EB564F794525C7A70F7BF0C4 /* AnimatableSectionModelType+ItemPath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AnimatableSectionModelType+ItemPath.swift"; path = "Sources/DataSources/AnimatableSectionModelType+ItemPath.swift"; sourceTree = ""; }; + 0BD2D92E919693886670B9B4EBEC8F6D /* ItemPath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ItemPath.swift; path = Sources/DataSources/ItemPath.swift; sourceTree = ""; }; + 0C661E1633FD2A389545DF68756A930A /* RxCocoa-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxCocoa-dummy.m"; sourceTree = ""; }; + 0D02D7EB5F4C4393A7F4DA6C09ED4315 /* RxCollectionViewSectionedReloadDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewSectionedReloadDataSource.swift; path = "Sources/DataSources+Rx/RxCollectionViewSectionedReloadDataSource.swift"; sourceTree = ""; }; + 0D994AA39CBDC3F270ED98EC0473D73E /* Debunce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debunce.swift; path = RxSwift/Observables/Implementations/Debunce.swift; sourceTree = ""; }; + 0DB09772F77198F67371FAF0E024B4CD /* _RXObjCRuntime.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _RXObjCRuntime.h; path = RxCocoa/Runtime/include/_RXObjCRuntime.h; sourceTree = ""; }; + 0EA5CB8391A8D19DD4A88FF8035380EA /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; + 0F3443DD1A1DD5FAEEFBB9B6B74727AA /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Implementations/Range.swift; sourceTree = ""; }; + 0F910801F5540E10170E5776FFAB3A20 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; + 10633C42E25FD1F7F1C7EF52C46BD76E /* UIButton+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIButton+Rx.swift"; path = "RxCocoa/iOS/UIButton+Rx.swift"; sourceTree = ""; }; + 10F7C2E0701280D569FB3712A8776205 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; + 11D7A0E4E9ACF5AC99DFFDE69C51A585 /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Implementations/Timeout.swift; sourceTree = ""; }; + 127703607F1828A678FC26281986B1CE /* RxCollectionViewDataSourceProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewDataSourceProxy.swift; path = RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift; sourceTree = ""; }; + 12DF80D8438E62F520A580A722B3EEC3 /* RxPickerViewDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxPickerViewDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxPickerViewDelegateProxy.swift; sourceTree = ""; }; + 1307A0286B0234D1232190B72D10E2F8 /* UIControl+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIControl+Rx.swift"; path = "RxCocoa/iOS/UIControl+Rx.swift"; sourceTree = ""; }; + 13B00433C133AF960134BFAF587EC839 /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; + 16208F035A97D8DAA5B39E645C1C4F10 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; + 16311EFFE1D8FB910A8909C201B77863 /* RxDataSources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxDataSources.framework; path = RxDataSources.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 17043A6D116B83A4A676764185F788AC /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/Implementations/SkipWhile.swift; sourceTree = ""; }; + 172A5863E3187787382DCC9E848399B0 /* ShareReplay1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1.swift; path = RxSwift/Observables/Implementations/ShareReplay1.swift; sourceTree = ""; }; + 183F1D4AFB5A34EA924635B16C80F7ED /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; + 1845E70698AD1C4873D0FC2DAE56211B /* UIWebView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIWebView+Rx.swift"; path = "RxCocoa/iOS/UIWebView+Rx.swift"; sourceTree = ""; }; + 189E20B84B8A214335F806CEA7A0D83F /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Implementations/Empty.swift; sourceTree = ""; }; + 19596F590330DF7D3A07E08F5F2B5C74 /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; + 19AD52A69E88FFC1F95266147C75FF09 /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/Implementations/ObserveOn.swift; sourceTree = ""; }; + 19E4179A74FD91A109CC77170AC1C07D /* RxCollectionViewDataSourceType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewDataSourceType.swift; path = RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift; sourceTree = ""; }; 1A0B13022583CF8CBD9252024C16564B /* Pods-RxTableViewDemo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxTableViewDemo-acknowledgements.plist"; sourceTree = ""; }; - 1EE92C8296FEA0714F3B1602F002C801 /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; - 1FAE6093B5F14D84E8003503C324FF39 /* Observable+Binding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Binding.swift"; path = "RxSwift/Observables/Observable+Binding.swift"; sourceTree = ""; }; - 2047E1C7B0EC35B2140C021B90EEEF5F /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; - 20B63C1DC3468AF6F169750FCF27F07A /* ObservableConvertibleType+Driver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableConvertibleType+Driver.swift"; path = "RxCocoa/Common/CocoaUnits/Driver/ObservableConvertibleType+Driver.swift"; sourceTree = ""; }; - 23CF7C5C711893306B0EC8F3D96A5BD9 /* RxDataSources-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxDataSources-prefix.pch"; sourceTree = ""; }; - 243972BCF048DD5F70457821234EB924 /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; - 253F3074EC6229806D793EE5BC790DD7 /* RxCocoa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCocoa.swift; path = RxCocoa/Common/RxCocoa.swift; sourceTree = ""; }; - 25C2CB8BD4E25AA71E23ED9C0597FDC5 /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; - 2789FC08E46B2063B0141B4E24055DCE /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Implementations/Throttle.swift; sourceTree = ""; }; - 27C82BCBE5E555223D21BA6B4D87F5FB /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; - 293CB66CE3A8E4453A272DF9BDCDA74D /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; - 294A013F1543C0F3766547B48E88A768 /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; - 2AEA4F796D471264937E622EEE39CDB0 /* IdentifiableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IdentifiableType.swift; path = Sources/DataSources/IdentifiableType.swift; sourceTree = ""; }; - 2B276DD384C2E03FB190F5A87AC073EB /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Implementations/Debug.swift; sourceTree = ""; }; - 2B439314567AD34DE20A724F30E5C01E /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Implementations/Multicast.swift; sourceTree = ""; }; - 2D59B1888F122DCBE9CB026DCA3B58E8 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; - 2D7D41E1572A48C669C88A5D32CCB483 /* DataSources.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DataSources.swift; path = Sources/DataSources/DataSources.swift; sourceTree = ""; }; - 2EDA82B7D4B853FDF29D03F2F794C77A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 2F7BC778C0B7CF2F20C295ED07B5C2C0 /* Driver+Operators+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Driver+Operators+arity.swift"; path = "RxCocoa/Common/CocoaUnits/Driver/Driver+Operators+arity.swift"; sourceTree = ""; }; - 2FBA4ADCAEF01CC0012988900231AF1D /* Pods_RxTableViewDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RxTableViewDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3037F1D4AF2721851F9E43056218F7ED /* RxTableViewDataSourceProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewDataSourceProxy.swift; path = RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift; sourceTree = ""; }; - 31658B3F03A2CD58D3B54F8725912C69 /* Observable+Creation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Creation.swift"; path = "RxSwift/Observables/Observable+Creation.swift"; sourceTree = ""; }; + 1BD51A634092E983F8E7DE121A9496E9 /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; + 1BF2E282BE6C0DC7868071229F6744E4 /* RxDataSources-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxDataSources-prefix.pch"; sourceTree = ""; }; + 1D7CDFCB6B25D9EDBD84E3DD2BEFD817 /* AnonymousInvocable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousInvocable.swift; path = RxSwift/Schedulers/Internal/AnonymousInvocable.swift; sourceTree = ""; }; + 1E2F2CCA79D89A37403B1D5F0301A76B /* RxWebViewDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxWebViewDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxWebViewDelegateProxy.swift; sourceTree = ""; }; + 1EABB406476742E787C28F02080FB25B /* DelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelegateProxy.swift; path = RxCocoa/Common/DelegateProxy.swift; sourceTree = ""; }; + 1F45BF3B35C2D03FE86935B38C12F3CD /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Implementations/Repeat.swift; sourceTree = ""; }; + 210DE31176244C428519FCFE436AA1B8 /* AnimationConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationConfiguration.swift; path = Sources/DataSources/AnimationConfiguration.swift; sourceTree = ""; }; + 221E107E86C50FB6E44F30B981110B24 /* IdentifiableValue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IdentifiableValue.swift; path = Sources/DataSources/IdentifiableValue.swift; sourceTree = ""; }; + 23999F5B8E8DE251A3398353C7B0D17E /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; + 24061A57EA0C9D585615887AA5475671 /* RxCocoaObjCRuntimeError+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "RxCocoaObjCRuntimeError+Extensions.swift"; path = "RxCocoa/Common/RxCocoaObjCRuntimeError+Extensions.swift"; sourceTree = ""; }; + 24C447B0686A8743C6BE6822CC1BC469 /* NSTextStorage+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSTextStorage+Rx.swift"; path = "RxCocoa/iOS/NSTextStorage+Rx.swift"; sourceTree = ""; }; + 2510927F7010746B9E8CC5406B9739AE /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Implementations/Do.swift; sourceTree = ""; }; + 291CFB4C3259A633A84A313993208033 /* RxDataSources-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxDataSources-dummy.m"; sourceTree = ""; }; + 2A4FB40C6AF984668836B9A72545E3F7 /* AnimatableSectionModelType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatableSectionModelType.swift; path = Sources/DataSources/AnimatableSectionModelType.swift; sourceTree = ""; }; + 2B1946348174826F2E14A6A1DD8DF2F5 /* _RXDelegateProxy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _RXDelegateProxy.h; path = RxCocoa/Runtime/include/_RXDelegateProxy.h; sourceTree = ""; }; + 2DD4582A12EF95BDF70518B0344EC0BE /* URLSession+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLSession+Rx.swift"; path = "RxCocoa/Foundation/URLSession+Rx.swift"; sourceTree = ""; }; + 2ECC6673140C7D1193479B46A85F91B3 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; + 2F390118714681385CA5229413841772 /* ImmediateScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateScheduler.swift; path = RxSwift/Schedulers/ImmediateScheduler.swift; sourceTree = ""; }; + 2FBA4ADCAEF01CC0012988900231AF1D /* Pods_RxTableViewDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_RxTableViewDemo.framework; path = "Pods-RxTableViewDemo.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3024C065E240FAA704FCBD8A54DC715F /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Implementations/Reduce.swift; sourceTree = ""; }; 31D223E62A5637974A17E2D3870A3D10 /* Pods-RxTableViewDemo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RxTableViewDemo-resources.sh"; sourceTree = ""; }; 321A1AB72255D084EE352876F54E8785 /* RxCocoa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxCocoa.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3285EBE3EA50F283EDDB0447240FBC6D /* TableViewSectionedDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TableViewSectionedDataSource.swift; path = Sources/DataSources/TableViewSectionedDataSource.swift; sourceTree = ""; }; - 32EE3DC65104719851158ECB7F9B2D91 /* RxTextStorageDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTextStorageDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift; sourceTree = ""; }; - 334C0CB4E9C795C172F30CFE3ACC067A /* MessageSentObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MessageSentObserver.swift; path = RxCocoa/Common/Observables/Implementations/MessageSentObserver.swift; sourceTree = ""; }; - 3432D2B36218CBB59EA988271295A0FE /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Implementations/Just.swift; sourceTree = ""; }; - 392B5175213C1FFF6337996AC9991EB7 /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; - 394DEA29C33545B33E41CCB9E3E23095 /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; - 3A25A17CDEA8DD2CACC6D71504578783 /* RxDataSources-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxDataSources-umbrella.h"; sourceTree = ""; }; - 3B0F4073F5F04C70C2EC71C6A303EDB1 /* AnimatableSectionModelType+ItemPath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AnimatableSectionModelType+ItemPath.swift"; path = "Sources/DataSources/AnimatableSectionModelType+ItemPath.swift"; sourceTree = ""; }; - 3BC450A25A4BA1426C472806FFB12CB8 /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; - 3CA5E77C275DFB70B28C8DCF4BAA9540 /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; - 3E20EB5FFD6EE7A42F616691F9601065 /* RxCollectionViewDataSourceType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewDataSourceType.swift; path = RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift; sourceTree = ""; }; - 3EFE87973CB523C0769AA1C09A9546D2 /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/Implementations/CombineLatest.swift; sourceTree = ""; }; - 3F544C5FCAFD9627D960A2E6354C5D84 /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; - 3F9FB8D541DC91CF19C6B0233D71EFF2 /* Changeset.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Changeset.swift; path = Sources/DataSources/Changeset.swift; sourceTree = ""; }; - 3FF53FDAB2CF0CE6DC7E119F20DB7FA7 /* UITextField+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITextField+Rx.swift"; path = "RxCocoa/iOS/UITextField+Rx.swift"; sourceTree = ""; }; - 40FDA44E1A674BE132F0BCA82279A9D3 /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; - 413A521227912A7856BBCF53D2CA3C35 /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; - 43BAB60D0A7B49E70FA33A3052993C6D /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; - 43FD4B94002863A63FCE0A36B577080F /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Implementations/Never.swift; sourceTree = ""; }; - 44684986AE704B6231DD21184EB433B9 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Implementations/Error.swift; sourceTree = ""; }; - 446EB30B1E367F1197A2BA1655A7DF5B /* RxImagePickerDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxImagePickerDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxImagePickerDelegateProxy.swift; sourceTree = ""; }; - 44D604BE5C03392A356BBBB83B415FD1 /* AnimatableSectionModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatableSectionModel.swift; path = Sources/DataSources/AnimatableSectionModel.swift; sourceTree = ""; }; - 45C93EC8BC218095EEF97EBA3F909222 /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Implementations/Sample.swift; sourceTree = ""; }; - 45E4E56B19CB2CF8D08539C369B1BBE4 /* ControlTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ControlTarget.swift; path = RxCocoa/Common/Observables/Implementations/ControlTarget.swift; sourceTree = ""; }; - 468A52D5F2EB415DE203DFF7402F3F25 /* Optional+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Optional+Extensions.swift"; path = "Sources/DataSources/Optional+Extensions.swift"; sourceTree = ""; }; - 46E7A719D313A9EBCA713AEE2E2C1C51 /* RxCollectionViewDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift; sourceTree = ""; }; - 479F065BFA55D3FB755A21D027D0D77A /* UICollectionView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UICollectionView+Rx.swift"; path = "RxCocoa/iOS/UICollectionView+Rx.swift"; sourceTree = ""; }; - 488BF24EBDB4184D655691A9F0846484 /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Implementations/Take.swift; sourceTree = ""; }; - 499B07095919C853FD3E90F8D0EA9DE4 /* ShareReplay1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1.swift; path = RxSwift/Observables/Implementations/ShareReplay1.swift; sourceTree = ""; }; - 49C5192AD95FB6638E5369DEA4298E9C /* _RXObjCRuntime.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _RXObjCRuntime.h; path = RxCocoa/Common/_RXObjCRuntime.h; sourceTree = ""; }; - 4A37D2BA21FA863FBC3AAA3A8DDEE2A4 /* UIBindingObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UIBindingObserver.swift; path = RxCocoa/Common/CocoaUnits/UIBindingObserver.swift; sourceTree = ""; }; - 4BF3F28F854FF205AB52C03D0A2D3BCC /* RxScrollViewDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxScrollViewDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift; sourceTree = ""; }; - 4C29FCB424A53A2675DD78E1C1106FA6 /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/Implementations/AddRef.swift; sourceTree = ""; }; - 4DB4C9F8D83202C536F3BBDFE9BABC96 /* CollectionViewSectionedDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CollectionViewSectionedDataSource.swift; path = Sources/DataSources/CollectionViewSectionedDataSource.swift; sourceTree = ""; }; - 4EF4A589D4D868E5449082BA9FA93908 /* Differentiator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Differentiator.swift; path = Sources/DataSources/Differentiator.swift; sourceTree = ""; }; - 50301CEDC1836A2DA7BCB260D2FA97BB /* RxCocoa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxCocoa.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 54B7B10403A4A77F3392370D026F27BD /* ShareReplay1WhileConnected.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1WhileConnected.swift; path = RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift; sourceTree = ""; }; - 55B5E0F8A42B63810EECF9A4BD87D45A /* RxCocoa-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxCocoa-prefix.pch"; sourceTree = ""; }; - 56E7DE8BFB2C87AE31D79260AC46060D /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 589E6C4267B5CB27E3B4F543955B262B /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Implementations/Amb.swift; sourceTree = ""; }; - 593FE1AEE6B3775E79D541DD35A0DD94 /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; - 5A35A1136D0E5D7DA45729824690ABC2 /* RxDataSources.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = RxDataSources.modulemap; sourceTree = ""; }; - 5A6BAB0858F38F20CCA7C965005D2C73 /* UITableView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITableView+Rx.swift"; path = "RxCocoa/iOS/UITableView+Rx.swift"; sourceTree = ""; }; - 5A790E621CBEA7E8400BB9E01A92D81D /* RxCollectionViewDataSourceProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewDataSourceProxy.swift; path = RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift; sourceTree = ""; }; - 5AAE98466991CACE40D7AB63B71982B8 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = RxSwift/Platform/Platform.Darwin.swift; sourceTree = ""; }; - 5AB733502A3EC806A18171E8F29D873A /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; - 5C009E7674A00A4A0F1A66122FA348D0 /* KVOObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KVOObserver.swift; path = RxCocoa/Common/Observables/Implementations/KVOObserver.swift; sourceTree = ""; }; - 5C36FD926025E3C1D23098864EEBD5F2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3225DF98FAF6190B4506A077DAAE904A /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; + 32DF670CEE7A47B53258D6A78B53508F /* Array+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Array+Extensions.swift"; path = "Sources/DataSources/Array+Extensions.swift"; sourceTree = ""; }; + 32F757633B0F07C4957B8C3231604669 /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Implementations/Delay.swift; sourceTree = ""; }; + 3330D0BF0343C874E61299E5AE33869B /* RxDataSources-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxDataSources-umbrella.h"; sourceTree = ""; }; + 339F2C69A27359156735F6EB36951899 /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/Implementations/SubscribeOn.swift; sourceTree = ""; }; + 3530C7475412D4E9E9AA6FFF82ADE45A /* UILabel+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILabel+Rx.swift"; path = "RxCocoa/iOS/UILabel+Rx.swift"; sourceTree = ""; }; + 365401E220E33E4556A50402E209ABCC /* NSObject+Rx+KVORepresentable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Rx+KVORepresentable.swift"; path = "RxCocoa/Foundation/NSObject+Rx+KVORepresentable.swift"; sourceTree = ""; }; + 37718662FF25DAC4AEECBD18EE785CFA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 377B58AE725891176FDFA20ADE58BB37 /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Implementations/Merge.swift; sourceTree = ""; }; + 37AE2CB072F74B4206AFA09CCC63A1B1 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Implementations/Window.swift; sourceTree = ""; }; + 38155259B88266E27F21AB107279C602 /* FloatingPointType+IdentifiableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "FloatingPointType+IdentifiableType.swift"; path = "Sources/DataSources/FloatingPointType+IdentifiableType.swift"; sourceTree = ""; }; + 3A491E0C9A736CDD8C4E8B6CFD2BFC20 /* RxCocoaRuntime.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RxCocoaRuntime.h; path = RxCocoa/Runtime/include/RxCocoaRuntime.h; sourceTree = ""; }; + 3A6F855B744AE06E7859E4139BC30513 /* RefCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCount.swift; path = RxSwift/Observables/Implementations/RefCount.swift; sourceTree = ""; }; + 3A77476BE569C811D03B26630F89E8C0 /* UISearchBar+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISearchBar+Rx.swift"; path = "RxCocoa/iOS/UISearchBar+Rx.swift"; sourceTree = ""; }; + 3BB83A405F56A8C0BFA54FCC352D09BC /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; + 3C5BEC4447AEEC1DBBD28570BD35EC65 /* RxTextViewDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTextViewDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxTextViewDelegateProxy.swift; sourceTree = ""; }; + 3D762629889D889F112E7D816858549E /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; + 3DF40BE60D9A9AD76037CE2D55FE5D0B /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Implementations/Scan.swift; sourceTree = ""; }; + 3DF567303460AFC3F6889F792F6249F6 /* Observable+Time.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Time.swift"; path = "RxSwift/Observables/Observable+Time.swift"; sourceTree = ""; }; + 3FB6A05C08676ECAF208C0E888D163A2 /* Observable+Binding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Binding.swift"; path = "RxSwift/Observables/Observable+Binding.swift"; sourceTree = ""; }; + 4006BEDD4DAA52848CF3B216376E9CAC /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; + 40641DD8AC285294383CED3CAB0C215A /* NSLayoutConstraint+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSLayoutConstraint+Rx.swift"; path = "RxCocoa/Common/NSLayoutConstraint+Rx.swift"; sourceTree = ""; }; + 427E84BBFD90EDEF90109A18DD34804E /* TableViewSectionedDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TableViewSectionedDataSource.swift; path = Sources/DataSources/TableViewSectionedDataSource.swift; sourceTree = ""; }; + 4378606ACBC0E0F9B45918A454192827 /* UIPickerView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIPickerView+Rx.swift"; path = "RxCocoa/iOS/UIPickerView+Rx.swift"; sourceTree = ""; }; + 43AAB0393652252135400A32CAD4EFAA /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; + 4A724BF8AF9AA6448CDF906A2DD85467 /* RxSearchBarDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxSearchBarDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift; sourceTree = ""; }; + 4B72C441E4F2A3D0313CEA984E9E7E23 /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; + 4B9EDF092ADE13227D6481C788DCF1AC /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; + 4D15B3C86D48DC76CA660652C6407860 /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; + 4D5B73DC7EBEB64055E983754AB36F05 /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+arity.swift"; sourceTree = ""; }; + 4D9ACA2F2E0F34F4D2AE9FD326D9430A /* SectionedViewDataSourceType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SectionedViewDataSourceType.swift; path = RxCocoa/Common/SectionedViewDataSourceType.swift; sourceTree = ""; }; + 4E5AB4F7B3F45A791743F678F4075274 /* ObservableConvertibleType+Driver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableConvertibleType+Driver.swift"; path = "RxCocoa/CocoaUnits/Driver/ObservableConvertibleType+Driver.swift"; sourceTree = ""; }; + 4E82F975CF41C0107B973778D2918320 /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Implementations/Skip.swift; sourceTree = ""; }; + 4F2476DEBAA382E2E914042A1D89F671 /* KVORepresentable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KVORepresentable.swift; path = RxCocoa/Foundation/KVORepresentable.swift; sourceTree = ""; }; + 50301CEDC1836A2DA7BCB260D2FA97BB /* RxCocoa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxCocoa.framework; path = RxCocoa.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 50D29CA3427E3B8D414F0C1FDE2BEFDD /* UITabBarController+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITabBarController+Rx.swift"; path = "RxCocoa/iOS/UITabBarController+Rx.swift"; sourceTree = ""; }; + 5147159BE6C37D791066D042FAED0057 /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Implementations/Timer.swift; sourceTree = ""; }; + 523A789FABFAA08BE5E5E84E4AC47A3A /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; + 53A508A97A09EC388234D8F1D8DCAEEC /* IntegerType+IdentifiableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "IntegerType+IdentifiableType.swift"; path = "Sources/DataSources/IntegerType+IdentifiableType.swift"; sourceTree = ""; }; + 5408250A6EB0BEC07FA9A5A43BDA62A6 /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; + 56E7DE8BFB2C87AE31D79260AC46060D /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxSwift.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 58A1CB0ACC84D50250128B3B7B07F7FB /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; + 59F3AE0069577C62D548CDB17D6C1A47 /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/Implementations/WithLatestFrom.swift; sourceTree = ""; }; + 5B7E92FE04C7E040B3654E7B37B3761C /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/Implementations/ToArray.swift; sourceTree = ""; }; 5C74B88FEDDD88D3129A163740E09672 /* Pods-RxTableViewDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxTableViewDemo.debug.xcconfig"; sourceTree = ""; }; + 5C8FCECA2AC0678E3E81C9785027BF10 /* _RX.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _RX.h; path = RxCocoa/Runtime/include/_RX.h; sourceTree = ""; }; + 5D2EE4A4251F29AB74E1D07AD9F6EEEA /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; 5D9F628699A419A3C47CE8B21C414182 /* Pods-RxTableViewDemo-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RxTableViewDemo-umbrella.h"; sourceTree = ""; }; - 5F2999F516C37F7542C0800AA5232161 /* RxSearchControllerDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxSearchControllerDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxSearchControllerDelegateProxy.swift; sourceTree = ""; }; - 5F57B5F1DD2CC43694F5A2FE2CB89D74 /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+arity.swift"; sourceTree = ""; }; - 6154396DF3F83867E1E0E6690F9BA673 /* _RXObjCRuntime.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _RXObjCRuntime.m; path = RxCocoa/Common/_RXObjCRuntime.m; sourceTree = ""; }; - 615E8DDF355D8E3CB66BD8A027DF6508 /* Variable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Variable.swift; path = RxSwift/Subjects/Variable.swift; sourceTree = ""; }; - 6385DB0C808924B04A64179013B6BD33 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Implementations/Reduce.swift; sourceTree = ""; }; - 6456747197F30D6470CDA30C7EB54084 /* RxTableViewDataSourceType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewDataSourceType.swift; path = RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift; sourceTree = ""; }; - 64B9B5847F5BA624518F67E589B8AAF5 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 655E5641A59A1D6EFDFF4D5998F711D0 /* UISectionedViewType+RxAnimatedDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISectionedViewType+RxAnimatedDataSource.swift"; path = "Sources/DataSources+Rx/UISectionedViewType+RxAnimatedDataSource.swift"; sourceTree = ""; }; - 65717987EB77FB6A73931AA405DFAFB3 /* RxTableViewDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift; sourceTree = ""; }; - 65DEDE5D454F568D23F62AB207F2D4F4 /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Implementations/Zip.swift; sourceTree = ""; }; - 66E1CED1F24BC209F28FB9AB2CE36321 /* Observable+Time.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Time.swift"; path = "RxSwift/Observables/Observable+Time.swift"; sourceTree = ""; }; - 67532E9C78A05F28C589045CFC327363 /* UISearchBar+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISearchBar+Rx.swift"; path = "RxCocoa/iOS/UISearchBar+Rx.swift"; sourceTree = ""; }; - 6765F5A72FC0814CD9D3A206BD93A931 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = RxSwift/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; - 6818193AADDA6666EC3A00E4D9FD97A0 /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Implementations/Empty.swift; sourceTree = ""; }; + 5DD7CB5736774192BEF2CDFD8A6C6F87 /* ObservableConvertibleType+SharedSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableConvertibleType+SharedSequence.swift"; path = "RxCocoa/CocoaUnits/SharedSequence/ObservableConvertibleType+SharedSequence.swift"; sourceTree = ""; }; + 5FEB07B88186F63A0F1F073AC6738814 /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Implementations/Sample.swift; sourceTree = ""; }; + 6033C3BED54E9BB077AFEE321A39A1E6 /* SectionModelType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SectionModelType.swift; path = Sources/DataSources/SectionModelType.swift; sourceTree = ""; }; + 6155299EDA67841B6C93E87FBA7B9D98 /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; + 6466E3293A8FBCED83909AE63C998D52 /* ControlProperty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ControlProperty.swift; path = RxCocoa/CocoaUnits/ControlProperty.swift; sourceTree = ""; }; + 657C6DE400A4C5867CB148CD837AD21D /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Implementations/Sink.swift; sourceTree = ""; }; + 6744986236AA450C4E9302AA70ECAF85 /* UIApplication+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIApplication+Rx.swift"; path = "RxCocoa/iOS/UIApplication+Rx.swift"; sourceTree = ""; }; + 6751B86FC81127FB8BA5F6A9E15F3207 /* RxCollectionViewDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift; sourceTree = ""; }; + 6759EC5C53A1278D009D5D308135BC8B /* Optional+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Optional+Extensions.swift"; path = "Sources/DataSources/Optional+Extensions.swift"; sourceTree = ""; }; + 684514ABF683B577B531A0128E916F77 /* ConnectableObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservable.swift; path = RxSwift/Observables/Implementations/ConnectableObservable.swift; sourceTree = ""; }; 6B43AFA2014748920FF0DA84F572FC90 /* Pods-RxTableViewDemo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RxTableViewDemo-acknowledgements.markdown"; sourceTree = ""; }; - 6C942C00ED1563E5B059D9A9BA59965C /* _RXKVOObserver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _RXKVOObserver.h; path = RxCocoa/Common/_RXKVOObserver.h; sourceTree = ""; }; - 6CD18275BC156C2D0BA76427D7E3A082 /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; - 6DBAFF4EF0BEF26EEA549366B74A0E66 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; - 6E689C6EAA268B984911F48829C5FA4C /* KVORepresentable+Swift.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "KVORepresentable+Swift.swift"; path = "RxCocoa/Common/KVORepresentable+Swift.swift"; sourceTree = ""; }; - 6F26F4C06723F6264A751593D3DC5D1C /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = RxSwift/DataStructures/Bag.swift; sourceTree = ""; }; - 702674FD5E17EFDE9994190E75E6DE8D /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; - 70FC1E38BD4520AE00C1118D9080894A /* RxCollectionViewSectionedReloadDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewSectionedReloadDataSource.swift; path = "Sources/DataSources+Rx/RxCollectionViewSectionedReloadDataSource.swift"; sourceTree = ""; }; - 72748232D690009B11E33C78D1F54D10 /* UITabBarItem+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITabBarItem+Rx.swift"; path = "RxCocoa/iOS/UITabBarItem+Rx.swift"; sourceTree = ""; }; - 72FFBE4418D0F05D5908CB1BD8F25B46 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; - 73C2DB4767095B7BF87B87CB3F2BA027 /* UIActivityIndicatorView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIActivityIndicatorView+Rx.swift"; path = "RxCocoa/iOS/UIActivityIndicatorView+Rx.swift"; sourceTree = ""; }; - 743466BA119447B722D28093BDCB06A2 /* UIView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Rx.swift"; path = "RxCocoa/iOS/UIView+Rx.swift"; sourceTree = ""; }; + 6BC5AA66E878C50B3DB4B7509F1168AB /* Differentiator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Differentiator.swift; path = Sources/DataSources/Differentiator.swift; sourceTree = ""; }; + 6C0307B25815F14F6DC4D9FC4E392DFD /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Implementations/Throttle.swift; sourceTree = ""; }; + 6C1B26C991156A69A48B6A11D09E6237 /* RxCocoa.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = RxCocoa.modulemap; sourceTree = ""; }; + 6D5B8808945E2DED4FC91DFA3009D35C /* AnimatableSectionModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatableSectionModel.swift; path = Sources/DataSources/AnimatableSectionModel.swift; sourceTree = ""; }; + 6D91A20A5ECE9166064F7F1F6FFA8A17 /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Implementations/Multicast.swift; sourceTree = ""; }; + 6FE108D8124D02DD3B9711D9039959CC /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+Collection.swift"; sourceTree = ""; }; + 70B9A6F940B9E1C17A9B79DD42D3229D /* ControlTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ControlTarget.swift; path = RxCocoa/Common/ControlTarget.swift; sourceTree = ""; }; + 72CE22701097144CA7CC4EB148EACB83 /* String+IdentifiableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+IdentifiableType.swift"; path = "Sources/DataSources/String+IdentifiableType.swift"; sourceTree = ""; }; + 73149E7D9DE54413D26FEC89897CDF81 /* Observable+Creation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Creation.swift"; path = "RxSwift/Observables/Observable+Creation.swift"; sourceTree = ""; }; + 736B78D8E1D065433E242C88D1B819F5 /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; + 743C1B565B4FB9A488667C0279E27C6C /* DataSources.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DataSources.swift; path = Sources/DataSources/DataSources.swift; sourceTree = ""; }; + 7579FBC648A274C123A55948C001A701 /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; 75A421CFB92FFE874F5B36575A783A22 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 773C619279B2D4F76F88550324A29E16 /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; - 7824E09ABB12A10694F86A691318B852 /* UISearchController+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISearchController+Rx.swift"; path = "RxCocoa/iOS/UISearchController+Rx.swift"; sourceTree = ""; }; - 7A28218965EEFAA631B0C167D30B95BB /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; - 7A4F069B74DDA5D9541A4BAB7460EF29 /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; - 7C69ADF8078822CBD19CD14F47B6F9E3 /* ControlProperty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ControlProperty.swift; path = RxCocoa/Common/CocoaUnits/ControlProperty.swift; sourceTree = ""; }; - 7CE48245E99517E338431B5A4246A91F /* UIProgressView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIProgressView+Rx.swift"; path = "RxCocoa/iOS/UIProgressView+Rx.swift"; sourceTree = ""; }; - 7E52DC1114EF77FF4BCBFCE7039822D1 /* Driver+Subscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Driver+Subscription.swift"; path = "RxCocoa/Common/CocoaUnits/Driver/Driver+Subscription.swift"; sourceTree = ""; }; + 78BDDEDD1A47A3FAEBEB0220797BE299 /* SharedSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SharedSequence.swift; path = RxCocoa/CocoaUnits/SharedSequence/SharedSequence.swift; sourceTree = ""; }; + 79737138836EA4257B36989FDF985E26 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; + 79CF583F517003EEEBBA175950E58FF0 /* RxSearchControllerDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxSearchControllerDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxSearchControllerDelegateProxy.swift; sourceTree = ""; }; + 7A2CE3476C27B0C35E94C832A7DFA3E8 /* RxDataSources.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = RxDataSources.modulemap; sourceTree = ""; }; + 7AE761CE7535CAFB9FB8480F2B3CA51A /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; + 7BD5D588AAC043DA6B8E44798E30A26D /* _RXDelegateProxy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _RXDelegateProxy.m; path = RxCocoa/Runtime/_RXDelegateProxy.m; sourceTree = ""; }; + 7BEBE0A95FD3996906F40DC3BAFD0501 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; + 7C02B7D8A52AB7C160EFC99EBE8BD9C3 /* RxCocoa.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCocoa.swift; path = RxCocoa/RxCocoa.swift; sourceTree = ""; }; + 7C6A0CADA7469243BCCEBBA7B9A98E48 /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/Implementations/RetryWhen.swift; sourceTree = ""; }; + 7D28CE0B28254A169E2C9EB6284C0CDA /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/Implementations/DistinctUntilChanged.swift; sourceTree = ""; }; + 7E2BE220D80F23B167D1A66107E6169B /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; 7EAFABB0CC9B88CDD47FC36B7EC200DF /* Pods-RxTableViewDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxTableViewDemo.release.xcconfig"; sourceTree = ""; }; - 7F7B6F514CE43EB2B495A8CB396A3172 /* NSLayoutConstraint+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSLayoutConstraint+Rx.swift"; path = "RxCocoa/Common/NSLayoutConstraint+Rx.swift"; sourceTree = ""; }; - 7F9A5644E09CAE916AA476851C05D831 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = RxSwift/Platform/Platform.Linux.swift; sourceTree = ""; }; - 80BB7690641103D11923A61E6D30A8FB /* _RXDelegateProxy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _RXDelegateProxy.h; path = RxCocoa/Common/_RXDelegateProxy.h; sourceTree = ""; }; - 810C95C628521A677E6EEA632B68F292 /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; - 83D964365738F68246F330076C21713C /* ConnectableObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservable.swift; path = RxSwift/Observables/Implementations/ConnectableObservable.swift; sourceTree = ""; }; - 855FBA980626C92A023773B91B79761E /* UITextView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITextView+Rx.swift"; path = "RxCocoa/iOS/UITextView+Rx.swift"; sourceTree = ""; }; - 87CD92D796873475E7B918E325B36E07 /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; - 87D39C04E658CDA40D6AA0E86EB0F583 /* UIScrollView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIScrollView+Rx.swift"; path = "RxCocoa/iOS/UIScrollView+Rx.swift"; sourceTree = ""; }; - 888B5D578F2363DF0C6A937B23D9F91A /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; - 8900BC0E4077BA162B5F92716A38926A /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/Implementations/ToArray.swift; sourceTree = ""; }; - 893108B148617406E5E52E049FE18947 /* UIImagePickerController+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIImagePickerController+Rx.swift"; path = "RxCocoa/iOS/UIImagePickerController+Rx.swift"; sourceTree = ""; }; - 89568F01DA538A84617B3A81A1FC28A9 /* UIRefreshControl+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIRefreshControl+Rx.swift"; path = "RxCocoa/iOS/UIRefreshControl+Rx.swift"; sourceTree = ""; }; - 8A23481F6AC8BB36B96833439716FC94 /* UIGestureRecognizer+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIGestureRecognizer+Rx.swift"; path = "RxCocoa/iOS/UIGestureRecognizer+Rx.swift"; sourceTree = ""; }; - 8ABBC0E46182222A25EE951E542805FB /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Implementations/Scan.swift; sourceTree = ""; }; - 8AEC9C79D8D6C0E2A213C2E450FD2729 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; - 8B4A67A85BC175836C7931DAF1BB417D /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/Implementations/SubscribeOn.swift; sourceTree = ""; }; - 8B5111AD9BE7E2A19ACB4203A2C24715 /* Observable+Concurrency.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Concurrency.swift"; path = "RxSwift/Observables/Observable+Concurrency.swift"; sourceTree = ""; }; - 8B6204C70778BA7BEC8E6E8912A792CF /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; - 8BE7EC0ADC83CD760B32F2E1D7020AD3 /* StableCompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StableCompositeDisposable.swift; path = RxSwift/Disposables/StableCompositeDisposable.swift; sourceTree = ""; }; - 8E58B9FA1A58EECBA104A29D48FB98DD /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Implementations/Filter.swift; sourceTree = ""; }; - 9010DA3CCB56499680D3F414AE154556 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Implementations/Window.swift; sourceTree = ""; }; - 9051D2FED1C7524878696C60752BACCB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 93BAF9C976A5DB0D56034C76BE483545 /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; - 94E4E29734B00F6A8D1C0C60F98CEBCE /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; - 952F37E31F033A130FFA31E6EA48DC6E /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; - 98A3B272DED1C3FFAB35F9960988B669 /* RxCocoa-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxCocoa-umbrella.h"; sourceTree = ""; }; - 99245DB1B385301333323CB77EA5573A /* ImmediateScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateScheduler.swift; path = RxSwift/Schedulers/ImmediateScheduler.swift; sourceTree = ""; }; - 9C02D582FFECC19580D960EDAA83BEFD /* UISegmentedControl+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISegmentedControl+Rx.swift"; path = "RxCocoa/iOS/UISegmentedControl+Rx.swift"; sourceTree = ""; }; - 9CDCFF786752320D810B388EB38B0E0E /* RxCocoa.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = RxCocoa.modulemap; sourceTree = ""; }; - 9DA0B4B2601B0524D3150E6AC5425223 /* NSObject+Rx+RawRepresentable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Rx+RawRepresentable.swift"; path = "RxCocoa/Common/Observables/NSObject+Rx+RawRepresentable.swift"; sourceTree = ""; }; - 9DCEF9D5318A070C3D427135B8882D79 /* Observable+Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Debug.swift"; path = "RxSwift/Observables/Observable+Debug.swift"; sourceTree = ""; }; - 9EB182837D2AF8D9E96C31E7A89B7295 /* RxCocoa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RxCocoa.h; path = RxCocoa/RxCocoa.h; sourceTree = ""; }; - 9FCB5C34A8DEAA9F4C77313096F78896 /* SectionModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SectionModel.swift; path = Sources/DataSources/SectionModel.swift; sourceTree = ""; }; - A095554D7FB3D0A411C47D89E9FB1172 /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Implementations/Producer.swift; sourceTree = ""; }; - A2AAA3F1718D080B28C7879DCE6E987B /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Implementations/Do.swift; sourceTree = ""; }; - A30E8B5A4FF0F7768B5DB43C954822C7 /* UIImageView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIImageView+Rx.swift"; path = "RxCocoa/iOS/UIImageView+Rx.swift"; sourceTree = ""; }; - A3B637F17226674CA93F1ED73411C0D9 /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; - A49FBB58244EF989D67BDD8FD435D2FB /* RxTableViewSectionedReloadDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewSectionedReloadDataSource.swift; path = "Sources/DataSources+Rx/RxTableViewSectionedReloadDataSource.swift"; sourceTree = ""; }; - A50E62FE23EAAD062EFA44BC8C1A2B9A /* UIBarButtonItem+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIBarButtonItem+Rx.swift"; path = "RxCocoa/iOS/UIBarButtonItem+Rx.swift"; sourceTree = ""; }; - A5E7EA53DB3D5D30CB51B00FF87B98B0 /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/Implementations/WithLatestFrom.swift; sourceTree = ""; }; - A66C8D88E7EDFB9029D04AD389F7574D /* KVORepresentable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KVORepresentable.swift; path = RxCocoa/Common/KVORepresentable.swift; sourceTree = ""; }; - A710A2CA347C31D4AF7921A6FD7AD05C /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; - A7972E47CB3597AD008C068283CC1BB9 /* SectionModelType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SectionModelType.swift; path = Sources/DataSources/SectionModelType.swift; sourceTree = ""; }; - A94797B637505C0BDDBDF6AA95C224BF /* ControlEvent.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ControlEvent.swift; path = RxCocoa/Common/CocoaUnits/ControlEvent.swift; sourceTree = ""; }; - A9E1DEF91E51E7F1FB72036F35441557 /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Implementations/Sink.swift; sourceTree = ""; }; - AA5D4D92E6856CF24268861FE753AC70 /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/Implementations/SkipUntil.swift; sourceTree = ""; }; - AABC984B312B612E61DA0432EEF855AD /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/Implementations/DistinctUntilChanged.swift; sourceTree = ""; }; - AADC84D579724A650B42A9FDD2803F53 /* AnimationConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationConfiguration.swift; path = Sources/DataSources/AnimationConfiguration.swift; sourceTree = ""; }; - AB4E2641DCD66C7DCE9F5DE64221139B /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/Implementations/DelaySubscription.swift; sourceTree = ""; }; + 7F0545435CD3C2A53F56B1D8393D728E /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Implementations/Amb.swift; sourceTree = ""; }; + 8086FD8D79795386146C374A3AA16F14 /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Implementations/Take.swift; sourceTree = ""; }; + 810029361B36506BB7FD50E2FE03F1C5 /* UIGestureRecognizer+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIGestureRecognizer+Rx.swift"; path = "RxCocoa/iOS/UIGestureRecognizer+Rx.swift"; sourceTree = ""; }; + 820C50078774408B612769C4E4EF4678 /* ShareReplay1WhileConnected.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1WhileConnected.swift; path = RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift; sourceTree = ""; }; + 832B6FA48CE3355090F92ADC2DD99479 /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; + 852130AA68065C3ED52E035A0CA8740C /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/Implementations/SingleAsync.swift; sourceTree = ""; }; + 862434FB6CF031CD1771E4628418BA20 /* UIStepper+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIStepper+Rx.swift"; path = "RxCocoa/iOS/UIStepper+Rx.swift"; sourceTree = ""; }; + 869AC1C17901CD096909FB0EE91579E1 /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; + 869AE380E194D3CE7C60FD4697F8458B /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; + 87146B45AEBD0C6D18AC8BFB71B01AEA /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; + 8917BF3C86ECE85EAE8715AE790058D0 /* IdentifiableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IdentifiableType.swift; path = Sources/DataSources/IdentifiableType.swift; sourceTree = ""; }; + 8B4AB91342F61FAB8AA0223932F7BD8D /* UITableView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITableView+Rx.swift"; path = "RxCocoa/iOS/UITableView+Rx.swift"; sourceTree = ""; }; + 8BD41054BE944C2519276E3064A12BC8 /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; + 8BFAD5F5ADE258F03BEA2077D0A71A92 /* Observable+Multiple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Multiple.swift"; path = "RxSwift/Observables/Observable+Multiple.swift"; sourceTree = ""; }; + 8CC69B6B28CF138AE1FDCCCFD3885AC8 /* UIProgressView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIProgressView+Rx.swift"; path = "RxCocoa/iOS/UIProgressView+Rx.swift"; sourceTree = ""; }; + 90991732D0FE5C4A62BABB930191D474 /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; + 9264C5CCC62EF6F7A6090D773A540B76 /* RxScrollViewDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxScrollViewDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift; sourceTree = ""; }; + 9390570A331F71DF4DD24C34D5A1CFC8 /* RxTableViewSectionedReloadDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewSectionedReloadDataSource.swift; path = "Sources/DataSources+Rx/RxTableViewSectionedReloadDataSource.swift"; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93FB9D0F50A61FD9DA2D571E9BF17630 /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; + 9461F9CD3C08AECF8B5E84F30234FC7C /* UITextField+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITextField+Rx.swift"; path = "RxCocoa/iOS/UITextField+Rx.swift"; sourceTree = ""; }; + 94855BF33184CE8D6AED90AFECF18721 /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/Implementations/DelaySubscription.swift; sourceTree = ""; }; + 95FAF9E104BD90785AA592AF3BD731B3 /* RxTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTarget.swift; path = RxCocoa/Common/RxTarget.swift; sourceTree = ""; }; + 9665BDD20C6F6A0EC28B094969176995 /* Observable+Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Debug.swift"; path = "RxSwift/Observables/Observable+Debug.swift"; sourceTree = ""; }; + 96723FA05CB844499A188E8166F0D19D /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; + 97B773A121AC39E64B90D3B8CBF63C8E /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; + 980DBD518A1D666B2C4CAD2550DA37B4 /* SectionModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SectionModel.swift; path = Sources/DataSources/SectionModel.swift; sourceTree = ""; }; + 98B83B2A3FE4B3B16036852D9ECACB7F /* UIViewController+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewController+Rx.swift"; path = "RxCocoa/iOS/UIViewController+Rx.swift"; sourceTree = ""; }; + 9915AB6370C154295AA80909F00CC339 /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Implementations/Using.swift; sourceTree = ""; }; + 99CE535BBDC0C2CB7BBA0EE9CC2AEA88 /* Observable+Aggregate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Aggregate.swift"; path = "RxSwift/Observables/Observable+Aggregate.swift"; sourceTree = ""; }; + 9A9B27F03951F457975B3E4574D16D7C /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Implementations/Filter.swift; sourceTree = ""; }; + 9B1247B87FD19B5DA573A2E7C0D2B6DC /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; + 9B5DE634E75FA6D457829430BC81E655 /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; + 9C9505C24933BEA431DD25371A190E97 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; + 9CBE50AEC2D8B11BDFC9D690AAD6BF8B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9DD03E271530955B973BB8A7F2D89FC8 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Implementations/Switch.swift; sourceTree = ""; }; + 9FC642622CB0847042301AA4DCDC48EC /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/Implementations/ElementAt.swift; sourceTree = ""; }; + 9FE327A1DD4D599C36D7DE80D99C8223 /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Implementations/Catch.swift; sourceTree = ""; }; + A0B2BE316CCC751E39D31F45CC238A3B /* KVORepresentable+Swift.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "KVORepresentable+Swift.swift"; path = "RxCocoa/Foundation/KVORepresentable+Swift.swift"; sourceTree = ""; }; + A0E15A68BFE737B4ABC80BF534498CEE /* _RXKVOObserver.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _RXKVOObserver.m; path = RxCocoa/Runtime/_RXKVOObserver.m; sourceTree = ""; }; + A1634D43A0871B5A57B860D01F60F0FE /* UI+SectionedViewType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UI+SectionedViewType.swift"; path = "Sources/DataSources/UI+SectionedViewType.swift"; sourceTree = ""; }; + A27D37507872FF62F32DFB99F25836D5 /* RxTextStorageDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTextStorageDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift; sourceTree = ""; }; + A29CD84AEE57E781369C5248490C7B95 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; + A2ED51F3FC3DA3D63830EA042CBB21F3 /* Variable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Variable.swift; path = RxSwift/Subjects/Variable.swift; sourceTree = ""; }; + A4264024D6AC172108C4A7F9E55AB380 /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Implementations/Producer.swift; sourceTree = ""; }; + A4629741798D2D8BEE194A348DFF9BA1 /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; + A52094D8B54994F95E7D988F12A5DCF1 /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; + A59C14BF6BE255CA7CDE190D2B5C118A /* _RX.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _RX.m; path = RxCocoa/Runtime/_RX.m; sourceTree = ""; }; + A6BE2F8EED54B4656A049C330711FA96 /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; + A6CCBC945AEA3F09360E82953F3BA52D /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; + A78510FCA38C53D2C109EB1ED0F61A7C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A7DB4309CC71C0ACDEC46942D13573EC /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Implementations/Zip.swift; sourceTree = ""; }; + A90F317F493C90EAE016FBF5DFB2E119 /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; + A9CD6CFF97E31C65FE26ADA366FD3382 /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; + AB6633997DFB57381792DD05E21B11F1 /* UITabBarItem+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITabBarItem+Rx.swift"; path = "RxCocoa/iOS/UITabBarItem+Rx.swift"; sourceTree = ""; }; AD43D98CD8C9B3270A3D8DFE4C30F9B5 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - AF3769D2AEFD0E9BED36B715EFAF3450 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Implementations/Map.swift; sourceTree = ""; }; - B0D4EDC4A4F274B87F40614FB04179B3 /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; - B149505C1AE51A9E37078D433941135E /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; - B375AFFE8390D151F82161AD24D6A69E /* AnimatableSectionModelType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatableSectionModelType.swift; path = Sources/DataSources/AnimatableSectionModelType.swift; sourceTree = ""; }; - B42679BD9F2FF76FE4FB5FE331F67416 /* Pods-RxTableViewDemo.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-RxTableViewDemo.modulemap"; sourceTree = ""; }; - B4374DECBF203956E169DC2D7CC0AE33 /* SynchronizedSubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedSubscribeType.swift; path = RxSwift/Concurrency/SynchronizedSubscribeType.swift; sourceTree = ""; }; - B4CA10C75F652D494B168D293B95819C /* Variable+Driver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Variable+Driver.swift"; path = "RxCocoa/Common/CocoaUnits/Driver/Variable+Driver.swift"; sourceTree = ""; }; - B6B3EA1B48AF68C70AF859E9F401419C /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = RxSwift.modulemap; sourceTree = ""; }; - B7506EC23F801FAD45B52F5B17547767 /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/Implementations/ObserveOn.swift; sourceTree = ""; }; - B82CD0ED461793723F68A396EFC3C75A /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = RxSwift/DataStructures/PriorityQueue.swift; sourceTree = ""; }; - BA65CC84E46823F8529911D1DCBD3787 /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; - BA8DA65540E3CBBB74078941C198EDA8 /* RxTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTarget.swift; path = RxCocoa/Common/RxTarget.swift; sourceTree = ""; }; - BB060A574526AEEFDE79D9F1507EBEA9 /* UIApplication+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIApplication+Rx.swift"; path = "RxCocoa/iOS/UIApplication+Rx.swift"; sourceTree = ""; }; - BB94AEBFB3F6135B5255C11741A267DA /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/Implementations/SingleAsync.swift; sourceTree = ""; }; - BC00A785BECB74CD4E13A567F3498EF9 /* RxTextViewDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTextViewDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxTextViewDelegateProxy.swift; sourceTree = ""; }; - BC437B95850CF049580A759EF78FCD22 /* Logging.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Logging.swift; path = RxCocoa/Common/Logging.swift; sourceTree = ""; }; - BCDEBBEB8EFB34258C6FF20C1DFD949A /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; - BCFF00744C5A1F85DBFF3A180FDA2ACE /* RxCocoa.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxCocoa.xcconfig; sourceTree = ""; }; - BEB3BE6CADAD33DDC4E2E6D661EAB827 /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; - C108BF7EF189CCA8A8B41E6FB8795BA2 /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; - C15910CF6CDD1132CA5CEBB1602BBE56 /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/Implementations/SkipWhile.swift; sourceTree = ""; }; - C271B0D387892379051F510E6DC99BA2 /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; - C29A87C527CDE40C797251A11E4265B0 /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; + AD6F3192EA9B6A26016AAE0D0AEE6151 /* ControlEvent+Driver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ControlEvent+Driver.swift"; path = "RxCocoa/CocoaUnits/Driver/ControlEvent+Driver.swift"; sourceTree = ""; }; + AD87B02A5CCD9A86CB1466EF1329BFB5 /* Logging.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Logging.swift; path = RxCocoa/Foundation/Logging.swift; sourceTree = ""; }; + AE0FF21EE6A82F6A64508A8FCEFD846E /* UIScrollView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIScrollView+Rx.swift"; path = "RxCocoa/iOS/UIScrollView+Rx.swift"; sourceTree = ""; }; + AE1A26A4EDC1E35AA985515078033CD0 /* KVORepresentable+CoreGraphics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "KVORepresentable+CoreGraphics.swift"; path = "RxCocoa/Foundation/KVORepresentable+CoreGraphics.swift"; sourceTree = ""; }; + AE688C443FEBD47CF88E6E9ACE777F92 /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Implementations/Concat.swift; sourceTree = ""; }; + B1AB286AD7A86211D6472DAB9979F289 /* UIPageControl+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIPageControl+Rx.swift"; path = "RxCocoa/iOS/UIPageControl+Rx.swift"; sourceTree = ""; }; + B1E4BE5E1978E4A55DA8CA00E73743AF /* AnonymousObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObservable.swift; path = RxSwift/Observables/Implementations/AnonymousObservable.swift; sourceTree = ""; }; + B24921F8011FCA825C4993B5604EA685 /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Implementations/Sequence.swift; sourceTree = ""; }; + B2B8325346DC1B197EACFC386C0AD44B /* ControlProperty+Driver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ControlProperty+Driver.swift"; path = "RxCocoa/CocoaUnits/Driver/ControlProperty+Driver.swift"; sourceTree = ""; }; + B380E0576862E2CBCF039C17ABC697EB /* UIBindingObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UIBindingObserver.swift; path = RxCocoa/CocoaUnits/UIBindingObserver.swift; sourceTree = ""; }; + B42679BD9F2FF76FE4FB5FE331F67416 /* Pods-RxTableViewDemo.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-RxTableViewDemo.modulemap"; sourceTree = ""; }; + B4336587650CA1BE7C1383CE27D78FDD /* _RXObjCRuntime.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _RXObjCRuntime.m; path = RxCocoa/Runtime/_RXObjCRuntime.m; sourceTree = ""; }; + B4D35493523A754297AD996F29CB67CC /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Implementations/Never.swift; sourceTree = ""; }; + B4F88ECA9634C669655B255E60A28780 /* UINavigationItem+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UINavigationItem+Rx.swift"; path = "RxCocoa/iOS/UINavigationItem+Rx.swift"; sourceTree = ""; }; + B510A4164AA4F979F46D323A8E5F9539 /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; + B6E39A688B5EA2D9711749166DE954B2 /* Observable+Concurrency.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Concurrency.swift"; path = "RxSwift/Observables/Observable+Concurrency.swift"; sourceTree = ""; }; + B8FCDA60BE0589C6ABC254986EAF4BF0 /* RxCocoa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RxCocoa.h; path = RxCocoa/RxCocoa.h; sourceTree = ""; }; + B913C81B23EDE7019262E54ECB2125F3 /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/Implementations/TakeWhile.swift; sourceTree = ""; }; + B92A15158431EB7AC93808840DD462BD /* Variable+Driver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Variable+Driver.swift"; path = "RxCocoa/CocoaUnits/Driver/Variable+Driver.swift"; sourceTree = ""; }; + BA27C8A01F351F55BBBE1C83E12D08CC /* UIView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Rx.swift"; path = "RxCocoa/iOS/UIView+Rx.swift"; sourceTree = ""; }; + BA782D0DF31E10E208B914F67B7A277F /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Implementations/Optional.swift; sourceTree = ""; }; + BAFD2858013A4A0FC8AA7ABBBA200B87 /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; + BCB4E3C5E11416C80C03BB1B27D95D2F /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Implementations/Debug.swift; sourceTree = ""; }; + BD4BB38BBC43CC6CBE9A5E5B74BFB32E /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; + BD51F4CAC068A7C8573A9D1CF3DB552E /* RxTabBarControllerDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTabBarControllerDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxTabBarControllerDelegateProxy.swift; sourceTree = ""; }; + BE262CAD5DB3E5BDE032447B163A5015 /* UIDatePicker+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIDatePicker+Rx.swift"; path = "RxCocoa/iOS/UIDatePicker+Rx.swift"; sourceTree = ""; }; + BE96C109C3FA524C0A497102331903A4 /* UISearchController+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISearchController+Rx.swift"; path = "RxCocoa/iOS/UISearchController+Rx.swift"; sourceTree = ""; }; + BF4E6389098BE0EAE3DE7910B6CB879B /* UIBarButtonItem+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIBarButtonItem+Rx.swift"; path = "RxCocoa/iOS/UIBarButtonItem+Rx.swift"; sourceTree = ""; }; + BF8BA2BB9371A2D5589996E379CE78EF /* UISwitch+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISwitch+Rx.swift"; path = "RxCocoa/iOS/UISwitch+Rx.swift"; sourceTree = ""; }; + C0267D21A277D9BCFAFBD0373A5C4C27 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; + C184188A26EA5CB2CF09E94C621ED10A /* UITextView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITextView+Rx.swift"; path = "RxCocoa/iOS/UITextView+Rx.swift"; sourceTree = ""; }; + C2A5B3CA83E3495E9AA59559311BA7E6 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; C3361E06A82048F9D9CE3820B18B1B39 /* Pods-RxTableViewDemo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RxTableViewDemo-frameworks.sh"; sourceTree = ""; }; - C5CEF8310F2648176B5E68727F7DAACD /* UI+SectionedViewType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UI+SectionedViewType.swift"; path = "Sources/DataSources/UI+SectionedViewType.swift"; sourceTree = ""; }; - C6C9592AFAAB6D33901CDEF7FAB51A44 /* RefCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCount.swift; path = RxSwift/Observables/Implementations/RefCount.swift; sourceTree = ""; }; - C89BFE0FAAB0D0EF6C242BCC7405C721 /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Implementations/Using.swift; sourceTree = ""; }; - C8F6A19B3940ECB4D8EA3BF65D4DA688 /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Implementations/Timeout.swift; sourceTree = ""; }; - CA48DA435E0822818D9D45D2A2B93629 /* ObserveOnSerialDispatchQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOnSerialDispatchQueue.swift; path = RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift; sourceTree = ""; }; - CB53C15A732C6BBD1E9DFC72D8973B41 /* _RX.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _RX.h; path = RxCocoa/Common/_RX.h; sourceTree = ""; }; - CBEF846E0BE80EC9413288C89DD06A11 /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; - CCB011D8486E8737BD64CFE641A4D88F /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/Implementations/TakeWhile.swift; sourceTree = ""; }; - CD167D1596E967B945491E05A371B0A4 /* SectionedViewDataSourceType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SectionedViewDataSourceType.swift; path = RxCocoa/Common/SectionedViewDataSourceType.swift; sourceTree = ""; }; - D01EFD8D639D2DAEF40FAFA2B595BC01 /* NSTextStorage+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSTextStorage+Rx.swift"; path = "RxCocoa/iOS/NSTextStorage+Rx.swift"; sourceTree = ""; }; - D099263BC739575B2A7CC3A99A587B4E /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; - D17B042E4E0BAFC25250DBBF69652DFB /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; - D1EEBEAF641A335CD34A975EADD918DB /* Zip+CollectionType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+CollectionType.swift"; path = "RxSwift/Observables/Implementations/Zip+CollectionType.swift"; sourceTree = ""; }; - D3B72C9CED8672443B889BE07AE4C9C4 /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; - D4D12B680F061CB855B5FF6EE4C70809 /* AnonymousInvocable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousInvocable.swift; path = RxSwift/Schedulers/Internal/AnonymousInvocable.swift; sourceTree = ""; }; - D51C25411309C7DD1982D6026FD446D2 /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Implementations/Sequence.swift; sourceTree = ""; }; - D8D3FE26AED138E388B1B310FF2B3378 /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Implementations/Buffer.swift; sourceTree = ""; }; - D959AA83F85AE923BED4EA7F46CE92C4 /* ItemEvents.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ItemEvents.swift; path = RxCocoa/iOS/Events/ItemEvents.swift; sourceTree = ""; }; - D95D8ACFAEE78C376ED41959325B60D0 /* RxCocoa-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxCocoa-dummy.m"; sourceTree = ""; }; - DA1501FFEC2764B000C75C6FE6720688 /* NSNotificationCenter+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Rx.swift"; path = "RxCocoa/Common/Observables/NSNotificationCenter+Rx.swift"; sourceTree = ""; }; - DA7414D0265E5636FAF93F0A7359FA05 /* UIControl+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIControl+Rx.swift"; path = "RxCocoa/iOS/UIControl+Rx.swift"; sourceTree = ""; }; - DA899A54921C5F415D9F70E659E2AD1D /* NAryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NAryDisposable.swift; path = RxSwift/Disposables/NAryDisposable.swift; sourceTree = ""; }; - DAB89611364FD0A06C308A8E88FA31F8 /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Implementations/Concat.swift; sourceTree = ""; }; - DAD607A687F0024A07D86BAD94464A81 /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; - DB54E1471B82610011CF139FC19D0B40 /* Observable+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Extensions.swift"; path = "RxSwift/Observable+Extensions.swift"; sourceTree = ""; }; - DC03A4068F8149A09EAEEEA2E4311D58 /* KVORepresentable+CoreGraphics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "KVORepresentable+CoreGraphics.swift"; path = "RxCocoa/Common/KVORepresentable+CoreGraphics.swift"; sourceTree = ""; }; - DD27C7D2E4AB5ECE09DB937383CCBFA5 /* RxTableViewReactiveArrayDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewReactiveArrayDataSource.swift; path = RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift; sourceTree = ""; }; - DEB4DEA9B6B691B91D3A1D951B003FCF /* RxDataSources.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxDataSources.xcconfig; sourceTree = ""; }; - DF81535C24861FAF5532B5AC1D9411D1 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/Implementations/TakeLast.swift; sourceTree = ""; }; - E052B5824C1D5DF14E13BD18EF18E72A /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; - E082772BF515653ED7A782FC0768378D /* RxSearchBarDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxSearchBarDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift; sourceTree = ""; }; - E1AAB9AC6A42F2BEA32741BEA3AD3CEE /* ItemPath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ItemPath.swift; path = Sources/DataSources/ItemPath.swift; sourceTree = ""; }; - E200AA2D1F8A26811491BCC4ECEDF1CF /* UIButton+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIButton+Rx.swift"; path = "RxCocoa/iOS/UIButton+Rx.swift"; sourceTree = ""; }; - E6E70F60941C0AE3C8AF49CB3D6E1F73 /* UISlider+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISlider+Rx.swift"; path = "RxCocoa/iOS/UISlider+Rx.swift"; sourceTree = ""; }; - E760976DAA7ED684F2644D09D2EB09AA /* Observable+Bind.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Bind.swift"; path = "RxCocoa/Common/Observable+Bind.swift"; sourceTree = ""; }; - E85178FF7FE09585BA1DB5CCEC977422 /* DispatchQueueSchedulerQOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueSchedulerQOS.swift; path = RxSwift/Schedulers/DispatchQueueSchedulerQOS.swift; sourceTree = ""; }; - EA5750D9CACFE39064BC26FE1C49601C /* NSObject+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Rx.swift"; path = "RxCocoa/Common/Observables/NSObject+Rx.swift"; sourceTree = ""; }; - EA5AD683C34B914BCAB1976A0926BDBC /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Implementations/Generate.swift; sourceTree = ""; }; - EB946CCE233F12221EDC728507945C2E /* _RX.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _RX.m; path = RxCocoa/Common/_RX.m; sourceTree = ""; }; - ECBB636B5778CB2A4BD242DDAB909F2D /* RxDataSources-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxDataSources-dummy.m"; sourceTree = ""; }; - ECFD9ADBC4BB16D2EAE1A500F25C3D07 /* UIStepper+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIStepper+Rx.swift"; path = "RxCocoa/iOS/UIStepper+Rx.swift"; sourceTree = ""; }; - ED74A87F0C83A760A9CDC92D24A8B64E /* CombineLatest+CollectionType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+CollectionType.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+CollectionType.swift"; sourceTree = ""; }; - EDF9DB536B519873D02E74EC58EE142B /* UISwitch+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISwitch+Rx.swift"; path = "RxCocoa/iOS/UISwitch+Rx.swift"; sourceTree = ""; }; - EEEF591BE779E562685FCF57EF0ACD4B /* Observable+Multiple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Multiple.swift"; path = "RxSwift/Observables/Observable+Multiple.swift"; sourceTree = ""; }; - EF402C98FBDFCD764DABB580BBD5A92F /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/Implementations/ElementAt.swift; sourceTree = ""; }; - EFA9CD5809D72EC238C686E5A7EC1B76 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = RxSwift/DataStructures/Queue.swift; sourceTree = ""; }; - EFACC162159C40B3EF2304B96D5937EE /* _RXDelegateProxy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _RXDelegateProxy.m; path = RxCocoa/Common/_RXDelegateProxy.m; sourceTree = ""; }; - F08BEC40B90CDE21AAA4BBB5463DD347 /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; - F102A4CCC0A5CC8D2C99FA655B0E4FCC /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Implementations/Deferred.swift; sourceTree = ""; }; - F19C8D14EA987F1E7C5F35655CE67F11 /* Observable+StandardSequenceOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+StandardSequenceOperators.swift"; path = "RxSwift/Observables/Observable+StandardSequenceOperators.swift"; sourceTree = ""; }; - F1C5FDB7A1FFEE8C3D70FD4EBCFE5134 /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/Implementations/TakeUntil.swift; sourceTree = ""; }; + C4C8C9BDEE366BCBC316FFC3334C2833 /* UIImageView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIImageView+Rx.swift"; path = "RxCocoa/iOS/UIImageView+Rx.swift"; sourceTree = ""; }; + C4CBA2BAB8C40F798DEBE7CA11359018 /* SharedSequence+Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SharedSequence+Operators.swift"; path = "RxCocoa/CocoaUnits/SharedSequence/SharedSequence+Operators.swift"; sourceTree = ""; }; + C4F5FC72244269F775F2D662CF98560C /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Implementations/Generate.swift; sourceTree = ""; }; + C64B127FE517B8381A0CA7837861480E /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; + C732FA2FD7072204C390B99B2F73AC6B /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; + C79C0F60B88BADD8F7C07431BF109F1F /* RxCocoa-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxCocoa-umbrella.h"; sourceTree = ""; }; + C7EE2C16CBE8B75D8267C33C933851E9 /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; + C8238596AA612F349E4F3BAA4C2C19A5 /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; + C84AC925EEE76D8FC0BA48C8219E9DC1 /* SynchronizedSubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedSubscribeType.swift; path = RxSwift/Concurrency/SynchronizedSubscribeType.swift; sourceTree = ""; }; + C8C10F2FCFD40F473F4F8F4915608214 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; + C8E4AFC16FA6F3647A8FE0111C2EDC29 /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; + C8F5BD14FBA3B56B4C1A34A6ACBB4CB3 /* RxCocoa.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxCocoa.xcconfig; sourceTree = ""; }; + C8FF6BF3429FD6E36FEC130258CCD8C0 /* UIRefreshControl+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIRefreshControl+Rx.swift"; path = "RxCocoa/iOS/UIRefreshControl+Rx.swift"; sourceTree = ""; }; + C9880F56A5D1D3CF95FDE16F92114588 /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Implementations/Just.swift; sourceTree = ""; }; + CB1F493DC4C7C329871D6869A276715C /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; + CBF478DBBC6F39BD90331969E24299C6 /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; + CDC0736D33646BED3FA3AC26C5B5B507 /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; + CFAFC0E14D28F48AED1B736EF5E9A5E0 /* NSObject+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Rx.swift"; path = "RxCocoa/Foundation/NSObject+Rx.swift"; sourceTree = ""; }; + CFE92D0B5B2A0EDD65C4EE276D3ED1A7 /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; + D152A471C350F907242B93C07D985920 /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/Implementations/CombineLatest.swift; sourceTree = ""; }; + D1BC94DD14D9C23D96A534A70158DB94 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/Implementations/StartWith.swift; sourceTree = ""; }; + D2B78FC2120BDDC9307B1E6EBCE19A53 /* NSNotificationCenter+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Rx.swift"; path = "RxCocoa/Foundation/NSNotificationCenter+Rx.swift"; sourceTree = ""; }; + D2ED8C638B0245A2D38FE292BB9C190D /* UIActivityIndicatorView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIActivityIndicatorView+Rx.swift"; path = "RxCocoa/iOS/UIActivityIndicatorView+Rx.swift"; sourceTree = ""; }; + D3C103C29B17E0EA44D22A95C70041FB /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Implementations/Deferred.swift; sourceTree = ""; }; + D495497C3E2F13810BED4B99CACAEE97 /* RxTableViewDataSourceProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewDataSourceProxy.swift; path = RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift; sourceTree = ""; }; + D52D0EA58BF90FA8F357EA11581554E5 /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Implementations/Zip+Collection.swift"; sourceTree = ""; }; + D654389F1798482CED41BDA1ADF01402 /* ControlEvent.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ControlEvent.swift; path = RxCocoa/CocoaUnits/ControlEvent.swift; sourceTree = ""; }; + D74D7DCF803852212751CFBB1FC3CF8C /* Driver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Driver.swift; path = RxCocoa/CocoaUnits/Driver/Driver.swift; sourceTree = ""; }; + D7629BA368F1573401A5D839A73051E4 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Implementations/Map.swift; sourceTree = ""; }; + DA1DC5325DFC96AA78459F287165EBA5 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Implementations/Zip+arity.swift"; sourceTree = ""; }; + DB93952A89F5FBAC11B7B01CCF1CB4D7 /* Observable+Bind.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Bind.swift"; path = "RxCocoa/Common/Observable+Bind.swift"; sourceTree = ""; }; + DC2D408ACBB078C3685B6C2005571EA9 /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/Implementations/TakeUntil.swift; sourceTree = ""; }; + DE1301E583B81945D8ACCDEE2D1132AE /* RxTabBarDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTabBarDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxTabBarDelegateProxy.swift; sourceTree = ""; }; + E0051A66B8413069430CDAC2130A8305 /* RxTableViewDataSourceType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewDataSourceType.swift; path = RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift; sourceTree = ""; }; + E0D17586255C27E7C56F479CC84F792C /* UICollectionView+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UICollectionView+Rx.swift"; path = "RxCocoa/iOS/UICollectionView+Rx.swift"; sourceTree = ""; }; + E1004CCBDC6E16A1D08DA5B56535C617 /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/Implementations/SkipUntil.swift; sourceTree = ""; }; + E1565E6686382B6BD1D3EA6B3FA099C0 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; + E2C0A7AD94DFF22EF5B97153F3AC613F /* RxTableViewDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewDelegateProxy.swift; path = RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift; sourceTree = ""; }; + E3544ED14FBAC3A843EB57284FA793D1 /* RxCocoa-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxCocoa-prefix.pch"; sourceTree = ""; }; + E40AF20CFAD7FAB0036AC0ABEBA3F7FC /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/Implementations/TakeLast.swift; sourceTree = ""; }; + E4503C81FA4AD8772FFABCEE119CE7EA /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; + E5283DEDC76BDE4D1C06091B0195CD0D /* SharedSequence+Operators+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SharedSequence+Operators+arity.swift"; path = "RxCocoa/CocoaUnits/SharedSequence/SharedSequence+Operators+arity.swift"; sourceTree = ""; }; + E547AA941916DE768E2E55FB66D1B154 /* TextInput.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextInput.swift; path = RxCocoa/Common/TextInput.swift; sourceTree = ""; }; + E5BC3A7288E41845D582B2084649532A /* NSObject+Rx+RawRepresentable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Rx+RawRepresentable.swift"; path = "RxCocoa/Foundation/NSObject+Rx+RawRepresentable.swift"; sourceTree = ""; }; + E7060A1FD245453BAC22D582DFF9F4E8 /* Changeset.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Changeset.swift; path = Sources/DataSources/Changeset.swift; sourceTree = ""; }; + E9BBD35661FC6A2FF8972150D0EBDB16 /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; + E9D1D08446CE4A5AC12159A35BD77F29 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; + EA6A9DE3DFA270724D36E0D3630B805E /* DelegateProxyType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelegateProxyType.swift; path = RxCocoa/Common/DelegateProxyType.swift; sourceTree = ""; }; + EAA08EBA9939A568FD22A56560CF82A6 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; + EAF6C9368AA254574CE4495C48758546 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Implementations/Error.swift; sourceTree = ""; }; + ECA72CF1FC793F094D4DC585D5BFED77 /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; + ED4554BF134A0F8867096D893E533BAD /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; + EE2E42F729F51BBF43E301F48A17DE94 /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Implementations/Buffer.swift; sourceTree = ""; }; + F064B380DADC7AD8C2443C53378E8D7C /* UIAlertAction+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIAlertAction+Rx.swift"; path = "RxCocoa/iOS/UIAlertAction+Rx.swift"; sourceTree = ""; }; + F0E580271F48B4D9CCB860D358BEEA3D /* RxTableViewReactiveArrayDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxTableViewReactiveArrayDataSource.swift; path = RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift; sourceTree = ""; }; + F154381A27E497DC49CBD3B7166739E3 /* RxCollectionViewSectionedAnimatedDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCollectionViewSectionedAnimatedDataSource.swift; path = "Sources/DataSources+Rx/RxCollectionViewSectionedAnimatedDataSource.swift"; sourceTree = ""; }; + F15DBE915B5D4221FC833D492EB0531E /* CollectionViewSectionedDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CollectionViewSectionedDataSource.swift; path = Sources/DataSources/CollectionViewSectionedDataSource.swift; sourceTree = ""; }; F2AFA1C99F51E8831E2A910DDF5E7A3A /* Pods-RxTableViewDemo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RxTableViewDemo-dummy.m"; sourceTree = ""; }; - F317DBB6D505BBB0DC95943D4F69D3AB /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; - F42B348176A6AE942E9D4566E0CDCE4A /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Implementations/Repeat.swift; sourceTree = ""; }; - F5ADDF63B5B91D7C8FA368E154FC02CF /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; - F6AD2AC121321B31FC71C9C8B1CFA0C9 /* UILabel+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILabel+Rx.swift"; path = "RxCocoa/iOS/UILabel+Rx.swift"; sourceTree = ""; }; - F705EC9FD8F6D6C0953B4CD060B3F530 /* DeallocObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DeallocObservable.swift; path = RxCocoa/Common/Observables/Implementations/DeallocObservable.swift; sourceTree = ""; }; - F74739FB1DC050F05B335E9D6AF98846 /* RxCLLocationManagerDelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxCLLocationManagerDelegateProxy.swift; path = RxCocoa/Common/Proxies/RxCLLocationManagerDelegateProxy.swift; sourceTree = ""; }; - F75C6B0786BBF6AAF20B2F6E96335770 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; - F79F2BB0C4F417A271C2E5DA5C84BD4B /* Driver+Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Driver+Operators.swift"; path = "RxCocoa/Common/CocoaUnits/Driver/Driver+Operators.swift"; sourceTree = ""; }; - F7AE05FDC7B02D33FA873B56A3799F91 /* IdentifiableValue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IdentifiableValue.swift; path = Sources/DataSources/IdentifiableValue.swift; sourceTree = ""; }; - F833DECA352CF4719BD8D328C0A604D9 /* ControlProperty+Driver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ControlProperty+Driver.swift"; path = "RxCocoa/Common/CocoaUnits/Driver/ControlProperty+Driver.swift"; sourceTree = ""; }; - F85CD3A198E048E0D42549B45D4F726C /* CLLocationManager+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CLLocationManager+Rx.swift"; path = "RxCocoa/Common/CLLocationManager+Rx.swift"; sourceTree = ""; }; - FB6959360565ACA756599E05FEB87F62 /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; - FBB13270955220EC8A5D77CCE75D46E2 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/Implementations/StartWith.swift; sourceTree = ""; }; - FD84B5FB0FA7E1315DFC9D996118433F /* DelegateProxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelegateProxy.swift; path = RxCocoa/Common/DelegateProxy.swift; sourceTree = ""; }; - FDBDC532CF6FFADB848E3BCD43626D1B /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; - FDEADEB12CF5029DF5DE52C441FA1EEA /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/Implementations/RetryWhen.swift; sourceTree = ""; }; - FFB307DCD42D95B8ABC61419C84E05EC /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; + F2B864AC43C1EE9AFB7BEF9C61018041 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; + F40826E669763178BFF7D91C4B6B193D /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; + F76C32DAC6927855DDBE7ED9E0DFFE78 /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; + FAE6D893E606E509B23161511B21E358 /* UITabBar+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITabBar+Rx.swift"; path = "RxCocoa/iOS/UITabBar+Rx.swift"; sourceTree = ""; }; + FC83987589DF96B1BB905F8EFACC5B2B /* Observable+Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Single.swift"; path = "RxSwift/Observables/Observable+Single.swift"; sourceTree = ""; }; + FC89814AA8AF5F2C7670B068E97BBDC0 /* ItemEvents.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ItemEvents.swift; path = RxCocoa/iOS/Events/ItemEvents.swift; sourceTree = ""; }; + FCC893C5E6BE4610B9B6B8FBF761AB18 /* UISlider+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UISlider+Rx.swift"; path = "RxCocoa/iOS/UISlider+Rx.swift"; sourceTree = ""; }; + FCF427D95B299699812817C049CE4CE8 /* RxDataSources.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxDataSources.xcconfig; sourceTree = ""; }; + FE17138F0A53770C27A74EFD37C78604 /* Variable+SharedSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Variable+SharedSequence.swift"; path = "RxCocoa/CocoaUnits/SharedSequence/Variable+SharedSequence.swift"; sourceTree = ""; }; + FE6DD87F65CE23BAAB2F4A1C3053CD39 /* Driver+Subscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Driver+Subscription.swift"; path = "RxCocoa/CocoaUnits/Driver/Driver+Subscription.swift"; sourceTree = ""; }; + FEF274221E81A61B9AB9FA3643A84920 /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 7C17D0AFAD295CBD2DD52916E3EA79A0 /* Frameworks */ = { + 1A03EEB7E76795BDF81988CCEF466352 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FDEC792822318CA2E07FA279C5ACCA12 /* Foundation.framework in Frameworks */, + 9C689738BD170B254F7A694707509DD4 /* Foundation.framework in Frameworks */, + AB17F387E029A47EF1884695685C0D26 /* RxSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - BE2FE2EA49D32A5D096782E348C10492 /* Frameworks */ = { + 3ABDB9226E1A48B657A37E3EEDF1FCA3 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9746C32B2846598757C8A38E6CB44BF4 /* Foundation.framework in Frameworks */, + C228C2F8BAEF309B358E45B24A920DCE /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - D744C47ACA3538A099A73F942781886A /* Frameworks */ = { + 537DA27E16897A383E273200D2D0258B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B3E70C89FEE9A197F9CA44BCE65616D6 /* Foundation.framework in Frameworks */, - C7B3119B5EA8CF76E315AF247AA27A1B /* RxSwift.framework in Frameworks */, + 226971DE23902B9A089FE1CB4DCAA66F /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - F775659A923D78523CEFB469E4FA74ED /* Frameworks */ = { + 76E37633EA369D82B1DBF52CCCB94380 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AC95496269EED64F8ED5D6FC9B5C1343 /* Foundation.framework in Frameworks */, - 344728B869744A4FFD12969491706D59 /* RxCocoa.framework in Frameworks */, - ED22E780421DCA998965FCC17A2B3F76 /* RxSwift.framework in Frameworks */, + E2EFAA33B224F51FE879996FDA494C2A /* Foundation.framework in Frameworks */, + 325CDA87ED9C6D4AE69823BFE72634AE /* RxCocoa.framework in Frameworks */, + EE7E244EAB0FA2D9DB3B536229E25312 /* RxSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 0BC5C3F438DCFA60D2AF80E688150F1A /* Support Files */ = { + 3F50B2E99465F7C23E7CC4D6F6512F4B /* RxCocoa */ = { isa = PBXGroup; children = ( - 64B9B5847F5BA624518F67E589B8AAF5 /* Info.plist */, - 9CDCFF786752320D810B388EB38B0E0E /* RxCocoa.modulemap */, - BCFF00744C5A1F85DBFF3A180FDA2ACE /* RxCocoa.xcconfig */, - D95D8ACFAEE78C376ED41959325B60D0 /* RxCocoa-dummy.m */, - 55B5E0F8A42B63810EECF9A4BD87D45A /* RxCocoa-prefix.pch */, - 98A3B272DED1C3FFAB35F9960988B669 /* RxCocoa-umbrella.h */, + 5C8FCECA2AC0678E3E81C9785027BF10 /* _RX.h */, + A59C14BF6BE255CA7CDE190D2B5C118A /* _RX.m */, + 2B1946348174826F2E14A6A1DD8DF2F5 /* _RXDelegateProxy.h */, + 7BD5D588AAC043DA6B8E44798E30A26D /* _RXDelegateProxy.m */, + 0AB4ED031A3078660AC89780D6892A22 /* _RXKVOObserver.h */, + A0E15A68BFE737B4ABC80BF534498CEE /* _RXKVOObserver.m */, + 0DB09772F77198F67371FAF0E024B4CD /* _RXObjCRuntime.h */, + B4336587650CA1BE7C1383CE27D78FDD /* _RXObjCRuntime.m */, + C0267D21A277D9BCFAFBD0373A5C4C27 /* Bag.swift */, + D654389F1798482CED41BDA1ADF01402 /* ControlEvent.swift */, + AD6F3192EA9B6A26016AAE0D0AEE6151 /* ControlEvent+Driver.swift */, + 6466E3293A8FBCED83909AE63C998D52 /* ControlProperty.swift */, + B2B8325346DC1B197EACFC386C0AD44B /* ControlProperty+Driver.swift */, + 70B9A6F940B9E1C17A9B79DD42D3229D /* ControlTarget.swift */, + 1EABB406476742E787C28F02080FB25B /* DelegateProxy.swift */, + EA6A9DE3DFA270724D36E0D3630B805E /* DelegateProxyType.swift */, + 0514789A279CC2BB38F50920421D5499 /* DispatchQueue+Extensions.swift */, + D74D7DCF803852212751CFBB1FC3CF8C /* Driver.swift */, + FE6DD87F65CE23BAAB2F4A1C3053CD39 /* Driver+Subscription.swift */, + C64B127FE517B8381A0CA7837861480E /* InfiniteSequence.swift */, + FC89814AA8AF5F2C7670B068E97BBDC0 /* ItemEvents.swift */, + 4F2476DEBAA382E2E914042A1D89F671 /* KVORepresentable.swift */, + AE1A26A4EDC1E35AA985515078033CD0 /* KVORepresentable+CoreGraphics.swift */, + A0B2BE316CCC751E39D31F45CC238A3B /* KVORepresentable+Swift.swift */, + AD87B02A5CCD9A86CB1466EF1329BFB5 /* Logging.swift */, + 40641DD8AC285294383CED3CAB0C215A /* NSLayoutConstraint+Rx.swift */, + D2B78FC2120BDDC9307B1E6EBCE19A53 /* NSNotificationCenter+Rx.swift */, + CFAFC0E14D28F48AED1B736EF5E9A5E0 /* NSObject+Rx.swift */, + 365401E220E33E4556A50402E209ABCC /* NSObject+Rx+KVORepresentable.swift */, + E5BC3A7288E41845D582B2084649532A /* NSObject+Rx+RawRepresentable.swift */, + 24C447B0686A8743C6BE6822CC1BC469 /* NSTextStorage+Rx.swift */, + DB93952A89F5FBAC11B7B01CCF1CB4D7 /* Observable+Bind.swift */, + 4E5AB4F7B3F45A791743F678F4075274 /* ObservableConvertibleType+Driver.swift */, + 5DD7CB5736774192BEF2CDFD8A6C6F87 /* ObservableConvertibleType+SharedSequence.swift */, + A29CD84AEE57E781369C5248490C7B95 /* Platform.Darwin.swift */, + 7BEBE0A95FD3996906F40DC3BAFD0501 /* Platform.Linux.swift */, + 13B00433C133AF960134BFAF587EC839 /* PriorityQueue.swift */, + EAA08EBA9939A568FD22A56560CF82A6 /* Queue.swift */, + B8FCDA60BE0589C6ABC254986EAF4BF0 /* RxCocoa.h */, + 7C02B7D8A52AB7C160EFC99EBE8BD9C3 /* RxCocoa.swift */, + 24061A57EA0C9D585615887AA5475671 /* RxCocoaObjCRuntimeError+Extensions.swift */, + 3A491E0C9A736CDD8C4E8B6CFD2BFC20 /* RxCocoaRuntime.h */, + 127703607F1828A678FC26281986B1CE /* RxCollectionViewDataSourceProxy.swift */, + 19E4179A74FD91A109CC77170AC1C07D /* RxCollectionViewDataSourceType.swift */, + 6751B86FC81127FB8BA5F6A9E15F3207 /* RxCollectionViewDelegateProxy.swift */, + 03B06FD86B4E625B3BDF15946849B290 /* RxCollectionViewReactiveArrayDataSource.swift */, + 12DF80D8438E62F520A580A722B3EEC3 /* RxPickerViewDelegateProxy.swift */, + 9264C5CCC62EF6F7A6090D773A540B76 /* RxScrollViewDelegateProxy.swift */, + 4A724BF8AF9AA6448CDF906A2DD85467 /* RxSearchBarDelegateProxy.swift */, + 79CF583F517003EEEBBA175950E58FF0 /* RxSearchControllerDelegateProxy.swift */, + BD51F4CAC068A7C8573A9D1CF3DB552E /* RxTabBarControllerDelegateProxy.swift */, + DE1301E583B81945D8ACCDEE2D1132AE /* RxTabBarDelegateProxy.swift */, + D495497C3E2F13810BED4B99CACAEE97 /* RxTableViewDataSourceProxy.swift */, + E0051A66B8413069430CDAC2130A8305 /* RxTableViewDataSourceType.swift */, + E2C0A7AD94DFF22EF5B97153F3AC613F /* RxTableViewDelegateProxy.swift */, + F0E580271F48B4D9CCB860D358BEEA3D /* RxTableViewReactiveArrayDataSource.swift */, + 95FAF9E104BD90785AA592AF3BD731B3 /* RxTarget.swift */, + A27D37507872FF62F32DFB99F25836D5 /* RxTextStorageDelegateProxy.swift */, + 3C5BEC4447AEEC1DBBD28570BD35EC65 /* RxTextViewDelegateProxy.swift */, + 1E2F2CCA79D89A37403B1D5F0301A76B /* RxWebViewDelegateProxy.swift */, + 4D9ACA2F2E0F34F4D2AE9FD326D9430A /* SectionedViewDataSourceType.swift */, + 78BDDEDD1A47A3FAEBEB0220797BE299 /* SharedSequence.swift */, + C4CBA2BAB8C40F798DEBE7CA11359018 /* SharedSequence+Operators.swift */, + E5283DEDC76BDE4D1C06091B0195CD0D /* SharedSequence+Operators+arity.swift */, + E547AA941916DE768E2E55FB66D1B154 /* TextInput.swift */, + D2ED8C638B0245A2D38FE292BB9C190D /* UIActivityIndicatorView+Rx.swift */, + F064B380DADC7AD8C2443C53378E8D7C /* UIAlertAction+Rx.swift */, + 6744986236AA450C4E9302AA70ECAF85 /* UIApplication+Rx.swift */, + BF4E6389098BE0EAE3DE7910B6CB879B /* UIBarButtonItem+Rx.swift */, + B380E0576862E2CBCF039C17ABC697EB /* UIBindingObserver.swift */, + 10633C42E25FD1F7F1C7EF52C46BD76E /* UIButton+Rx.swift */, + E0D17586255C27E7C56F479CC84F792C /* UICollectionView+Rx.swift */, + 1307A0286B0234D1232190B72D10E2F8 /* UIControl+Rx.swift */, + BE262CAD5DB3E5BDE032447B163A5015 /* UIDatePicker+Rx.swift */, + 810029361B36506BB7FD50E2FE03F1C5 /* UIGestureRecognizer+Rx.swift */, + C4C8C9BDEE366BCBC316FFC3334C2833 /* UIImageView+Rx.swift */, + 3530C7475412D4E9E9AA6FFF82ADE45A /* UILabel+Rx.swift */, + B4F88ECA9634C669655B255E60A28780 /* UINavigationItem+Rx.swift */, + B1AB286AD7A86211D6472DAB9979F289 /* UIPageControl+Rx.swift */, + 4378606ACBC0E0F9B45918A454192827 /* UIPickerView+Rx.swift */, + 8CC69B6B28CF138AE1FDCCCFD3885AC8 /* UIProgressView+Rx.swift */, + C8FF6BF3429FD6E36FEC130258CCD8C0 /* UIRefreshControl+Rx.swift */, + AE0FF21EE6A82F6A64508A8FCEFD846E /* UIScrollView+Rx.swift */, + 3A77476BE569C811D03B26630F89E8C0 /* UISearchBar+Rx.swift */, + BE96C109C3FA524C0A497102331903A4 /* UISearchController+Rx.swift */, + 05197BE4DF3E8C32CFC8B30BD20C9304 /* UISegmentedControl+Rx.swift */, + FCC893C5E6BE4610B9B6B8FBF761AB18 /* UISlider+Rx.swift */, + 862434FB6CF031CD1771E4628418BA20 /* UIStepper+Rx.swift */, + BF8BA2BB9371A2D5589996E379CE78EF /* UISwitch+Rx.swift */, + FAE6D893E606E509B23161511B21E358 /* UITabBar+Rx.swift */, + 50D29CA3427E3B8D414F0C1FDE2BEFDD /* UITabBarController+Rx.swift */, + AB6633997DFB57381792DD05E21B11F1 /* UITabBarItem+Rx.swift */, + 8B4AB91342F61FAB8AA0223932F7BD8D /* UITableView+Rx.swift */, + 9461F9CD3C08AECF8B5E84F30234FC7C /* UITextField+Rx.swift */, + C184188A26EA5CB2CF09E94C621ED10A /* UITextView+Rx.swift */, + BA27C8A01F351F55BBBE1C83E12D08CC /* UIView+Rx.swift */, + 98B83B2A3FE4B3B16036852D9ECACB7F /* UIViewController+Rx.swift */, + 1845E70698AD1C4873D0FC2DAE56211B /* UIWebView+Rx.swift */, + 2DD4582A12EF95BDF70518B0344EC0BE /* URLSession+Rx.swift */, + B92A15158431EB7AC93808840DD462BD /* Variable+Driver.swift */, + FE17138F0A53770C27A74EFD37C78604 /* Variable+SharedSequence.swift */, + 4DF7D239CA7C24BF6834A78233D4C39F /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/RxCocoa"; + name = RxCocoa; + path = RxCocoa; sourceTree = ""; }; - 50D2337BAC4620391C42D733FEA79E56 /* RxCocoa */ = { + 4DF7D239CA7C24BF6834A78233D4C39F /* Support Files */ = { isa = PBXGroup; children = ( - CB53C15A732C6BBD1E9DFC72D8973B41 /* _RX.h */, - EB946CCE233F12221EDC728507945C2E /* _RX.m */, - 80BB7690641103D11923A61E6D30A8FB /* _RXDelegateProxy.h */, - EFACC162159C40B3EF2304B96D5937EE /* _RXDelegateProxy.m */, - 6C942C00ED1563E5B059D9A9BA59965C /* _RXKVOObserver.h */, - 0ED138F98853F93C4CBA5C4D5E4E4673 /* _RXKVOObserver.m */, - 49C5192AD95FB6638E5369DEA4298E9C /* _RXObjCRuntime.h */, - 6154396DF3F83867E1E0E6690F9BA673 /* _RXObjCRuntime.m */, - F85CD3A198E048E0D42549B45D4F726C /* CLLocationManager+Rx.swift */, - A94797B637505C0BDDBDF6AA95C224BF /* ControlEvent.swift */, - 181357241FEB2F5FAFC9E9DACAA53EA7 /* ControlEvent+Driver.swift */, - 7C69ADF8078822CBD19CD14F47B6F9E3 /* ControlProperty.swift */, - F833DECA352CF4719BD8D328C0A604D9 /* ControlProperty+Driver.swift */, - 45E4E56B19CB2CF8D08539C369B1BBE4 /* ControlTarget.swift */, - F705EC9FD8F6D6C0953B4CD060B3F530 /* DeallocObservable.swift */, - FD84B5FB0FA7E1315DFC9D996118433F /* DelegateProxy.swift */, - 0BC0A51E37010BD270FA3FBBAED79AC9 /* DelegateProxyType.swift */, - 1057BD977AAFAB283DE334152CC10DE4 /* Driver.swift */, - F79F2BB0C4F417A271C2E5DA5C84BD4B /* Driver+Operators.swift */, - 2F7BC778C0B7CF2F20C295ED07B5C2C0 /* Driver+Operators+arity.swift */, - 7E52DC1114EF77FF4BCBFCE7039822D1 /* Driver+Subscription.swift */, - D959AA83F85AE923BED4EA7F46CE92C4 /* ItemEvents.swift */, - 041EC25768988058038140847684499C /* KVOObservable.swift */, - 5C009E7674A00A4A0F1A66122FA348D0 /* KVOObserver.swift */, - A66C8D88E7EDFB9029D04AD389F7574D /* KVORepresentable.swift */, - DC03A4068F8149A09EAEEEA2E4311D58 /* KVORepresentable+CoreGraphics.swift */, - 6E689C6EAA268B984911F48829C5FA4C /* KVORepresentable+Swift.swift */, - BC437B95850CF049580A759EF78FCD22 /* Logging.swift */, - 334C0CB4E9C795C172F30CFE3ACC067A /* MessageSentObserver.swift */, - 7F7B6F514CE43EB2B495A8CB396A3172 /* NSLayoutConstraint+Rx.swift */, - DA1501FFEC2764B000C75C6FE6720688 /* NSNotificationCenter+Rx.swift */, - EA5750D9CACFE39064BC26FE1C49601C /* NSObject+Rx.swift */, - 0AD04472D0C62247385153DC2EDB6DA9 /* NSObject+Rx+KVORepresentable.swift */, - 9DA0B4B2601B0524D3150E6AC5425223 /* NSObject+Rx+RawRepresentable.swift */, - D01EFD8D639D2DAEF40FAFA2B595BC01 /* NSTextStorage+Rx.swift */, - 03739089D04D7EC6A7E10167130E076C /* NSURLSession+Rx.swift */, - E760976DAA7ED684F2644D09D2EB09AA /* Observable+Bind.swift */, - 20B63C1DC3468AF6F169750FCF27F07A /* ObservableConvertibleType+Driver.swift */, - F74739FB1DC050F05B335E9D6AF98846 /* RxCLLocationManagerDelegateProxy.swift */, - 9EB182837D2AF8D9E96C31E7A89B7295 /* RxCocoa.h */, - 253F3074EC6229806D793EE5BC790DD7 /* RxCocoa.swift */, - 5A790E621CBEA7E8400BB9E01A92D81D /* RxCollectionViewDataSourceProxy.swift */, - 3E20EB5FFD6EE7A42F616691F9601065 /* RxCollectionViewDataSourceType.swift */, - 46E7A719D313A9EBCA713AEE2E2C1C51 /* RxCollectionViewDelegateProxy.swift */, - 08FD137986322B00234DE85B29CA20D9 /* RxCollectionViewReactiveArrayDataSource.swift */, - 446EB30B1E367F1197A2BA1655A7DF5B /* RxImagePickerDelegateProxy.swift */, - 4BF3F28F854FF205AB52C03D0A2D3BCC /* RxScrollViewDelegateProxy.swift */, - E082772BF515653ED7A782FC0768378D /* RxSearchBarDelegateProxy.swift */, - 5F2999F516C37F7542C0800AA5232161 /* RxSearchControllerDelegateProxy.swift */, - 3037F1D4AF2721851F9E43056218F7ED /* RxTableViewDataSourceProxy.swift */, - 6456747197F30D6470CDA30C7EB54084 /* RxTableViewDataSourceType.swift */, - 65717987EB77FB6A73931AA405DFAFB3 /* RxTableViewDelegateProxy.swift */, - DD27C7D2E4AB5ECE09DB937383CCBFA5 /* RxTableViewReactiveArrayDataSource.swift */, - BA8DA65540E3CBBB74078941C198EDA8 /* RxTarget.swift */, - 32EE3DC65104719851158ECB7F9B2D91 /* RxTextStorageDelegateProxy.swift */, - BC00A785BECB74CD4E13A567F3498EF9 /* RxTextViewDelegateProxy.swift */, - CD167D1596E967B945491E05A371B0A4 /* SectionedViewDataSourceType.swift */, - 73C2DB4767095B7BF87B87CB3F2BA027 /* UIActivityIndicatorView+Rx.swift */, - BB060A574526AEEFDE79D9F1507EBEA9 /* UIApplication+Rx.swift */, - A50E62FE23EAAD062EFA44BC8C1A2B9A /* UIBarButtonItem+Rx.swift */, - 4A37D2BA21FA863FBC3AAA3A8DDEE2A4 /* UIBindingObserver.swift */, - E200AA2D1F8A26811491BCC4ECEDF1CF /* UIButton+Rx.swift */, - 479F065BFA55D3FB755A21D027D0D77A /* UICollectionView+Rx.swift */, - DA7414D0265E5636FAF93F0A7359FA05 /* UIControl+Rx.swift */, - 05F4E541AC000E543D8FA5837D3E79D5 /* UIDatePicker+Rx.swift */, - 8A23481F6AC8BB36B96833439716FC94 /* UIGestureRecognizer+Rx.swift */, - 893108B148617406E5E52E049FE18947 /* UIImagePickerController+Rx.swift */, - A30E8B5A4FF0F7768B5DB43C954822C7 /* UIImageView+Rx.swift */, - F6AD2AC121321B31FC71C9C8B1CFA0C9 /* UILabel+Rx.swift */, - 7CE48245E99517E338431B5A4246A91F /* UIProgressView+Rx.swift */, - 89568F01DA538A84617B3A81A1FC28A9 /* UIRefreshControl+Rx.swift */, - 87D39C04E658CDA40D6AA0E86EB0F583 /* UIScrollView+Rx.swift */, - 67532E9C78A05F28C589045CFC327363 /* UISearchBar+Rx.swift */, - 7824E09ABB12A10694F86A691318B852 /* UISearchController+Rx.swift */, - 9C02D582FFECC19580D960EDAA83BEFD /* UISegmentedControl+Rx.swift */, - E6E70F60941C0AE3C8AF49CB3D6E1F73 /* UISlider+Rx.swift */, - ECFD9ADBC4BB16D2EAE1A500F25C3D07 /* UIStepper+Rx.swift */, - EDF9DB536B519873D02E74EC58EE142B /* UISwitch+Rx.swift */, - 72748232D690009B11E33C78D1F54D10 /* UITabBarItem+Rx.swift */, - 5A6BAB0858F38F20CCA7C965005D2C73 /* UITableView+Rx.swift */, - 3FF53FDAB2CF0CE6DC7E119F20DB7FA7 /* UITextField+Rx.swift */, - 855FBA980626C92A023773B91B79761E /* UITextView+Rx.swift */, - 743466BA119447B722D28093BDCB06A2 /* UIView+Rx.swift */, - B4CA10C75F652D494B168D293B95819C /* Variable+Driver.swift */, - 0BC5C3F438DCFA60D2AF80E688150F1A /* Support Files */, + 9CBE50AEC2D8B11BDFC9D690AAD6BF8B /* Info.plist */, + 6C1B26C991156A69A48B6A11D09E6237 /* RxCocoa.modulemap */, + C8F5BD14FBA3B56B4C1A34A6ACBB4CB3 /* RxCocoa.xcconfig */, + 0C661E1633FD2A389545DF68756A930A /* RxCocoa-dummy.m */, + E3544ED14FBAC3A843EB57284FA793D1 /* RxCocoa-prefix.pch */, + C79C0F60B88BADD8F7C07431BF109F1F /* RxCocoa-umbrella.h */, ); - path = RxCocoa; + name = "Support Files"; + path = "../Target Support Files/RxCocoa"; sourceTree = ""; }; 60E9D05C340D674AF2267BF83003ED4F /* Products */ = { @@ -765,7 +833,7 @@ children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, E265089FB324163F97DD1AF30AD09129 /* Frameworks */, - 8327BEE3B50C6E098F7537F7D4C8FBE6 /* Pods */, + D93ABE7B584EFABC581E38B36949C3AF /* Pods */, 60E9D05C340D674AF2267BF83003ED4F /* Products */, 7DAED88A827F8B5CB2338B95C0EDCDB1 /* Targets Support Files */, ); @@ -789,353 +857,364 @@ path = "Target Support Files/Pods-RxTableViewDemo"; sourceTree = ""; }; - 8327BEE3B50C6E098F7537F7D4C8FBE6 /* Pods */ = { + 832C8BEC007A801FF070353498D4C29F /* RxSwift */ = { isa = PBXGroup; children = ( - 50D2337BAC4620391C42D733FEA79E56 /* RxCocoa */, - 86C35E014D06200B23E4ABAD3ADB92BE /* RxDataSources */, - B0AD33B7FFA2BDDB2C00C5509200C5F6 /* RxSwift */, + 00D74670F352B6A2CB4241A11DBAE8B2 /* AddRef.swift */, + 7F0545435CD3C2A53F56B1D8393D728E /* Amb.swift */, + 3BB83A405F56A8C0BFA54FCC352D09BC /* AnonymousDisposable.swift */, + 1D7CDFCB6B25D9EDBD84E3DD2BEFD817 /* AnonymousInvocable.swift */, + B1E4BE5E1978E4A55DA8CA00E73743AF /* AnonymousObservable.swift */, + 7E2BE220D80F23B167D1A66107E6169B /* AnonymousObserver.swift */, + 16208F035A97D8DAA5B39E645C1C4F10 /* AnyObserver.swift */, + BD4BB38BBC43CC6CBE9A5E5B74BFB32E /* AsyncLock.swift */, + 10F7C2E0701280D569FB3712A8776205 /* Bag.swift */, + 19596F590330DF7D3A07E08F5F2B5C74 /* Bag+Rx.swift */, + A90F317F493C90EAE016FBF5DFB2E119 /* BehaviorSubject.swift */, + C732FA2FD7072204C390B99B2F73AC6B /* BinaryDisposable.swift */, + F40826E669763178BFF7D91C4B6B193D /* BooleanDisposable.swift */, + EE2E42F729F51BBF43E301F48A17DE94 /* Buffer.swift */, + F76C32DAC6927855DDBE7ED9E0DFFE78 /* Cancelable.swift */, + 9FE327A1DD4D599C36D7DE80D99C8223 /* Catch.swift */, + D152A471C350F907242B93C07D985920 /* CombineLatest.swift */, + 4D5B73DC7EBEB64055E983754AB36F05 /* CombineLatest+arity.swift */, + 6FE108D8124D02DD3B9711D9039959CC /* CombineLatest+Collection.swift */, + CBF478DBBC6F39BD90331969E24299C6 /* CompositeDisposable.swift */, + AE688C443FEBD47CF88E6E9ACE777F92 /* Concat.swift */, + 869AE380E194D3CE7C60FD4697F8458B /* ConcurrentDispatchQueueScheduler.swift */, + C8238596AA612F349E4F3BAA4C2C19A5 /* ConcurrentMainScheduler.swift */, + 684514ABF683B577B531A0128E916F77 /* ConnectableObservable.swift */, + 051378B8AFFF58F217C73BE5B488A1AE /* ConnectableObservableType.swift */, + BAFD2858013A4A0FC8AA7ABBBA200B87 /* CurrentThreadScheduler.swift */, + BCB4E3C5E11416C80C03BB1B27D95D2F /* Debug.swift */, + 0D994AA39CBDC3F270ED98EC0473D73E /* Debunce.swift */, + D3C103C29B17E0EA44D22A95C70041FB /* Deferred.swift */, + 32F757633B0F07C4957B8C3231604669 /* Delay.swift */, + 94855BF33184CE8D6AED90AFECF18721 /* DelaySubscription.swift */, + E9D1D08446CE4A5AC12159A35BD77F29 /* DispatchQueue+Extensions.swift */, + 0F910801F5540E10170E5776FFAB3A20 /* DispatchQueueConfiguration.swift */, + E9BBD35661FC6A2FF8972150D0EBDB16 /* Disposable.swift */, + 93FB9D0F50A61FD9DA2D571E9BF17630 /* Disposables.swift */, + 90991732D0FE5C4A62BABB930191D474 /* DisposeBag.swift */, + A9CD6CFF97E31C65FE26ADA366FD3382 /* DisposeBase.swift */, + 7D28CE0B28254A169E2C9EB6284C0CDA /* DistinctUntilChanged.swift */, + 2510927F7010746B9E8CC5406B9739AE /* Do.swift */, + 9FC642622CB0847042301AA4DCDC48EC /* ElementAt.swift */, + 189E20B84B8A214335F806CEA7A0D83F /* Empty.swift */, + EAF6C9368AA254574CE4495C48758546 /* Error.swift */, + E1565E6686382B6BD1D3EA6B3FA099C0 /* Errors.swift */, + 79737138836EA4257B36989FDF985E26 /* Event.swift */, + 9A9B27F03951F457975B3E4574D16D7C /* Filter.swift */, + C4F5FC72244269F775F2D662CF98560C /* Generate.swift */, + C7EE2C16CBE8B75D8267C33C933851E9 /* HistoricalScheduler.swift */, + 2ECC6673140C7D1193479B46A85F91B3 /* HistoricalSchedulerTimeConverter.swift */, + 2F390118714681385CA5229413841772 /* ImmediateScheduler.swift */, + 58A1CB0ACC84D50250128B3B7B07F7FB /* ImmediateSchedulerType.swift */, + 43AAB0393652252135400A32CAD4EFAA /* InfiniteSequence.swift */, + FEF274221E81A61B9AB9FA3643A84920 /* InvocableScheduledItem.swift */, + A4629741798D2D8BEE194A348DFF9BA1 /* InvocableType.swift */, + C9880F56A5D1D3CF95FDE16F92114588 /* Just.swift */, + 7579FBC648A274C123A55948C001A701 /* Lock.swift */, + 0EA5CB8391A8D19DD4A88FF8035380EA /* LockOwnerType.swift */, + 6155299EDA67841B6C93E87FBA7B9D98 /* MainScheduler.swift */, + D7629BA368F1573401A5D839A73051E4 /* Map.swift */, + 377B58AE725891176FDFA20ADE58BB37 /* Merge.swift */, + 6D91A20A5ECE9166064F7F1F6FFA8A17 /* Multicast.swift */, + B4D35493523A754297AD996F29CB67CC /* Never.swift */, + 8BD41054BE944C2519276E3064A12BC8 /* NopDisposable.swift */, + ED4554BF134A0F8867096D893E533BAD /* Observable.swift */, + 99CE535BBDC0C2CB7BBA0EE9CC2AEA88 /* Observable+Aggregate.swift */, + 3FB6A05C08676ECAF208C0E888D163A2 /* Observable+Binding.swift */, + B6E39A688B5EA2D9711749166DE954B2 /* Observable+Concurrency.swift */, + 73149E7D9DE54413D26FEC89897CDF81 /* Observable+Creation.swift */, + 9665BDD20C6F6A0EC28B094969176995 /* Observable+Debug.swift */, + 8BFAD5F5ADE258F03BEA2077D0A71A92 /* Observable+Multiple.swift */, + FC83987589DF96B1BB905F8EFACC5B2B /* Observable+Single.swift */, + 013FBA8A5113AAF4783874719F359C6D /* Observable+StandardSequenceOperators.swift */, + 3DF567303460AFC3F6889F792F6249F6 /* Observable+Time.swift */, + 3D762629889D889F112E7D816858549E /* ObservableConvertibleType.swift */, + 832B6FA48CE3355090F92ADC2DD99479 /* ObservableType.swift */, + 7AE761CE7535CAFB9FB8480F2B3CA51A /* ObservableType+Extensions.swift */, + 19AD52A69E88FFC1F95266147C75FF09 /* ObserveOn.swift */, + 03452D24880A96E98449D89748B08B1A /* ObserveOnSerialDispatchQueue.swift */, + CDC0736D33646BED3FA3AC26C5B5B507 /* ObserverBase.swift */, + 87146B45AEBD0C6D18AC8BFB71B01AEA /* ObserverType.swift */, + 09FAF9E2225308DFFF2B9332B6024009 /* OperationQueueScheduler.swift */, + BA782D0DF31E10E208B914F67B7A277F /* Optional.swift */, + C2A5B3CA83E3495E9AA59559311BA7E6 /* Platform.Darwin.swift */, + C8C10F2FCFD40F473F4F8F4915608214 /* Platform.Linux.swift */, + E4503C81FA4AD8772FFABCEE119CE7EA /* PriorityQueue.swift */, + A4264024D6AC172108C4A7F9E55AB380 /* Producer.swift */, + 9C9505C24933BEA431DD25371A190E97 /* PublishSubject.swift */, + F2B864AC43C1EE9AFB7BEF9C61018041 /* Queue.swift */, + 0F3443DD1A1DD5FAEEFBB9B6B74727AA /* Range.swift */, + A6BE2F8EED54B4656A049C330711FA96 /* Reactive.swift */, + 4006BEDD4DAA52848CF3B216376E9CAC /* RecursiveScheduler.swift */, + 3024C065E240FAA704FCBD8A54DC715F /* Reduce.swift */, + 3A6F855B744AE06E7859E4139BC30513 /* RefCount.swift */, + CFE92D0B5B2A0EDD65C4EE276D3ED1A7 /* RefCountDisposable.swift */, + 1F45BF3B35C2D03FE86935B38C12F3CD /* Repeat.swift */, + 4B9EDF092ADE13227D6481C788DCF1AC /* ReplaySubject.swift */, + 7C6A0CADA7469243BCCEBBA7B9A98E48 /* RetryWhen.swift */, + 869AC1C17901CD096909FB0EE91579E1 /* Rx.swift */, + CB1F493DC4C7C329871D6869A276715C /* RxMutableBox.swift */, + 5FEB07B88186F63A0F1F073AC6738814 /* Sample.swift */, + 3DF40BE60D9A9AD76037CE2D55FE5D0B /* Scan.swift */, + 4D15B3C86D48DC76CA660652C6407860 /* ScheduledDisposable.swift */, + 04CC7E2DC52F26D1F514677B6A7CF665 /* ScheduledItem.swift */, + 4B72C441E4F2A3D0313CEA984E9E7E23 /* ScheduledItemType.swift */, + 183F1D4AFB5A34EA924635B16C80F7ED /* SchedulerServices+Emulation.swift */, + 97B773A121AC39E64B90D3B8CBF63C8E /* SchedulerType.swift */, + B24921F8011FCA825C4993B5604EA685 /* Sequence.swift */, + ECA72CF1FC793F094D4DC585D5BFED77 /* SerialDispatchQueueScheduler.swift */, + 1BD51A634092E983F8E7DE121A9496E9 /* SerialDisposable.swift */, + 172A5863E3187787382DCC9E848399B0 /* ShareReplay1.swift */, + 820C50078774408B612769C4E4EF4678 /* ShareReplay1WhileConnected.swift */, + 23999F5B8E8DE251A3398353C7B0D17E /* SingleAssignmentDisposable.swift */, + 852130AA68065C3ED52E035A0CA8740C /* SingleAsync.swift */, + 657C6DE400A4C5867CB148CD837AD21D /* Sink.swift */, + 4E82F975CF41C0107B973778D2918320 /* Skip.swift */, + E1004CCBDC6E16A1D08DA5B56535C617 /* SkipUntil.swift */, + 17043A6D116B83A4A676764185F788AC /* SkipWhile.swift */, + D1BC94DD14D9C23D96A534A70158DB94 /* StartWith.swift */, + A6CCBC945AEA3F09360E82953F3BA52D /* String+Rx.swift */, + 0AB233A0E4C3CC531D351E5B11EE50AC /* SubjectType.swift */, + 339F2C69A27359156735F6EB36951899 /* SubscribeOn.swift */, + B510A4164AA4F979F46D323A8E5F9539 /* SubscriptionDisposable.swift */, + 9DD03E271530955B973BB8A7F2D89FC8 /* Switch.swift */, + 5408250A6EB0BEC07FA9A5A43BDA62A6 /* SynchronizedDisposeType.swift */, + 9B5DE634E75FA6D457829430BC81E655 /* SynchronizedOnType.swift */, + C84AC925EEE76D8FC0BA48C8219E9DC1 /* SynchronizedSubscribeType.swift */, + 523A789FABFAA08BE5E5E84E4AC47A3A /* SynchronizedUnsubscribeType.swift */, + 9B1247B87FD19B5DA573A2E7C0D2B6DC /* TailRecursiveSink.swift */, + 8086FD8D79795386146C374A3AA16F14 /* Take.swift */, + E40AF20CFAD7FAB0036AC0ABEBA3F7FC /* TakeLast.swift */, + DC2D408ACBB078C3685B6C2005571EA9 /* TakeUntil.swift */, + B913C81B23EDE7019262E54ECB2125F3 /* TakeWhile.swift */, + 6C0307B25815F14F6DC4D9FC4E392DFD /* Throttle.swift */, + 11D7A0E4E9ACF5AC99DFFDE69C51A585 /* Timeout.swift */, + 5147159BE6C37D791066D042FAED0057 /* Timer.swift */, + 5B7E92FE04C7E040B3654E7B37B3761C /* ToArray.swift */, + 9915AB6370C154295AA80909F00CC339 /* Using.swift */, + A2ED51F3FC3DA3D63830EA042CBB21F3 /* Variable.swift */, + 5D2EE4A4251F29AB74E1D07AD9F6EEEA /* VirtualTimeConverterType.swift */, + 736B78D8E1D065433E242C88D1B819F5 /* VirtualTimeScheduler.swift */, + 37AE2CB072F74B4206AFA09CCC63A1B1 /* Window.swift */, + 59F3AE0069577C62D548CDB17D6C1A47 /* WithLatestFrom.swift */, + A7DB4309CC71C0ACDEC46942D13573EC /* Zip.swift */, + DA1DC5325DFC96AA78459F287165EBA5 /* Zip+arity.swift */, + D52D0EA58BF90FA8F357EA11581554E5 /* Zip+Collection.swift */, + 9CD28C0ADA3171B5A4CF26F752749ABB /* Support Files */, ); - name = Pods; + name = RxSwift; + path = RxSwift; sourceTree = ""; }; - 8506E450AEF2785711328BDEA81AE5CC /* Support Files */ = { + 8722AD5B1F00EF7FFFF665428E85EB50 /* RxDataSources */ = { isa = PBXGroup; children = ( - 5C36FD926025E3C1D23098864EEBD5F2 /* Info.plist */, - B6B3EA1B48AF68C70AF859E9F401419C /* RxSwift.modulemap */, - 8B6204C70778BA7BEC8E6E8912A792CF /* RxSwift.xcconfig */, - 0D810981FFE2D0972C135671069A3506 /* RxSwift-dummy.m */, - 888B5D578F2363DF0C6A937B23D9F91A /* RxSwift-prefix.pch */, - 702674FD5E17EFDE9994190E75E6DE8D /* RxSwift-umbrella.h */, + 6D5B8808945E2DED4FC91DFA3009D35C /* AnimatableSectionModel.swift */, + 2A4FB40C6AF984668836B9A72545E3F7 /* AnimatableSectionModelType.swift */, + 0BC70151EB564F794525C7A70F7BF0C4 /* AnimatableSectionModelType+ItemPath.swift */, + 210DE31176244C428519FCFE436AA1B8 /* AnimationConfiguration.swift */, + 32DF670CEE7A47B53258D6A78B53508F /* Array+Extensions.swift */, + E7060A1FD245453BAC22D582DFF9F4E8 /* Changeset.swift */, + F15DBE915B5D4221FC833D492EB0531E /* CollectionViewSectionedDataSource.swift */, + 743C1B565B4FB9A488667C0279E27C6C /* DataSources.swift */, + 6BC5AA66E878C50B3DB4B7509F1168AB /* Differentiator.swift */, + 38155259B88266E27F21AB107279C602 /* FloatingPointType+IdentifiableType.swift */, + 8917BF3C86ECE85EAE8715AE790058D0 /* IdentifiableType.swift */, + 221E107E86C50FB6E44F30B981110B24 /* IdentifiableValue.swift */, + 53A508A97A09EC388234D8F1D8DCAEEC /* IntegerType+IdentifiableType.swift */, + 0BD2D92E919693886670B9B4EBEC8F6D /* ItemPath.swift */, + 6759EC5C53A1278D009D5D308135BC8B /* Optional+Extensions.swift */, + F154381A27E497DC49CBD3B7166739E3 /* RxCollectionViewSectionedAnimatedDataSource.swift */, + 0D02D7EB5F4C4393A7F4DA6C09ED4315 /* RxCollectionViewSectionedReloadDataSource.swift */, + 0ACCC67C4B931519FDF6F0816C36733F /* RxTableViewSectionedAnimatedDataSource.swift */, + 9390570A331F71DF4DD24C34D5A1CFC8 /* RxTableViewSectionedReloadDataSource.swift */, + 980DBD518A1D666B2C4CAD2550DA37B4 /* SectionModel.swift */, + 6033C3BED54E9BB077AFEE321A39A1E6 /* SectionModelType.swift */, + 72CE22701097144CA7CC4EB148EACB83 /* String+IdentifiableType.swift */, + 427E84BBFD90EDEF90109A18DD34804E /* TableViewSectionedDataSource.swift */, + A1634D43A0871B5A57B860D01F60F0FE /* UI+SectionedViewType.swift */, + BEB34B809E5315A0454A490BC20D2468 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/RxSwift"; + name = RxDataSources; + path = RxDataSources; sourceTree = ""; }; - 86C35E014D06200B23E4ABAD3ADB92BE /* RxDataSources */ = { + 89EB7E6A364CE1DB913DB37D59B96DAE /* iOS */ = { isa = PBXGroup; children = ( - 44D604BE5C03392A356BBBB83B415FD1 /* AnimatableSectionModel.swift */, - B375AFFE8390D151F82161AD24D6A69E /* AnimatableSectionModelType.swift */, - 3B0F4073F5F04C70C2EC71C6A303EDB1 /* AnimatableSectionModelType+ItemPath.swift */, - AADC84D579724A650B42A9FDD2803F53 /* AnimationConfiguration.swift */, - 3F9FB8D541DC91CF19C6B0233D71EFF2 /* Changeset.swift */, - 4DB4C9F8D83202C536F3BBDFE9BABC96 /* CollectionViewSectionedDataSource.swift */, - 2D7D41E1572A48C669C88A5D32CCB483 /* DataSources.swift */, - 4EF4A589D4D868E5449082BA9FA93908 /* Differentiator.swift */, - 2AEA4F796D471264937E622EEE39CDB0 /* IdentifiableType.swift */, - F7AE05FDC7B02D33FA873B56A3799F91 /* IdentifiableValue.swift */, - E1AAB9AC6A42F2BEA32741BEA3AD3CEE /* ItemPath.swift */, - 468A52D5F2EB415DE203DFF7402F3F25 /* Optional+Extensions.swift */, - 1048968DA3DA7263A5B7280CBEF86576 /* RxCollectionViewSectionedAnimatedDataSource.swift */, - 70FC1E38BD4520AE00C1118D9080894A /* RxCollectionViewSectionedReloadDataSource.swift */, - 0996C5683D08C9055B962CC413DFA602 /* RxTableViewSectionedAnimatedDataSource.swift */, - A49FBB58244EF989D67BDD8FD435D2FB /* RxTableViewSectionedReloadDataSource.swift */, - 9FCB5C34A8DEAA9F4C77313096F78896 /* SectionModel.swift */, - A7972E47CB3597AD008C068283CC1BB9 /* SectionModelType.swift */, - 3285EBE3EA50F283EDDB0447240FBC6D /* TableViewSectionedDataSource.swift */, - C5CEF8310F2648176B5E68727F7DAACD /* UI+SectionedViewType.swift */, - 655E5641A59A1D6EFDFF4D5998F711D0 /* UISectionedViewType+RxAnimatedDataSource.swift */, - CED560C0A835198F558261BC7EA868DB /* Support Files */, + 01D9C2D9C585135E52772795B81818D1 /* Foundation.framework */, ); - path = RxDataSources; + name = iOS; sourceTree = ""; }; - B0AD33B7FFA2BDDB2C00C5509200C5F6 /* RxSwift */ = { + 9CD28C0ADA3171B5A4CF26F752749ABB /* Support Files */ = { isa = PBXGroup; children = ( - 4C29FCB424A53A2675DD78E1C1106FA6 /* AddRef.swift */, - 589E6C4267B5CB27E3B4F543955B262B /* Amb.swift */, - 09901DEB3F47DF71E41021FABF7ACB54 /* AnonymousDisposable.swift */, - D4D12B680F061CB855B5FF6EE4C70809 /* AnonymousInvocable.swift */, - 0FBD02AE35F01E2D42901B3B420A162F /* AnonymousObservable.swift */, - C108BF7EF189CCA8A8B41E6FB8795BA2 /* AnonymousObserver.swift */, - 72FFBE4418D0F05D5908CB1BD8F25B46 /* AnyObserver.swift */, - 243972BCF048DD5F70457821234EB924 /* AsyncLock.swift */, - 6F26F4C06723F6264A751593D3DC5D1C /* Bag.swift */, - 2047E1C7B0EC35B2140C021B90EEEF5F /* BehaviorSubject.swift */, - C29A87C527CDE40C797251A11E4265B0 /* BinaryDisposable.swift */, - 810C95C628521A677E6EEA632B68F292 /* BooleanDisposable.swift */, - D8D3FE26AED138E388B1B310FF2B3378 /* Buffer.swift */, - D099263BC739575B2A7CC3A99A587B4E /* Cancelable.swift */, - 0680DCC217EF3E5B83A63A377FC6BEC5 /* Catch.swift */, - 3EFE87973CB523C0769AA1C09A9546D2 /* CombineLatest.swift */, - 5F57B5F1DD2CC43694F5A2FE2CB89D74 /* CombineLatest+arity.swift */, - ED74A87F0C83A760A9CDC92D24A8B64E /* CombineLatest+CollectionType.swift */, - 0582EE76327F57C431C0B27E47265803 /* CompositeDisposable.swift */, - DAB89611364FD0A06C308A8E88FA31F8 /* Concat.swift */, - F08BEC40B90CDE21AAA4BBB5463DD347 /* ConcurrentDispatchQueueScheduler.swift */, - 5AB733502A3EC806A18171E8F29D873A /* ConcurrentMainScheduler.swift */, - 83D964365738F68246F330076C21713C /* ConnectableObservable.swift */, - 7A4F069B74DDA5D9541A4BAB7460EF29 /* ConnectableObservableType.swift */, - F5ADDF63B5B91D7C8FA368E154FC02CF /* CurrentThreadScheduler.swift */, - 2B276DD384C2E03FB190F5A87AC073EB /* Debug.swift */, - F102A4CCC0A5CC8D2C99FA655B0E4FCC /* Deferred.swift */, - AB4E2641DCD66C7DCE9F5DE64221139B /* DelaySubscription.swift */, - E85178FF7FE09585BA1DB5CCEC977422 /* DispatchQueueSchedulerQOS.swift */, - 293CB66CE3A8E4453A272DF9BDCDA74D /* Disposable.swift */, - A710A2CA347C31D4AF7921A6FD7AD05C /* DisposeBag.swift */, - B0D4EDC4A4F274B87F40614FB04179B3 /* DisposeBase.swift */, - AABC984B312B612E61DA0432EEF855AD /* DistinctUntilChanged.swift */, - A2AAA3F1718D080B28C7879DCE6E987B /* Do.swift */, - EF402C98FBDFCD764DABB580BBD5A92F /* ElementAt.swift */, - 6818193AADDA6666EC3A00E4D9FD97A0 /* Empty.swift */, - 44684986AE704B6231DD21184EB433B9 /* Error.swift */, - F75C6B0786BBF6AAF20B2F6E96335770 /* Errors.swift */, - 8AEC9C79D8D6C0E2A213C2E450FD2729 /* Event.swift */, - 8E58B9FA1A58EECBA104A29D48FB98DD /* Filter.swift */, - EA5AD683C34B914BCAB1976A0926BDBC /* Generate.swift */, - 6CD18275BC156C2D0BA76427D7E3A082 /* HistoricalScheduler.swift */, - 02A1DD9FA1C819A439BE6A81736E3949 /* HistoricalSchedulerTimeConverter.swift */, - 99245DB1B385301333323CB77EA5573A /* ImmediateScheduler.swift */, - BEB3BE6CADAD33DDC4E2E6D661EAB827 /* ImmediateSchedulerType.swift */, - 6765F5A72FC0814CD9D3A206BD93A931 /* InfiniteSequence.swift */, - 43BAB60D0A7B49E70FA33A3052993C6D /* InvocableScheduledItem.swift */, - 593FE1AEE6B3775E79D541DD35A0DD94 /* InvocableType.swift */, - 3432D2B36218CBB59EA988271295A0FE /* Just.swift */, - 1EE92C8296FEA0714F3B1602F002C801 /* Lock.swift */, - 2D59B1888F122DCBE9CB026DCA3B58E8 /* LockOwnerType.swift */, - 40FDA44E1A674BE132F0BCA82279A9D3 /* MainScheduler.swift */, - AF3769D2AEFD0E9BED36B715EFAF3450 /* Map.swift */, - 005BF06B373C56888847BBA883C81899 /* Merge.swift */, - 2B439314567AD34DE20A724F30E5C01E /* Multicast.swift */, - DA899A54921C5F415D9F70E659E2AD1D /* NAryDisposable.swift */, - 43FD4B94002863A63FCE0A36B577080F /* Never.swift */, - FFB307DCD42D95B8ABC61419C84E05EC /* NopDisposable.swift */, - F317DBB6D505BBB0DC95943D4F69D3AB /* Observable.swift */, - 0037E94E6A80FC3A7DFB1A61DFB1B337 /* Observable+Aggregate.swift */, - 1FAE6093B5F14D84E8003503C324FF39 /* Observable+Binding.swift */, - 8B5111AD9BE7E2A19ACB4203A2C24715 /* Observable+Concurrency.swift */, - 31658B3F03A2CD58D3B54F8725912C69 /* Observable+Creation.swift */, - 9DCEF9D5318A070C3D427135B8882D79 /* Observable+Debug.swift */, - DB54E1471B82610011CF139FC19D0B40 /* Observable+Extensions.swift */, - EEEF591BE779E562685FCF57EF0ACD4B /* Observable+Multiple.swift */, - 0681630EDBD0AB8A6CC481C4EF003114 /* Observable+Single.swift */, - F19C8D14EA987F1E7C5F35655CE67F11 /* Observable+StandardSequenceOperators.swift */, - 66E1CED1F24BC209F28FB9AB2CE36321 /* Observable+Time.swift */, - FB6959360565ACA756599E05FEB87F62 /* ObservableConvertibleType.swift */, - 87CD92D796873475E7B918E325B36E07 /* ObservableType.swift */, - B7506EC23F801FAD45B52F5B17547767 /* ObserveOn.swift */, - CA48DA435E0822818D9D45D2A2B93629 /* ObserveOnSerialDispatchQueue.swift */, - D17B042E4E0BAFC25250DBBF69652DFB /* ObserverBase.swift */, - DAD607A687F0024A07D86BAD94464A81 /* ObserverType.swift */, - CBEF846E0BE80EC9413288C89DD06A11 /* OperationQueueScheduler.swift */, - 5AAE98466991CACE40D7AB63B71982B8 /* Platform.Darwin.swift */, - 7F9A5644E09CAE916AA476851C05D831 /* Platform.Linux.swift */, - B82CD0ED461793723F68A396EFC3C75A /* PriorityQueue.swift */, - A095554D7FB3D0A411C47D89E9FB1172 /* Producer.swift */, - 6DBAFF4EF0BEF26EEA549366B74A0E66 /* PublishSubject.swift */, - EFA9CD5809D72EC238C686E5A7EC1B76 /* Queue.swift */, - 1807EEC2EE195F432D66A3E773B2EBAE /* Range.swift */, - 413A521227912A7856BBCF53D2CA3C35 /* RecursiveScheduler.swift */, - 6385DB0C808924B04A64179013B6BD33 /* Reduce.swift */, - C6C9592AFAAB6D33901CDEF7FAB51A44 /* RefCount.swift */, - 3BC450A25A4BA1426C472806FFB12CB8 /* RefCountDisposable.swift */, - F42B348176A6AE942E9D4566E0CDCE4A /* Repeat.swift */, - 294A013F1543C0F3766547B48E88A768 /* ReplaySubject.swift */, - FDEADEB12CF5029DF5DE52C441FA1EEA /* RetryWhen.swift */, - 3F544C5FCAFD9627D960A2E6354C5D84 /* Rx.swift */, - 394DEA29C33545B33E41CCB9E3E23095 /* RxMutableBox.swift */, - 45C93EC8BC218095EEF97EBA3F909222 /* Sample.swift */, - 8ABBC0E46182222A25EE951E542805FB /* Scan.swift */, - B149505C1AE51A9E37078D433941135E /* ScheduledDisposable.swift */, - 773C619279B2D4F76F88550324A29E16 /* ScheduledItem.swift */, - C271B0D387892379051F510E6DC99BA2 /* ScheduledItemType.swift */, - 93BAF9C976A5DB0D56034C76BE483545 /* SchedulerServices+Emulation.swift */, - FDBDC532CF6FFADB848E3BCD43626D1B /* SchedulerType.swift */, - D51C25411309C7DD1982D6026FD446D2 /* Sequence.swift */, - 392B5175213C1FFF6337996AC9991EB7 /* SerialDispatchQueueScheduler.swift */, - BA65CC84E46823F8529911D1DCBD3787 /* SerialDisposable.swift */, - 499B07095919C853FD3E90F8D0EA9DE4 /* ShareReplay1.swift */, - 54B7B10403A4A77F3392370D026F27BD /* ShareReplay1WhileConnected.swift */, - 3CA5E77C275DFB70B28C8DCF4BAA9540 /* SingleAssignmentDisposable.swift */, - BB94AEBFB3F6135B5255C11741A267DA /* SingleAsync.swift */, - A9E1DEF91E51E7F1FB72036F35441557 /* Sink.swift */, - 06F77AC0EE43068F7421A0404E61E71F /* Skip.swift */, - AA5D4D92E6856CF24268861FE753AC70 /* SkipUntil.swift */, - C15910CF6CDD1132CA5CEBB1602BBE56 /* SkipWhile.swift */, - 8BE7EC0ADC83CD760B32F2E1D7020AD3 /* StableCompositeDisposable.swift */, - FBB13270955220EC8A5D77CCE75D46E2 /* StartWith.swift */, - 25C2CB8BD4E25AA71E23ED9C0597FDC5 /* String+Rx.swift */, - A3B637F17226674CA93F1ED73411C0D9 /* SubjectType.swift */, - 8B4A67A85BC175836C7931DAF1BB417D /* SubscribeOn.swift */, - D3B72C9CED8672443B889BE07AE4C9C4 /* SubscriptionDisposable.swift */, - 184B4D586FE1EA0C0374ABE025577283 /* Switch.swift */, - 7A28218965EEFAA631B0C167D30B95BB /* SynchronizedDisposeType.swift */, - 27C82BCBE5E555223D21BA6B4D87F5FB /* SynchronizedOnType.swift */, - B4374DECBF203956E169DC2D7CC0AE33 /* SynchronizedSubscribeType.swift */, - 94E4E29734B00F6A8D1C0C60F98CEBCE /* SynchronizedUnsubscribeType.swift */, - BCDEBBEB8EFB34258C6FF20C1DFD949A /* TailRecursiveSink.swift */, - 488BF24EBDB4184D655691A9F0846484 /* Take.swift */, - DF81535C24861FAF5532B5AC1D9411D1 /* TakeLast.swift */, - F1C5FDB7A1FFEE8C3D70FD4EBCFE5134 /* TakeUntil.swift */, - CCB011D8486E8737BD64CFE641A4D88F /* TakeWhile.swift */, - 2789FC08E46B2063B0141B4E24055DCE /* Throttle.swift */, - C8F6A19B3940ECB4D8EA3BF65D4DA688 /* Timeout.swift */, - 0411A964DB7A0BFC02EDD0DEAEC3EC01 /* Timer.swift */, - 8900BC0E4077BA162B5F92716A38926A /* ToArray.swift */, - C89BFE0FAAB0D0EF6C242BCC7405C721 /* Using.swift */, - 615E8DDF355D8E3CB66BD8A027DF6508 /* Variable.swift */, - 952F37E31F033A130FFA31E6EA48DC6E /* VirtualTimeConverterType.swift */, - E052B5824C1D5DF14E13BD18EF18E72A /* VirtualTimeScheduler.swift */, - 9010DA3CCB56499680D3F414AE154556 /* Window.swift */, - A5E7EA53DB3D5D30CB51B00FF87B98B0 /* WithLatestFrom.swift */, - 65DEDE5D454F568D23F62AB207F2D4F4 /* Zip.swift */, - 127ED21A1397087977CA062A680CB8B4 /* Zip+arity.swift */, - D1EEBEAF641A335CD34A975EADD918DB /* Zip+CollectionType.swift */, - 8506E450AEF2785711328BDEA81AE5CC /* Support Files */, + A78510FCA38C53D2C109EB1ED0F61A7C /* Info.plist */, + 0617ADF6FDE630DAB116773C8F0B123D /* RxSwift.modulemap */, + C8E4AFC16FA6F3647A8FE0111C2EDC29 /* RxSwift.xcconfig */, + 3225DF98FAF6190B4506A077DAAE904A /* RxSwift-dummy.m */, + 96723FA05CB844499A188E8166F0D19D /* RxSwift-prefix.pch */, + A52094D8B54994F95E7D988F12A5DCF1 /* RxSwift-umbrella.h */, ); - path = RxSwift; + name = "Support Files"; + path = "../Target Support Files/RxSwift"; sourceTree = ""; }; - CED560C0A835198F558261BC7EA868DB /* Support Files */ = { + BEB34B809E5315A0454A490BC20D2468 /* Support Files */ = { isa = PBXGroup; children = ( - 9051D2FED1C7524878696C60752BACCB /* Info.plist */, - 5A35A1136D0E5D7DA45729824690ABC2 /* RxDataSources.modulemap */, - DEB4DEA9B6B691B91D3A1D951B003FCF /* RxDataSources.xcconfig */, - ECBB636B5778CB2A4BD242DDAB909F2D /* RxDataSources-dummy.m */, - 23CF7C5C711893306B0EC8F3D96A5BD9 /* RxDataSources-prefix.pch */, - 3A25A17CDEA8DD2CACC6D71504578783 /* RxDataSources-umbrella.h */, + 37718662FF25DAC4AEECBD18EE785CFA /* Info.plist */, + 7A2CE3476C27B0C35E94C832A7DFA3E8 /* RxDataSources.modulemap */, + FCF427D95B299699812817C049CE4CE8 /* RxDataSources.xcconfig */, + 291CFB4C3259A633A84A313993208033 /* RxDataSources-dummy.m */, + 1BF2E282BE6C0DC7868071229F6744E4 /* RxDataSources-prefix.pch */, + 3330D0BF0343C874E61299E5AE33869B /* RxDataSources-umbrella.h */, ); name = "Support Files"; path = "../Target Support Files/RxDataSources"; sourceTree = ""; }; - E265089FB324163F97DD1AF30AD09129 /* Frameworks */ = { + D93ABE7B584EFABC581E38B36949C3AF /* Pods */ = { isa = PBXGroup; children = ( - 321A1AB72255D084EE352876F54E8785 /* RxCocoa.framework */, - 75A421CFB92FFE874F5B36575A783A22 /* RxSwift.framework */, - EF16E9E66A780C6EF049509411A009E8 /* iOS */, + 3F50B2E99465F7C23E7CC4D6F6512F4B /* RxCocoa */, + 8722AD5B1F00EF7FFFF665428E85EB50 /* RxDataSources */, + 832C8BEC007A801FF070353498D4C29F /* RxSwift */, ); - name = Frameworks; + name = Pods; sourceTree = ""; }; - EF16E9E66A780C6EF049509411A009E8 /* iOS */ = { + E265089FB324163F97DD1AF30AD09129 /* Frameworks */ = { isa = PBXGroup; children = ( - 2EDA82B7D4B853FDF29D03F2F794C77A /* Foundation.framework */, + 321A1AB72255D084EE352876F54E8785 /* RxCocoa.framework */, + 75A421CFB92FFE874F5B36575A783A22 /* RxSwift.framework */, + 89EB7E6A364CE1DB913DB37D59B96DAE /* iOS */, ); - name = iOS; + name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 4B5E35D160ADC3B15B779C8100A4F84C /* Headers */ = { + 7457A922A52828405355FE03AC6F9F68 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 0E64DDE37B54E5289144762DA908C558 /* Pods-RxTableViewDemo-umbrella.h in Headers */, + 6F9D974EA9655515011290F323B731B6 /* RxDataSources-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7A4EDA3A21C4A7F2C894BD0F59D11243 /* Headers */ = { + 7A6715008F284C6E4F7DC136B9E60E8A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 1961AA0B521CDAD384F84329F1CD2877 /* RxDataSources-umbrella.h in Headers */, + 83E3BD8D7899AF643F22046BDD62C1B2 /* Pods-RxTableViewDemo-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - A0BEBE43601CD7E092BC990A3CE3553D /* Headers */ = { + 9DB41B585B20C47E68438458DB204F28 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 5765AC5169688976A8996E6AF6FEAE35 /* _RX.h in Headers */, - 9ED3640C1F0465426E3BEFD52AEBD4FA /* _RXDelegateProxy.h in Headers */, - D8597589706CCD7A400AD61310BBEC6E /* _RXKVOObserver.h in Headers */, - 6EF44287E99026389B1DCB9D745AEF1E /* _RXObjCRuntime.h in Headers */, - ACACBFE54603E0FCA79C36237DBC7F33 /* RxCocoa-umbrella.h in Headers */, - 9EB58D77556955EA06D33916D026AC4F /* RxCocoa.h in Headers */, + B0A9C370F766EB92C4467A8870783A2C /* _RX.h in Headers */, + 5F711B99C486F09C302F75DE343D0875 /* _RXDelegateProxy.h in Headers */, + 8C89E9799318F4CA143D99355BF2E48F /* _RXKVOObserver.h in Headers */, + 1F2F5A36732D3437505FF567CC0D3F73 /* _RXObjCRuntime.h in Headers */, + C8831164BCF3E451215528B67D49C89C /* RxCocoa-umbrella.h in Headers */, + 02EC5C852C4A5B9A0494E5E1D52DB801 /* RxCocoa.h in Headers */, + 0CEC80AF9C9898BEC66A887F3DD20BD2 /* RxCocoaRuntime.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - ADEDD20F7C02BF16B5B12B8E3CB2C7E3 /* Headers */ = { + D0EDB86B2DCCAF4E28F8303EDE179CDC /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - E838BC98C86C647B39CAE6D2EF97C51C /* RxSwift-umbrella.h in Headers */, + FA89D1B03BB5D1E1A09262ACCDFF2F41 /* RxSwift-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 0E6B66A670054B552CE4031A18E77F11 /* Pods-RxTableViewDemo */ = { + 13B0540A2A791159DBC198D8FA540AF5 /* RxDataSources */ = { isa = PBXNativeTarget; - buildConfigurationList = 808D0596822A16E32E8220C57129E32F /* Build configuration list for PBXNativeTarget "Pods-RxTableViewDemo" */; + buildConfigurationList = 924390AA72BFF3DC984890FB3BC789A1 /* Build configuration list for PBXNativeTarget "RxDataSources" */; buildPhases = ( - CA915730627D2C78C10E1F4D514EDB7A /* Sources */, - BE2FE2EA49D32A5D096782E348C10492 /* Frameworks */, - 4B5E35D160ADC3B15B779C8100A4F84C /* Headers */, + F7D9882E8EB401B03BE9A3509E4BD529 /* Sources */, + 76E37633EA369D82B1DBF52CCCB94380 /* Frameworks */, + 7457A922A52828405355FE03AC6F9F68 /* Headers */, ); buildRules = ( ); dependencies = ( - 52D0D092D5936870F4B1E0D416B90EEA /* PBXTargetDependency */, - 976BF4E59511C9E1895413AFBF3D6EBB /* PBXTargetDependency */, - EEC18A04705C1D65624F08D79C4900E1 /* PBXTargetDependency */, + B80AA08A0A4D15B33C51F676F078436A /* PBXTargetDependency */, + 612F12813AD82F05C6359167A5444A7D /* PBXTargetDependency */, ); - name = "Pods-RxTableViewDemo"; - productName = "Pods-RxTableViewDemo"; - productReference = 2FBA4ADCAEF01CC0012988900231AF1D /* Pods_RxTableViewDemo.framework */; + name = RxDataSources; + productName = RxDataSources; + productReference = 16311EFFE1D8FB910A8909C201B77863 /* RxDataSources.framework */; productType = "com.apple.product-type.framework"; }; - 79867C45BAED3780AC32E6872F0EDC78 /* RxCocoa */ = { + 552436FA59024504867FCC4EFC55369C /* RxSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = 0AB6C416F60C4257096905DFC3EE8A49 /* Build configuration list for PBXNativeTarget "RxCocoa" */; + buildConfigurationList = 0FA98BB74DF70F5CA3E019D00BC37360 /* Build configuration list for PBXNativeTarget "RxSwift" */; buildPhases = ( - B7BE8E8394D20C5E80B01159D4F0B407 /* Sources */, - D744C47ACA3538A099A73F942781886A /* Frameworks */, - A0BEBE43601CD7E092BC990A3CE3553D /* Headers */, + AA880969F923448487C028656E64BE32 /* Sources */, + 537DA27E16897A383E273200D2D0258B /* Frameworks */, + D0EDB86B2DCCAF4E28F8303EDE179CDC /* Headers */, ); buildRules = ( ); dependencies = ( - 8DFDC4460DA150407DCF571682288AEB /* PBXTargetDependency */, ); - name = RxCocoa; - productName = RxCocoa; - productReference = 50301CEDC1836A2DA7BCB260D2FA97BB /* RxCocoa.framework */; + name = RxSwift; + productName = RxSwift; + productReference = 56E7DE8BFB2C87AE31D79260AC46060D /* RxSwift.framework */; productType = "com.apple.product-type.framework"; }; - D057EC329F500215553CD883023B9D4F /* RxDataSources */ = { + AA1A19F10DA3328B2D882B2E5E70F3AA /* Pods-RxTableViewDemo */ = { isa = PBXNativeTarget; - buildConfigurationList = 636F65E6FD9BC64F3891ED3544EB99BC /* Build configuration list for PBXNativeTarget "RxDataSources" */; + buildConfigurationList = 51E240E5B9BAF8EF12732A8F00E3903F /* Build configuration list for PBXNativeTarget "Pods-RxTableViewDemo" */; buildPhases = ( - 27FE6EE81760285DC09E93D2052126BC /* Sources */, - F775659A923D78523CEFB469E4FA74ED /* Frameworks */, - 7A4EDA3A21C4A7F2C894BD0F59D11243 /* Headers */, + 7C9BBE9532E507D26BE3BE4A7C277BE4 /* Sources */, + 3ABDB9226E1A48B657A37E3EEDF1FCA3 /* Frameworks */, + 7A6715008F284C6E4F7DC136B9E60E8A /* Headers */, ); buildRules = ( ); dependencies = ( - 700377415BAD853200DA078E2A7156FA /* PBXTargetDependency */, - 4D1032A70798C4AD0ABACE47A32550E0 /* PBXTargetDependency */, + B103B6636B402C10D9678B698D17B33A /* PBXTargetDependency */, + 6AC60B7CB5C9793A5A36A3C97A953E72 /* PBXTargetDependency */, + B1D7E3DA7AA7C217310977B4A47D9A74 /* PBXTargetDependency */, ); - name = RxDataSources; - productName = RxDataSources; - productReference = 16311EFFE1D8FB910A8909C201B77863 /* RxDataSources.framework */; + name = "Pods-RxTableViewDemo"; + productName = "Pods-RxTableViewDemo"; + productReference = 2FBA4ADCAEF01CC0012988900231AF1D /* Pods_RxTableViewDemo.framework */; productType = "com.apple.product-type.framework"; }; - F4DD11F54BDEA61E7187E0C1CCC41577 /* RxSwift */ = { + E958CE527B5002EAE5DE63C4FE245059 /* RxCocoa */ = { isa = PBXNativeTarget; - buildConfigurationList = 5FB42F0651C54618DD41CAAE62AD0569 /* Build configuration list for PBXNativeTarget "RxSwift" */; + buildConfigurationList = F21CBD44C8D96D869BE8C9E2A69EFBAA /* Build configuration list for PBXNativeTarget "RxCocoa" */; buildPhases = ( - 59AA1FCA3AABA4375A5F5C7E6A6B5BAE /* Sources */, - 7C17D0AFAD295CBD2DD52916E3EA79A0 /* Frameworks */, - ADEDD20F7C02BF16B5B12B8E3CB2C7E3 /* Headers */, + 5207AEB25BD42FF83A7FAE98E2753A1A /* Sources */, + 1A03EEB7E76795BDF81988CCEF466352 /* Frameworks */, + 9DB41B585B20C47E68438458DB204F28 /* Headers */, ); buildRules = ( ); dependencies = ( + 554CE7EA4B14A680D8BCBF5B9AF03A54 /* PBXTargetDependency */, ); - name = RxSwift; - productName = RxSwift; - productReference = 56E7DE8BFB2C87AE31D79260AC46060D /* RxSwift.framework */; + name = RxCocoa; + productName = RxCocoa; + productReference = 50301CEDC1836A2DA7BCB260D2FA97BB /* RxCocoa.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -1144,7 +1223,7 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0720; + LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0700; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; @@ -1159,332 +1238,393 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 0E6B66A670054B552CE4031A18E77F11 /* Pods-RxTableViewDemo */, - 79867C45BAED3780AC32E6872F0EDC78 /* RxCocoa */, - D057EC329F500215553CD883023B9D4F /* RxDataSources */, - F4DD11F54BDEA61E7187E0C1CCC41577 /* RxSwift */, + AA1A19F10DA3328B2D882B2E5E70F3AA /* Pods-RxTableViewDemo */, + E958CE527B5002EAE5DE63C4FE245059 /* RxCocoa */, + 13B0540A2A791159DBC198D8FA540AF5 /* RxDataSources */, + 552436FA59024504867FCC4EFC55369C /* RxSwift */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 27FE6EE81760285DC09E93D2052126BC /* Sources */ = { + 5207AEB25BD42FF83A7FAE98E2753A1A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 313B1D9BDD6B8B32D497CC21E6932233 /* AnimatableSectionModel.swift in Sources */, - 8490102EEE109E6AD9C8EBE26E01AC27 /* AnimatableSectionModelType+ItemPath.swift in Sources */, - E4062F3BDA221F997448EC19F2BE275F /* AnimatableSectionModelType.swift in Sources */, - EFFABD76A8528AE7C951DE17EC1289E2 /* AnimationConfiguration.swift in Sources */, - 304B48E12D36DFFF7D4A325646A28DAC /* Changeset.swift in Sources */, - DE3840E3B7340B2F5DCB7FE2FBC78612 /* CollectionViewSectionedDataSource.swift in Sources */, - F9E9196D47FAA329B956B24F3640C355 /* DataSources.swift in Sources */, - FA9596BE0A8C0A7AF60227030DA5299A /* Differentiator.swift in Sources */, - 06FC0B38C06C1140045410160D2AF9BE /* IdentifiableType.swift in Sources */, - B2F23ACF9529FB71B304D490C900BC24 /* IdentifiableValue.swift in Sources */, - D4D0BAF62228F821AA26B7DA618CD42A /* ItemPath.swift in Sources */, - 48B9D9BBEEC0A62390D6EA98C43D512B /* Optional+Extensions.swift in Sources */, - 7B45064A9C3AF4D6BC3AEA33F7173FC9 /* RxCollectionViewSectionedAnimatedDataSource.swift in Sources */, - 13E1343F494B16F92D963C4193C07182 /* RxCollectionViewSectionedReloadDataSource.swift in Sources */, - 15277CA93D96A86135550636293296B3 /* RxDataSources-dummy.m in Sources */, - B6DA7B4FADFDFCB541CE6EC950E291CD /* RxTableViewSectionedAnimatedDataSource.swift in Sources */, - A1C0D819EA2D977A099DB47D1638A7A0 /* RxTableViewSectionedReloadDataSource.swift in Sources */, - 33E2ED6B0F82CAF010CCFB940AAB0295 /* SectionModel.swift in Sources */, - 8AB2A7AEF1F68F4A057AEE3B86C40F8B /* SectionModelType.swift in Sources */, - 075DAA20E88BFE120B873B56F8FD683D /* TableViewSectionedDataSource.swift in Sources */, - 27679F295C2320A2A414883274A62EA7 /* UI+SectionedViewType.swift in Sources */, - E6B2814F52482B2BE841F7977B95AC95 /* UISectionedViewType+RxAnimatedDataSource.swift in Sources */, + F2ABE7069E30C94B271627EA74939D1B /* _RX.m in Sources */, + B2121D473C7D93E153580D6B7A240389 /* _RXDelegateProxy.m in Sources */, + A03399E839BEB38C312123DBE12F99F3 /* _RXKVOObserver.m in Sources */, + CEA2EAB64E868FA9CD39390E237F09AF /* _RXObjCRuntime.m in Sources */, + E380E33928B9EDB3CDA6AC8175B64F21 /* Bag.swift in Sources */, + 245813C36ADBE2651FD552D36E35C831 /* ControlEvent+Driver.swift in Sources */, + D338C398B18E14B28FCBAF139D50B677 /* ControlEvent.swift in Sources */, + 0007B1D335EDE8E2010CBB104F40098E /* ControlProperty+Driver.swift in Sources */, + 45328870A8F8A552789BD2C5B69851FF /* ControlProperty.swift in Sources */, + AA76713BC0CD396AA1378B84A0BAE1D6 /* ControlTarget.swift in Sources */, + 97AA4F3E19E10126D4593F88A63D710B /* DelegateProxy.swift in Sources */, + F4F65346DB2641057F1D95C6EF85EF01 /* DelegateProxyType.swift in Sources */, + 2D325FA1F506B305DD668CB466AAB51E /* DispatchQueue+Extensions.swift in Sources */, + 4FFCC591B4B66875ECA740B7D98BCC0D /* Driver+Subscription.swift in Sources */, + 0A3B1C3DB7F99911303443377B3EB2E8 /* Driver.swift in Sources */, + 7D68071D6915C2FDB4C0B422821776EE /* InfiniteSequence.swift in Sources */, + 0DBE9164873721FDBD48DA2E7B31384A /* ItemEvents.swift in Sources */, + 82FE85C15E97D68C43D09D01F29F10EE /* KVORepresentable+CoreGraphics.swift in Sources */, + 2FB3064859F8447EAE1C581C761B96A0 /* KVORepresentable+Swift.swift in Sources */, + D0E2A76382F9935453CE7CE5795E7081 /* KVORepresentable.swift in Sources */, + 7D22D7B74732C329832AFFCD115836C5 /* Logging.swift in Sources */, + 13300167F0DBA4E84225EC0CFF6803F6 /* NSLayoutConstraint+Rx.swift in Sources */, + 37224546FA870141D9318A940379B5CC /* NSNotificationCenter+Rx.swift in Sources */, + F331A66C1922A953BD6A29486203E4A7 /* NSObject+Rx+KVORepresentable.swift in Sources */, + D6512BDCF94AD93925D9B18B39ACB4DE /* NSObject+Rx+RawRepresentable.swift in Sources */, + 453DE72C85C1C730AFEE693567448780 /* NSObject+Rx.swift in Sources */, + A72E46C85B519A77219EDF6D9D40265F /* NSTextStorage+Rx.swift in Sources */, + 451840574CCD8C29E493B9D83614BEE7 /* Observable+Bind.swift in Sources */, + EDC0DEC9AE29A870D8F865693D9008FF /* ObservableConvertibleType+Driver.swift in Sources */, + 6BE7D8F331C1CFE84986DFBD785B69AF /* ObservableConvertibleType+SharedSequence.swift in Sources */, + 4A5266451C94684D9A0A97A9A43AD7D1 /* Platform.Darwin.swift in Sources */, + E180629EFE5A172F45EEC7A4D1D98765 /* Platform.Linux.swift in Sources */, + 452234C4344563DE25471D1A999EAE15 /* PriorityQueue.swift in Sources */, + A7E8EDF2541830E6BD2823E85AAD835E /* Queue.swift in Sources */, + 88AC81493FA51CE38DE61997D3C81E06 /* RxCocoa-dummy.m in Sources */, + A8675186C1FD8FD66041BAAAF9793BE8 /* RxCocoa.swift in Sources */, + 71738713CD8C6CBD2A4C736AA9890C13 /* RxCocoaObjCRuntimeError+Extensions.swift in Sources */, + 3926861756AA8892CD13B6F5C350AF3B /* RxCollectionViewDataSourceProxy.swift in Sources */, + 5E3B4E99B24EF78687C79693235C7326 /* RxCollectionViewDataSourceType.swift in Sources */, + 4669F342B9CA122BAB8E03A4F10F970B /* RxCollectionViewDelegateProxy.swift in Sources */, + 8646C747FE420FEDD89091292B30ABC9 /* RxCollectionViewReactiveArrayDataSource.swift in Sources */, + 4E775D87DA2640DAD2C8A8D761F3ECA0 /* RxPickerViewDelegateProxy.swift in Sources */, + BC34FEC2CDAE974D9D4505DD2A4F3147 /* RxScrollViewDelegateProxy.swift in Sources */, + A63437671241D8492EA44ABB0E018178 /* RxSearchBarDelegateProxy.swift in Sources */, + 11ACCC0C8E6333D02DB90A0FEAB97C79 /* RxSearchControllerDelegateProxy.swift in Sources */, + 0F58530BCC963A307890258D383D0AE1 /* RxTabBarControllerDelegateProxy.swift in Sources */, + 4CF66DFD0D0081C700FFD00D70145704 /* RxTabBarDelegateProxy.swift in Sources */, + 9E7132A6A93C696C69D9A1180C9FB0B6 /* RxTableViewDataSourceProxy.swift in Sources */, + DDEA1A471E3B824E8FF22C898D9611BF /* RxTableViewDataSourceType.swift in Sources */, + C0D25CC1CF642D847C1621F43909A691 /* RxTableViewDelegateProxy.swift in Sources */, + BFB84181F6BF5797A66ACF432ECEBB1B /* RxTableViewReactiveArrayDataSource.swift in Sources */, + 5E801EB5F95A54F7FAC31F14326309CB /* RxTarget.swift in Sources */, + 6D504D7851A607232B477B3D76DADF73 /* RxTextStorageDelegateProxy.swift in Sources */, + 6AEC8D609B08969AAF3D587E5739960B /* RxTextViewDelegateProxy.swift in Sources */, + 8DDBED4318875523E05308CD3D858458 /* RxWebViewDelegateProxy.swift in Sources */, + C1E1FDCBDFB0CEBEF488F0E55735B994 /* SectionedViewDataSourceType.swift in Sources */, + 986F160D245503C9D252FDB4969C4AA8 /* SharedSequence+Operators+arity.swift in Sources */, + 7691433C9BE1190F64D5D1C95F3F062F /* SharedSequence+Operators.swift in Sources */, + DEEC05FE899AEEF1BEDFFDDD9BBE1278 /* SharedSequence.swift in Sources */, + 431BE243E802EB93F943938872738F4B /* TextInput.swift in Sources */, + 7E87FE4433C8BB4D3E9902F23EEDCFDF /* UIActivityIndicatorView+Rx.swift in Sources */, + FB9BCA373CDBDB53EA1D0B659630A3A6 /* UIAlertAction+Rx.swift in Sources */, + BFDC869E3CC474F8D6C390FF41B7064C /* UIApplication+Rx.swift in Sources */, + 86C025C0019B4C43D9028E2E58F402DE /* UIBarButtonItem+Rx.swift in Sources */, + E5D99DB0F663997389EB9F7D8F1BEF66 /* UIBindingObserver.swift in Sources */, + C85A2238774748CB850283EEEB32CCCA /* UIButton+Rx.swift in Sources */, + FD976E68F48D05A35B7BB58BA36A3BE9 /* UICollectionView+Rx.swift in Sources */, + 6A252F4FDCD05A1CEA471C9FFA5656C5 /* UIControl+Rx.swift in Sources */, + BBA85E8BA90E520952FF3E98C76AAF07 /* UIDatePicker+Rx.swift in Sources */, + B9AFD303A2AE898AC598F6A0DAFAA6F1 /* UIGestureRecognizer+Rx.swift in Sources */, + DBBCAD10DF6B3BFC978B9563203E19BC /* UIImageView+Rx.swift in Sources */, + 6F775E150F6A5782A6CC1771B262D8CF /* UILabel+Rx.swift in Sources */, + 0BEBF22BECA0BAD19AC2117BCE907481 /* UINavigationItem+Rx.swift in Sources */, + 6BA27C8BBF6F2AA922EEC1069318FF52 /* UIPageControl+Rx.swift in Sources */, + 555FA3C095FB80491012F3710477FFFC /* UIPickerView+Rx.swift in Sources */, + 190CB94ED8CC6BF0D5FD3858FEF8CFFF /* UIProgressView+Rx.swift in Sources */, + 952B3B887D6232E388E29E0C850AA871 /* UIRefreshControl+Rx.swift in Sources */, + 6F8DCC6BFBAC07E78249BF0BD0EE9B46 /* UIScrollView+Rx.swift in Sources */, + D6DD187037435BD53E11DC16A097E95E /* UISearchBar+Rx.swift in Sources */, + B099A362AEF32F23F5F6EDD00804A684 /* UISearchController+Rx.swift in Sources */, + 44BAB9A8DE10D89D1E4DBB665E405699 /* UISegmentedControl+Rx.swift in Sources */, + 10A17B543D1569C84BCBD8355190246C /* UISlider+Rx.swift in Sources */, + D323704835C00DDB02746CDC30D44D5F /* UIStepper+Rx.swift in Sources */, + CD8973CD740E72271D5BFEE3BD7EFF7E /* UISwitch+Rx.swift in Sources */, + 76EE5632CAD09FB2CB712F467524BD22 /* UITabBar+Rx.swift in Sources */, + 2D47C1E570F4E7DA993799165BFFA090 /* UITabBarController+Rx.swift in Sources */, + 0C10E4BAE123C6EAA08B5485D9557B03 /* UITabBarItem+Rx.swift in Sources */, + B5DCAD02BEACAAF1BEB3B29D0D011968 /* UITableView+Rx.swift in Sources */, + 3302F4D823C72F359A7ED134DC9EF00B /* UITextField+Rx.swift in Sources */, + D3697BBE86203B702168E06F1C7CAD58 /* UITextView+Rx.swift in Sources */, + 54F990AC55379260077E1976357FC69A /* UIView+Rx.swift in Sources */, + 977BB7AE9F1DEEAFD986F2DF15DB9D16 /* UIViewController+Rx.swift in Sources */, + 53EEDDB18E7FF987FC2A07822C5D09AC /* UIWebView+Rx.swift in Sources */, + 997D5C9DC20A04CA6156895BAB1E8DA2 /* URLSession+Rx.swift in Sources */, + 3BF2CFF8CF1FD3E5F4D1AC44E6B486E6 /* Variable+Driver.swift in Sources */, + 21D4B10B9E595D66F04E940CC3D6C2C9 /* Variable+SharedSequence.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 59AA1FCA3AABA4375A5F5C7E6A6B5BAE /* Sources */ = { + 7C9BBE9532E507D26BE3BE4A7C277BE4 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 558072440BB794201909DA8F9F75607C /* AddRef.swift in Sources */, - 93A7F75AC9CE5EFD4132B9B8D2FC8179 /* Amb.swift in Sources */, - 60BC26B7BECBDCD6A7D703976AEDCB93 /* AnonymousDisposable.swift in Sources */, - CEA3496D0E0442C905BB113762100AFC /* AnonymousInvocable.swift in Sources */, - 771EBF091D26307CE45B4A1CE14B596B /* AnonymousObservable.swift in Sources */, - 1B56FE4A3AC7AAAC26B0D40C99B0EAD9 /* AnonymousObserver.swift in Sources */, - 16BD3698D6FB3F529EA8BEEE6ABC030E /* AnyObserver.swift in Sources */, - 860BB989195078997A78E68B02110353 /* AsyncLock.swift in Sources */, - F3AB05EE7FE5FA5526787EED1BF02D35 /* Bag.swift in Sources */, - CF1F7A253C906B23C3913629A97A89EF /* BehaviorSubject.swift in Sources */, - 5966A5E82F147F53A48E673340423751 /* BinaryDisposable.swift in Sources */, - 4D9DA91D148C634DFF1D942C2CFA0F59 /* BooleanDisposable.swift in Sources */, - 590A7D88C1D57B4C9ADE3AAA3046880B /* Buffer.swift in Sources */, - 33A74B8D27265ACC3ADDCA5FBE4DDDCA /* Cancelable.swift in Sources */, - F43C35033D3C8C5959CBCF67205FD92D /* Catch.swift in Sources */, - C82C3C7315B0EDEA5C73F83E85B6E957 /* CombineLatest+arity.swift in Sources */, - CBA5D5B8F8FDBCE3DDCA5E8A8ED47F13 /* CombineLatest+CollectionType.swift in Sources */, - A4E1DC925EADD03137EE289927427A9F /* CombineLatest.swift in Sources */, - 5A68239F9EA7D8ACFA2DDBCD6D74AF86 /* CompositeDisposable.swift in Sources */, - 6F3A0513E550040330F4520A0178C2EA /* Concat.swift in Sources */, - 4E4912EC91D5007408E6D8B77DD13690 /* ConcurrentDispatchQueueScheduler.swift in Sources */, - 2160A32AB4777D408CD04A52684C1FC2 /* ConcurrentMainScheduler.swift in Sources */, - D31025721A8CD8BF455DA79D97CEA7B5 /* ConnectableObservable.swift in Sources */, - 1A785CACDCF9CF23C2B028D4588E3696 /* ConnectableObservableType.swift in Sources */, - 1FA965276AF0DFD24E4D54EE0EF0BE14 /* CurrentThreadScheduler.swift in Sources */, - 26717ABE776D1A2F90C74025DF078AB7 /* Debug.swift in Sources */, - 32732F26393B29CCF939B2B01155645C /* Deferred.swift in Sources */, - 88B52AC68DEA8472518E0F8EF523548F /* DelaySubscription.swift in Sources */, - D5B89ED24C859593943D984AA7EE4290 /* DispatchQueueSchedulerQOS.swift in Sources */, - 6EA3F5A75A66B8717D6F08FC19E7037C /* Disposable.swift in Sources */, - CB029D264580E3A9CB10C2D264E4B287 /* DisposeBag.swift in Sources */, - B333BB1742AAE9C9EA922CFA053A3064 /* DisposeBase.swift in Sources */, - 15919BBB6C559246A23C4AAA1041DF41 /* DistinctUntilChanged.swift in Sources */, - 3296B0D819BF113BE960FCF027E258F9 /* Do.swift in Sources */, - 0328C32A29EAFEF738EC4377FD722F00 /* ElementAt.swift in Sources */, - 6C52C872B36BB4BE99391BD235F247DA /* Empty.swift in Sources */, - D7D84BD5322C51642BD0845932820ABB /* Error.swift in Sources */, - E874EE9C596AC6C9538DE0C6C8F237C6 /* Errors.swift in Sources */, - FAA67191B4ACB0374B3A22403AD6EC21 /* Event.swift in Sources */, - 4180E0CEB4B65A6CF6F8090D8FC09626 /* Filter.swift in Sources */, - C0E8D687D4806FA1FFDDE7183BC2F4A5 /* Generate.swift in Sources */, - 41DB38540861A8C09D80D8707DFF6DC3 /* HistoricalScheduler.swift in Sources */, - 4B40D1F5DBE8B569019495C77FEE004C /* HistoricalSchedulerTimeConverter.swift in Sources */, - 26835FE845484327C93CBAEE1066A1A6 /* ImmediateScheduler.swift in Sources */, - 7629A08B422FB1AF4EA99719F8181A6F /* ImmediateSchedulerType.swift in Sources */, - 61B571F041F99B54E3AAAF05A761FD8E /* InfiniteSequence.swift in Sources */, - BA7F60B73F4EF76A254B848ACB51F207 /* InvocableScheduledItem.swift in Sources */, - 686A3E9E36103A1A69743420ED7409A4 /* InvocableType.swift in Sources */, - CA43DE1F40C6580AC5FA12A27C3A651D /* Just.swift in Sources */, - 14E3EFBCA71F89CA017C5B1E75118A1B /* Lock.swift in Sources */, - 7FF0B8AD5079328F5322DB75AFFA6537 /* LockOwnerType.swift in Sources */, - 9FF3999BCF0AE1EA19ADF0C2E31D3488 /* MainScheduler.swift in Sources */, - 6AFDE84A2FF9C4ED8611076AB83B9BDE /* Map.swift in Sources */, - C739D5054B4CD7BBFE26F2E0F16614CE /* Merge.swift in Sources */, - 81EE00824EC16A9AC4DEB177830B3C7D /* Multicast.swift in Sources */, - EA55E57583085B574C83D030D5D8DE88 /* NAryDisposable.swift in Sources */, - 34A1FE81DAC1419EED0A2F4430345042 /* Never.swift in Sources */, - 46E9C9FE2CDB5044F53C095765642581 /* NopDisposable.swift in Sources */, - 806FA4B61793303B21FB444CCBB1E7A1 /* Observable+Aggregate.swift in Sources */, - 467B7670B56D5D07D09336901792F388 /* Observable+Binding.swift in Sources */, - D829F05DA4F33CE44046D9DF8444C6A0 /* Observable+Concurrency.swift in Sources */, - 6C7F9E0DF4E05047DFDC2B578C079D26 /* Observable+Creation.swift in Sources */, - C6ED83F18C0F9D86D13ABDFFCC160B9C /* Observable+Debug.swift in Sources */, - C503C9EB33E07EDFC8A272C5C091F843 /* Observable+Extensions.swift in Sources */, - 463305AA086B366064DEC1322C9E9610 /* Observable+Multiple.swift in Sources */, - 43D0DB3DA8535DAEBCBA6A76DAC5FE95 /* Observable+Single.swift in Sources */, - 11461C0FDC551282BD0F2D7B337331EA /* Observable+StandardSequenceOperators.swift in Sources */, - 126CFEA26B4312E551C32FD9AE336ACA /* Observable+Time.swift in Sources */, - E20B7FA9B40B5C15C0D65A0A2C707349 /* Observable.swift in Sources */, - 987A6D9E1402FA9BA8870EDDF5179908 /* ObservableConvertibleType.swift in Sources */, - 82C326881436A772AC093828037CA00E /* ObservableType.swift in Sources */, - DA9734B3E5A753ECA090355DD04D69E3 /* ObserveOn.swift in Sources */, - 85A6B7427B1FBEBBAE0BE8B8250CB3E8 /* ObserveOnSerialDispatchQueue.swift in Sources */, - AAA40A15F9FF0C577F1915A444F38009 /* ObserverBase.swift in Sources */, - B73B8DCD1A5D9C791101548A40C0845F /* ObserverType.swift in Sources */, - 09ED8F3F0D6D5431C271C697CDA43D03 /* OperationQueueScheduler.swift in Sources */, - 5AE60805BAF75D5FA3ABF33DEAC240BF /* Platform.Darwin.swift in Sources */, - 768C00D55E243168C68A0C003B2380AB /* Platform.Linux.swift in Sources */, - C7F8FF2F0D922D28DB71E01D23232D66 /* PriorityQueue.swift in Sources */, - B81B4430F71617143331C5B9817829A3 /* Producer.swift in Sources */, - DD03295BDAD5F9FC1E94C71D71732FE0 /* PublishSubject.swift in Sources */, - D5F29F6809272BFEF1F5E9955896AD7B /* Queue.swift in Sources */, - 1766EBFB8F061A2844136E869A6E4B95 /* Range.swift in Sources */, - 1F132FCFC9530467561F58788538FADC /* RecursiveScheduler.swift in Sources */, - 4B0875959A0286D84F4B00D2F2DB5032 /* Reduce.swift in Sources */, - 7ED762A32BDE1E5C7D03499B3838CFA2 /* RefCount.swift in Sources */, - 9034871EC543924259F626823C2FDABE /* RefCountDisposable.swift in Sources */, - F3D18E2C3954C783D32897465274B2EB /* Repeat.swift in Sources */, - 1A18606341C0BDD84A17823E740C4A61 /* ReplaySubject.swift in Sources */, - 87CC2C264A387670D3B51E500495444E /* RetryWhen.swift in Sources */, - FFF7161A515B5CCDAC2ED90BE8CDBFC8 /* Rx.swift in Sources */, - C66090EE747F98EFFCBBD435E5D866CC /* RxMutableBox.swift in Sources */, - 58A973997ADAC73423CA454B1DD90525 /* RxSwift-dummy.m in Sources */, - A7F44450B4F3B8C4FAEB98BC2558DD9D /* Sample.swift in Sources */, - 75BF34ABD19599B6893ABEF0AE4FBC2B /* Scan.swift in Sources */, - C00F7601226FF9C0E2D8589598D4757A /* ScheduledDisposable.swift in Sources */, - 73246A2196C92C01502362183D85E5BB /* ScheduledItem.swift in Sources */, - 6B5AD62BEE438C83A77C6CA2088CD714 /* ScheduledItemType.swift in Sources */, - 6EE0ADE81C4B6B7FC3C07C4D50930625 /* SchedulerServices+Emulation.swift in Sources */, - 4550B9021F155638AC4BFC0E2552F1AC /* SchedulerType.swift in Sources */, - 92D3C2D6AB659DA2CED141EC3C69FF63 /* Sequence.swift in Sources */, - D508980DB2A45BCACF09ABB7011A423D /* SerialDispatchQueueScheduler.swift in Sources */, - C131C0439F39511B5B55E3FE30236EED /* SerialDisposable.swift in Sources */, - ACA1626DE112857F4983F5639108C64A /* ShareReplay1.swift in Sources */, - 596351CB3AE4D53189CB97529E02394A /* ShareReplay1WhileConnected.swift in Sources */, - 7E7777B2952F155CCE337D84E681D587 /* SingleAssignmentDisposable.swift in Sources */, - 88F4D7DB6129148FD8038468C528910B /* SingleAsync.swift in Sources */, - ABE1E3EF7518F38900149FD7093DB5D5 /* Sink.swift in Sources */, - A1C10BABF900A180C24CF96A5BD63133 /* Skip.swift in Sources */, - 6D12D98DF058EF2A39E3975DB651B84A /* SkipUntil.swift in Sources */, - 240423E22F30942C210B752646E554B5 /* SkipWhile.swift in Sources */, - F014C4CC1DF0F3D81C4FE677FB8640BD /* StableCompositeDisposable.swift in Sources */, - 587948BE620947B8FC48A9D95FFA3EAE /* StartWith.swift in Sources */, - 5BC01B27D48ABFC858969606BE0C48B9 /* String+Rx.swift in Sources */, - E6A6747216DFE19937557090B1AD1C2E /* SubjectType.swift in Sources */, - AC77858CC6DF2E318FB24008BCF6AB38 /* SubscribeOn.swift in Sources */, - BA4A81F6CC3522D1C481007D7C91AF58 /* SubscriptionDisposable.swift in Sources */, - 57754728166C2263BE7796291D7CE550 /* Switch.swift in Sources */, - E00BC65957827B9143C6E3917BB93EC1 /* SynchronizedDisposeType.swift in Sources */, - C79C1D04D0E38F128AB59A5ED89EBC1B /* SynchronizedOnType.swift in Sources */, - 9D516412F1C1B3D68E38C7037DB8B6D0 /* SynchronizedSubscribeType.swift in Sources */, - 18B688E0467217EC09B88E43C038DF8A /* SynchronizedUnsubscribeType.swift in Sources */, - 76248B503DB9116D0597BE4AD1FD7212 /* TailRecursiveSink.swift in Sources */, - D05ED02F8449C018E86CDB6F6A911A66 /* Take.swift in Sources */, - 5C64C73BE6B693A0B7DF9DBC2B3530C6 /* TakeLast.swift in Sources */, - B761DD8AF7F8BA9B24A5F0319C6F3C79 /* TakeUntil.swift in Sources */, - 3B82C3775F719ACF6709512BE66C4A3C /* TakeWhile.swift in Sources */, - B4227346AB55F843F1B5C48EFD091C41 /* Throttle.swift in Sources */, - 1DE139D0FE7B7F7243B3F824E8A2F078 /* Timeout.swift in Sources */, - 89BF1309EEED3AE8096A4A9CA2C84C0C /* Timer.swift in Sources */, - 55DA71F363908238F42E8A11AF75E031 /* ToArray.swift in Sources */, - 8D5D0B1FE11910E44CE8937AB1E3682A /* Using.swift in Sources */, - 3B17DF3A9F6589143DCF17495ADAF297 /* Variable.swift in Sources */, - CAEFB81D8E2F0F6BBD8CDCADCE03414F /* VirtualTimeConverterType.swift in Sources */, - D9AF8E1A378E23B497554CBD19308E57 /* VirtualTimeScheduler.swift in Sources */, - 5F49196D2CBFDD2DDD72D0DA7EBD6008 /* Window.swift in Sources */, - 03EAB3EE5CC32A876B0B832498B886A8 /* WithLatestFrom.swift in Sources */, - 9FDC68007490AF33AA4DC2A76C185934 /* Zip+arity.swift in Sources */, - 460019DA293FE2818D0C6B810BCA74F4 /* Zip+CollectionType.swift in Sources */, - BD1E8014615C30C460CCECF804C4451B /* Zip.swift in Sources */, + D565C7D307D63EC43E503C0DEF5C14D2 /* Pods-RxTableViewDemo-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - B7BE8E8394D20C5E80B01159D4F0B407 /* Sources */ = { + AA880969F923448487C028656E64BE32 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C67DF513BA69CF9ED33EAD5C8C19F9D6 /* _RX.m in Sources */, - 2CDBB4879A4734E81EC2B9B94771F024 /* _RXDelegateProxy.m in Sources */, - E26EDB83D37C459CEA8C14AD41BF5398 /* _RXKVOObserver.m in Sources */, - CB889D377A116991D0139201F3EE3763 /* _RXObjCRuntime.m in Sources */, - ABFB401A8A571E2C7688A3A9279119BB /* CLLocationManager+Rx.swift in Sources */, - 4A9D1E851AD1C1EAB08F4899DFBF29C5 /* ControlEvent+Driver.swift in Sources */, - B6ACB4E1AA60CF842CD45E33B455824E /* ControlEvent.swift in Sources */, - 04A86219D00605B782DD8843117DE6F3 /* ControlProperty+Driver.swift in Sources */, - 012128A0A32D6054EEB5C1E358FBDE3C /* ControlProperty.swift in Sources */, - E2270D856910B457FD8C59B78392764B /* ControlTarget.swift in Sources */, - B91D5446D05D22FB6DB6A8792D72D4C3 /* DeallocObservable.swift in Sources */, - 70EC40D92D48C7F18D19C67AE596DEE6 /* DelegateProxy.swift in Sources */, - D4D8CDED8939A001AE998508705E8E4F /* DelegateProxyType.swift in Sources */, - 3F2ADE6BC22AC065B3D93B3A1FB64F42 /* Driver+Operators+arity.swift in Sources */, - 2D1E5C54BE0D6FD56E4BAABA0A40A9E2 /* Driver+Operators.swift in Sources */, - 2B669C57E94BFD1292F454CD7DF19413 /* Driver+Subscription.swift in Sources */, - 37ED9E34C3A8F0BD13A59456436AFFB5 /* Driver.swift in Sources */, - 24653C5B3FBFEB971DDF83D35257A601 /* ItemEvents.swift in Sources */, - E41CFEF34729CE6007CB898E47DBA760 /* KVOObservable.swift in Sources */, - A5FC77560A928072F586F05963A37C4F /* KVOObserver.swift in Sources */, - CEC07AED858DCC7B67939408B416FBA9 /* KVORepresentable+CoreGraphics.swift in Sources */, - C257AB5EB05D2B6C550232C961CFE64D /* KVORepresentable+Swift.swift in Sources */, - 86CB12DF1BBA915D05E065B15FAF9B03 /* KVORepresentable.swift in Sources */, - 09A5568D518B6BAD6CCE46EAB022C356 /* Logging.swift in Sources */, - 59A7DA94D72B62BE2B7F363584FB9C8F /* MessageSentObserver.swift in Sources */, - 08BD4E4B1A362F779FA0C52DA21781F7 /* NSLayoutConstraint+Rx.swift in Sources */, - 0809361453AE65E26F841990DFE9D632 /* NSNotificationCenter+Rx.swift in Sources */, - 3B7ED85DA4BA145CAFBF6E3985FEBD83 /* NSObject+Rx+KVORepresentable.swift in Sources */, - C5F30F8CF7A73BADA7E69D968010115B /* NSObject+Rx+RawRepresentable.swift in Sources */, - 4E609793FB705AD174EBD02878196981 /* NSObject+Rx.swift in Sources */, - 971D4A35F49CA921B244A8FC75FA763B /* NSTextStorage+Rx.swift in Sources */, - 79FD8631420C04047217AB87C21E9BBF /* NSURLSession+Rx.swift in Sources */, - CF4673C3470A9BA694AA2CF330737108 /* Observable+Bind.swift in Sources */, - 3B4FA801AA71678CB6C0C49D1B9C6AC2 /* ObservableConvertibleType+Driver.swift in Sources */, - 961430E2CE1DB219CD53F20F0219C013 /* RxCLLocationManagerDelegateProxy.swift in Sources */, - 0EC6460C46EE9CFF0E409F5268388B93 /* RxCocoa-dummy.m in Sources */, - 04FBC9428D700D7C6D1DB5B227014BE1 /* RxCocoa.swift in Sources */, - 17281C5957928AAD5CF1824E9E382A30 /* RxCollectionViewDataSourceProxy.swift in Sources */, - 4627EEDF2A80C5FF6DDEF465A95BC82D /* RxCollectionViewDataSourceType.swift in Sources */, - 58C6FCC953E33AB2079427CE24786279 /* RxCollectionViewDelegateProxy.swift in Sources */, - 155E179F0F01DD0651D6256C3F43EEA5 /* RxCollectionViewReactiveArrayDataSource.swift in Sources */, - A7431F821EA567E9047B2D00E387F2A2 /* RxImagePickerDelegateProxy.swift in Sources */, - 5561AC703CEB3AEFF6D974C10C8CE5A5 /* RxScrollViewDelegateProxy.swift in Sources */, - EE618CE8A175CEC1215D288E3CEB9D43 /* RxSearchBarDelegateProxy.swift in Sources */, - E5C3270F7483983BB27436D43D158111 /* RxSearchControllerDelegateProxy.swift in Sources */, - C5D3FDC03FFA1A5EDEC471A821F4F00D /* RxTableViewDataSourceProxy.swift in Sources */, - BE4D7B62E9DA7623A9AF96E55EDE9915 /* RxTableViewDataSourceType.swift in Sources */, - 2908BEE76BFA0E4EB8D096A7CB520542 /* RxTableViewDelegateProxy.swift in Sources */, - 24108C123BFDF65439C4586D791BC2F7 /* RxTableViewReactiveArrayDataSource.swift in Sources */, - 6E5FD82CBCFF294FA1710AB836F6CFDA /* RxTarget.swift in Sources */, - 358C0785A323AD2B844CBC9C873E168F /* RxTextStorageDelegateProxy.swift in Sources */, - 5B43592105A79008E2E7A6A6D40FED6F /* RxTextViewDelegateProxy.swift in Sources */, - 3E57AB5E2B5102CCE4FD49D354D5BFAA /* SectionedViewDataSourceType.swift in Sources */, - 0EC5BDD69BF4DEBAADBED034CDB9A313 /* UIActivityIndicatorView+Rx.swift in Sources */, - 9C19F8DDEBFA95F708478A90654DCF1B /* UIApplication+Rx.swift in Sources */, - EBFE52DD24AEAD08340C6DAC705185AB /* UIBarButtonItem+Rx.swift in Sources */, - 482D9FBA7FC98905390579539FF5485C /* UIBindingObserver.swift in Sources */, - F9B93A60F0E7786ABA3E7F8456ED56F8 /* UIButton+Rx.swift in Sources */, - E98FC3ECE54790237C8EDE646574147A /* UICollectionView+Rx.swift in Sources */, - 77F456E50C1C025FC5E158ADD91F87EF /* UIControl+Rx.swift in Sources */, - A5FA5C450D0C574E308A88748CAB71E4 /* UIDatePicker+Rx.swift in Sources */, - 9B58F434F23782FF732358FB40617B93 /* UIGestureRecognizer+Rx.swift in Sources */, - 14D9A18004C5C26CFC3A5DC9312451BE /* UIImagePickerController+Rx.swift in Sources */, - 8F2F1C6F5AA04841AC74E6C2042C2033 /* UIImageView+Rx.swift in Sources */, - 422F9F5DE2F23A1DB5EAA91EFA4C5744 /* UILabel+Rx.swift in Sources */, - 70A444399494595E64AE089E0706DA5B /* UIProgressView+Rx.swift in Sources */, - 7F8F188CC42F82085B639FD758E2A6C2 /* UIRefreshControl+Rx.swift in Sources */, - 1A20C43237AB8007B1DAFBCC7F422A0E /* UIScrollView+Rx.swift in Sources */, - DA99500B103CA92D85FEEE7ED369926E /* UISearchBar+Rx.swift in Sources */, - 5A41C5E2F8B88263FE5970E6257C85C4 /* UISearchController+Rx.swift in Sources */, - 67A267F04166A6F3C845CEB4D1168A2D /* UISegmentedControl+Rx.swift in Sources */, - DE196C1615725DAAAA515753BBEA00CF /* UISlider+Rx.swift in Sources */, - B0C7AE51A24BC4F4D8497FFDDC20614A /* UIStepper+Rx.swift in Sources */, - 72FA1B6EB1839C1045E17571E0C742E1 /* UISwitch+Rx.swift in Sources */, - C59416520E601698248D4DA1CE7D1F56 /* UITabBarItem+Rx.swift in Sources */, - 28B2700F7CD104D90F0FD8B2EC4F4D33 /* UITableView+Rx.swift in Sources */, - 23B90A8FB82A094168E1E165CD09925D /* UITextField+Rx.swift in Sources */, - F23B7EBF1FD37B0067AB0040096D9970 /* UITextView+Rx.swift in Sources */, - 4C4367FB3914D51C198215A0FA976143 /* UIView+Rx.swift in Sources */, - AE704F23A196C6DF3911C7D524EA708E /* Variable+Driver.swift in Sources */, + 148B4001DDCBE19EC113633F7E396F6D /* AddRef.swift in Sources */, + D57681CEB0F68FF7930BDE710141D108 /* Amb.swift in Sources */, + BA4890978FB2C10C01DB102202B10A52 /* AnonymousDisposable.swift in Sources */, + 41BC5D238C5135499B6E898071A9A3D0 /* AnonymousInvocable.swift in Sources */, + 1E9F7B700DDBD89CAA31FAA73DBFCFBF /* AnonymousObservable.swift in Sources */, + F0BB6FD08AC24F8F33FF6789BD42A8C8 /* AnonymousObserver.swift in Sources */, + 2F5476D30A385A7AD57E3CF703CF3BFC /* AnyObserver.swift in Sources */, + FDE005611E1E3730F33FE4EAA201285A /* AsyncLock.swift in Sources */, + 53182293B7F833C19C726989E7496E64 /* Bag+Rx.swift in Sources */, + 732A4DAA3D48E95C8AD1D26BB70790CD /* Bag.swift in Sources */, + 2A0FFD6BACDBD10A58D6892A48BBDB31 /* BehaviorSubject.swift in Sources */, + 31E8AFAF37FD221C2644E104910C12E3 /* BinaryDisposable.swift in Sources */, + F1712D8A547B3516848674E86DC10B6B /* BooleanDisposable.swift in Sources */, + A95CC5AE9B8A3B8FE651F5E3496C7D91 /* Buffer.swift in Sources */, + BD92BEC9271FAFF5ADAB642A54C17209 /* Cancelable.swift in Sources */, + ED27D81FE0B22D494BBF527D8E8576A1 /* Catch.swift in Sources */, + 818AFFB1F9E3E5C125702403F6C1C2EB /* CombineLatest+arity.swift in Sources */, + 0992C74EE4D284B5473E98DBA1B27B3B /* CombineLatest+Collection.swift in Sources */, + F2E26DD4450D533CE1F6CDB0B4C85FC5 /* CombineLatest.swift in Sources */, + 1D40EFC73D8D04E84FEFAB9382E80B4D /* CompositeDisposable.swift in Sources */, + 5B72C4FB1EFBB07149AAE705AC3BC692 /* Concat.swift in Sources */, + 4395DE2B75F7072E6D69891D3FDFB38A /* ConcurrentDispatchQueueScheduler.swift in Sources */, + 5DFE81D6E9FD1979FF036F031D22A07E /* ConcurrentMainScheduler.swift in Sources */, + 20D1B850A1E7B1C22E8DA624312B0D90 /* ConnectableObservable.swift in Sources */, + 78CB5ABC036989C3A265F7CBEB95AEE4 /* ConnectableObservableType.swift in Sources */, + 425DC043C56313EB64C1EC768692C312 /* CurrentThreadScheduler.swift in Sources */, + 39E2BD706F10D78E67A6AF8BC8242F6D /* Debug.swift in Sources */, + E061DA3F0382C6891953365C2A385758 /* Debunce.swift in Sources */, + A0AB22C391ADBEA5BB4926E8E9E69AAC /* Deferred.swift in Sources */, + 87272089D68F744FBE1B8D781F15DDA9 /* Delay.swift in Sources */, + F222B94F70306B2B179351A287BBC200 /* DelaySubscription.swift in Sources */, + AA3EB7542AC4078703408EBB5731A1CD /* DispatchQueue+Extensions.swift in Sources */, + 12D1487EBD8576DB5E3C2A0AAE5273CB /* DispatchQueueConfiguration.swift in Sources */, + 46C3D38F3A1F06C162B3D3254F59D601 /* Disposable.swift in Sources */, + 68BFBBEE42A64D958D25CC99CF87F1C4 /* Disposables.swift in Sources */, + E328DCA0657A8FD6DEF6097660DD549E /* DisposeBag.swift in Sources */, + 0A5B1E4FF6A3C9FAB96B3CDCB06808AC /* DisposeBase.swift in Sources */, + 819EE7A6BA4AB69300EC666FBE0FE625 /* DistinctUntilChanged.swift in Sources */, + 0918FD215ED4E66D444D2E771ABDB092 /* Do.swift in Sources */, + 16EEA6671C39EA56EC29FFCAC4EB2085 /* ElementAt.swift in Sources */, + 2B917E43DC48D93F82D827AFCCEFABE0 /* Empty.swift in Sources */, + 21D150A9BF3F64DAB0216DBF678104A0 /* Error.swift in Sources */, + 965AA9C5F4B56EA03CA5DE45CA3A99EE /* Errors.swift in Sources */, + 2490EF155CFCDCD9B6EC25EF4E02D3BE /* Event.swift in Sources */, + 1C3B7B5BA84D4EB21FA3E5AEE38F8DC5 /* Filter.swift in Sources */, + BF6FD676B062D7AA76C184A41336E0F5 /* Generate.swift in Sources */, + 8EBE3F035E427052202F5B31F36BA7D0 /* HistoricalScheduler.swift in Sources */, + 2CB3D4838A158E19C3EE3C4C9D0AA41E /* HistoricalSchedulerTimeConverter.swift in Sources */, + C90D97923769A222A35FB3E84D86CE9D /* ImmediateScheduler.swift in Sources */, + 1D045955DE092317223DA1ABD0E19298 /* ImmediateSchedulerType.swift in Sources */, + 9FD0BAE660027CFCB5176AD43C7D0D0F /* InfiniteSequence.swift in Sources */, + 72407882EF1419269B67C924B3E38B1C /* InvocableScheduledItem.swift in Sources */, + 9950B62BC1C5B8461AC20E440B9F1884 /* InvocableType.swift in Sources */, + 27FE2C047EF2020D95B255348D0A9EA6 /* Just.swift in Sources */, + 6AC4457C056A42F6381FE6C98CA295C5 /* Lock.swift in Sources */, + 60794624BA7748C1D44AE36A11D739AA /* LockOwnerType.swift in Sources */, + E7DB4C9C927AF29A94041F50B724B44C /* MainScheduler.swift in Sources */, + EDD607B09F54A84FFED968CF0C2DAE5B /* Map.swift in Sources */, + 419AC734B94514E4B944243D7C9503A5 /* Merge.swift in Sources */, + 798314F1A6C02B12BD1065851529D769 /* Multicast.swift in Sources */, + B86AF653407E6CA44343F4CF75EE6B57 /* Never.swift in Sources */, + 9B4B3C940A1023FC0F5775C5A9EE538B /* NopDisposable.swift in Sources */, + 825C9623078E2622EF3670907E0B955C /* Observable+Aggregate.swift in Sources */, + D613ECEA1BEE3AE60A911525CBBFDB91 /* Observable+Binding.swift in Sources */, + D52F5210CE451A5C6CE5CBA2D97D83BA /* Observable+Concurrency.swift in Sources */, + 25A8AC2C7F2D6E5162CC3C9E73FBB93D /* Observable+Creation.swift in Sources */, + BF0BA72601D23AA49FA51A94805EEC5D /* Observable+Debug.swift in Sources */, + 5BEF138B70C1462AB2943B2E9F3D14D0 /* Observable+Multiple.swift in Sources */, + 4D86AC921D39A24A67EB85F80DCD7D1E /* Observable+Single.swift in Sources */, + AF03069DDBAB161BB85720A5589FA021 /* Observable+StandardSequenceOperators.swift in Sources */, + 57187FAEAF682F535E8C6936C34E1B07 /* Observable+Time.swift in Sources */, + 16567CC5F4E3045DAC7DDED3052065C7 /* Observable.swift in Sources */, + 805CC54E8C3AC88E333B61CD323C00CC /* ObservableConvertibleType.swift in Sources */, + 914F8081CBCDF862C65BCE9B5514E433 /* ObservableType+Extensions.swift in Sources */, + 8E8AE7C863742C759A246FD64AF6541B /* ObservableType.swift in Sources */, + 443AAE329C8D4EB46EE8A3DFE8F81436 /* ObserveOn.swift in Sources */, + 2DC12F11CA151541D4F67AFF20F98CE8 /* ObserveOnSerialDispatchQueue.swift in Sources */, + 7F785047F9A55CA4BEF576F4B0DD03FE /* ObserverBase.swift in Sources */, + 881FBBF2F97E31A8D3475627F81B98DC /* ObserverType.swift in Sources */, + 9445754D2BC1443619641FCC390DD758 /* OperationQueueScheduler.swift in Sources */, + D78170F8FDCA9A93504103DA7C55EE5A /* Optional.swift in Sources */, + B343B89BE4B35D0893B19FDF823B9552 /* Platform.Darwin.swift in Sources */, + 4DF2F06AC16725DEEEA71FD913A55BEF /* Platform.Linux.swift in Sources */, + 4ED9E740B452DDAF7FB84BAE1BD8AAFE /* PriorityQueue.swift in Sources */, + B00F65FB35968C7A4C4FEC742AB4AD94 /* Producer.swift in Sources */, + C5404F62142D6675AFDC93DBBA79E952 /* PublishSubject.swift in Sources */, + 5180D0776D86ED0DB222E98D05979E5A /* Queue.swift in Sources */, + 296BC2B44D09EDCD5997264B228ED907 /* Range.swift in Sources */, + CE36A343334CB448F4B6B589851B3376 /* Reactive.swift in Sources */, + 00139D7766AB33E9E9BC1A65032CEDB7 /* RecursiveScheduler.swift in Sources */, + C9411D0E1371BB2F6814C50D6C20C8BF /* Reduce.swift in Sources */, + F6FCA56AABBDBD43ED95EDFDA2F5B0A1 /* RefCount.swift in Sources */, + 2345C25677E6AFB2FBA8B4E6FC2979EC /* RefCountDisposable.swift in Sources */, + 006A6B2BD68FCD1356F0C0570BAEA7B4 /* Repeat.swift in Sources */, + 06F6275DC4F1F7CB9E48DCE2FE15D70C /* ReplaySubject.swift in Sources */, + AF999C27C2C53D23A89A4E64E15E19A6 /* RetryWhen.swift in Sources */, + B640EFC87EA932E41AFF5760A7CA6240 /* Rx.swift in Sources */, + 7C5DEB8DC7EE2AFFDC26EE0F616FDEDC /* RxMutableBox.swift in Sources */, + F7879F55E2E3FA9ED491BDDCF1564D0A /* RxSwift-dummy.m in Sources */, + 8EACB41BBD1EC9770E293EACA4FB7830 /* Sample.swift in Sources */, + C0577F87A34D6D57CAA6D64F37DA91AE /* Scan.swift in Sources */, + 87B6321863461C276DD99B8ECFC18E38 /* ScheduledDisposable.swift in Sources */, + 40F737BBCBD2984D2A0FB3597E0B314A /* ScheduledItem.swift in Sources */, + 0F91903E10EDF79F5ADF8E2457580334 /* ScheduledItemType.swift in Sources */, + F33E9C504C68B67FF0902E6B8896EAB4 /* SchedulerServices+Emulation.swift in Sources */, + 63C4F0A492CC9C51CB05E8307751E176 /* SchedulerType.swift in Sources */, + 7242897A0DF4C86C7E63268831B58973 /* Sequence.swift in Sources */, + EE3BEB35CBD869D5966060FF12AC8930 /* SerialDispatchQueueScheduler.swift in Sources */, + D25FE11BF178099EF6A939CD9FE9373C /* SerialDisposable.swift in Sources */, + 9A6D00036D5A077513DFDB9D350DDB9D /* ShareReplay1.swift in Sources */, + DA8D0DF948018CAAF45274BEFE1499EE /* ShareReplay1WhileConnected.swift in Sources */, + 9D7A9F44AF20BF42DE293A17517AC791 /* SingleAssignmentDisposable.swift in Sources */, + 2ED2458E37BFE7D1B67E0951221E4CA6 /* SingleAsync.swift in Sources */, + 35812F38DDC38F246BDE725FA05DBD28 /* Sink.swift in Sources */, + ACA744496C6F813BD877FDC0ADD0E77F /* Skip.swift in Sources */, + 32747C78A16B7F8231F7F9934CF344FD /* SkipUntil.swift in Sources */, + 9982326FDF687307959ECCC310B14016 /* SkipWhile.swift in Sources */, + 7C8EA1593DFB636597909F434568176F /* StartWith.swift in Sources */, + 57AAD55ECF31573852903A17FE512F2C /* String+Rx.swift in Sources */, + 9BAC78BD7D0F21561C7EBD2BF6655ECC /* SubjectType.swift in Sources */, + 1DE0C7BFB7E8CA77371680A43FC6D64F /* SubscribeOn.swift in Sources */, + AA6CA7E80CC82382B2503CA6296BBF92 /* SubscriptionDisposable.swift in Sources */, + 2C146D9AD229B990B3E04D3A040386C9 /* Switch.swift in Sources */, + D56F3D9A489EF755BF7D6319B8735E10 /* SynchronizedDisposeType.swift in Sources */, + E60913F6A49D9E6085E857A93B14AA63 /* SynchronizedOnType.swift in Sources */, + 278B5DE32CF7AAA9D2D0EA978E67AFFB /* SynchronizedSubscribeType.swift in Sources */, + 8859481FE6D307CA236D7AB4EB48FB22 /* SynchronizedUnsubscribeType.swift in Sources */, + 2537CEC3C8607BC79C7B74A7B1C06873 /* TailRecursiveSink.swift in Sources */, + CE4677E95523D22583A83BE5196618C9 /* Take.swift in Sources */, + 48402B4CB662C2997A5C9131B7157FC1 /* TakeLast.swift in Sources */, + 1504EB9108CC7E0E6274AD47EEBA2101 /* TakeUntil.swift in Sources */, + BA40EC6BF8F5C49E15EB2A83AD5A7D71 /* TakeWhile.swift in Sources */, + 181F0F79C8F872636B253143431FC7DE /* Throttle.swift in Sources */, + F0EA3343EF0C3A50B5BE98543938591C /* Timeout.swift in Sources */, + 1140E414CE59956847963D1FDDD94BE1 /* Timer.swift in Sources */, + 4B06C44AF7FAD7109E1E7CCCDE18FE7B /* ToArray.swift in Sources */, + 7D0B0C268268BE1AE71907353C2A6FC0 /* Using.swift in Sources */, + 69C6FC76261CB914ADF2128F2798030B /* Variable.swift in Sources */, + 3014D005CE3BEF48C0904132B0D6EB6D /* VirtualTimeConverterType.swift in Sources */, + EB6A15FA131F6E7BEAF4F697AB134441 /* VirtualTimeScheduler.swift in Sources */, + F7B252048FA1C80838E18BFD46897ACB /* Window.swift in Sources */, + F01EE20B974C1F6AD2AF6360E3A2FDD6 /* WithLatestFrom.swift in Sources */, + 41A558D94AE85BCEB4F49BFFC0337E47 /* Zip+arity.swift in Sources */, + 0C2FC9BE770A8DEDBE0D0F272EDFB361 /* Zip+Collection.swift in Sources */, + C063EB96B041F1D95CD8189DFF3F68F6 /* Zip.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - CA915730627D2C78C10E1F4D514EDB7A /* Sources */ = { + F7D9882E8EB401B03BE9A3509E4BD529 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C247FFB5B73835CD3C3E6E1F723EBDAB /* Pods-RxTableViewDemo-dummy.m in Sources */, + 683F9520E869860C446BD88215B413D0 /* AnimatableSectionModel.swift in Sources */, + AF4D488DC153DBCA04B7877326A62AD7 /* AnimatableSectionModelType+ItemPath.swift in Sources */, + D8F1031375926D703231F4901AECE4CD /* AnimatableSectionModelType.swift in Sources */, + DA3CF61D78EBCD667E3A1EAF1B947EBE /* AnimationConfiguration.swift in Sources */, + 959F0474ADA4B5AED935D14072184047 /* Array+Extensions.swift in Sources */, + 852D45D97359E61B65EA9944E76D85DB /* Changeset.swift in Sources */, + 5E7E645BA471F7B46C6626D0A6335656 /* CollectionViewSectionedDataSource.swift in Sources */, + 0A45BB7AA801C93F982AD8252012447B /* DataSources.swift in Sources */, + 0314AE2523003F5E1814CC51102454C6 /* Differentiator.swift in Sources */, + 6EB44A361EB0C947DB3CE8DEE9A371BC /* FloatingPointType+IdentifiableType.swift in Sources */, + 10E8A94085824A8B295D7AF0F4CC8A06 /* IdentifiableType.swift in Sources */, + 5C3D74CFBDA69B8D7B77D7D7372E90AE /* IdentifiableValue.swift in Sources */, + 70B4272E34A9B612819F266948A65909 /* IntegerType+IdentifiableType.swift in Sources */, + C61ADB9C925DDD683E5206AF6597730C /* ItemPath.swift in Sources */, + DD53600F24BBA8C3CA15E4FA08448851 /* Optional+Extensions.swift in Sources */, + F2C6C849CCF1E1CCE81D37E8ADB55D59 /* RxCollectionViewSectionedAnimatedDataSource.swift in Sources */, + 9C0AE1C5C533D53C4712946376765648 /* RxCollectionViewSectionedReloadDataSource.swift in Sources */, + 73C0E4ECFDEC148175C9068E25D31CD3 /* RxDataSources-dummy.m in Sources */, + 7C99AB32B2961BAA7B6EB54089CE29A9 /* RxTableViewSectionedAnimatedDataSource.swift in Sources */, + 16B4E128E3804B5C877E68C3469F59C4 /* RxTableViewSectionedReloadDataSource.swift in Sources */, + 53EE54FD79B627E248BAF1357DCD8038 /* SectionModel.swift in Sources */, + 637DF151E54CFA05B230ED88220CD377 /* SectionModelType.swift in Sources */, + 6BF237EE5053D573585F9D5DAC362563 /* String+IdentifiableType.swift in Sources */, + 65EFAA5D59B616EEE55707950C219C99 /* TableViewSectionedDataSource.swift in Sources */, + FCFB905CE99BA25A72A31C53236E6B61 /* UI+SectionedViewType.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 4D1032A70798C4AD0ABACE47A32550E0 /* PBXTargetDependency */ = { + 554CE7EA4B14A680D8BCBF5B9AF03A54 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = RxSwift; - target = F4DD11F54BDEA61E7187E0C1CCC41577 /* RxSwift */; - targetProxy = 039D38894DDF8211F00995FC5B0FD343 /* PBXContainerItemProxy */; + target = 552436FA59024504867FCC4EFC55369C /* RxSwift */; + targetProxy = 94C736822F585734FB9E1C420306D906 /* PBXContainerItemProxy */; }; - 52D0D092D5936870F4B1E0D416B90EEA /* PBXTargetDependency */ = { + 612F12813AD82F05C6359167A5444A7D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = RxCocoa; - target = 79867C45BAED3780AC32E6872F0EDC78 /* RxCocoa */; - targetProxy = 85FA3FF0ED3C4F740CB80C74CC5F9DFE /* PBXContainerItemProxy */; + name = RxSwift; + target = 552436FA59024504867FCC4EFC55369C /* RxSwift */; + targetProxy = 64447168BF8B426550C40F31C559A3C0 /* PBXContainerItemProxy */; }; - 700377415BAD853200DA078E2A7156FA /* PBXTargetDependency */ = { + 6AC60B7CB5C9793A5A36A3C97A953E72 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = RxCocoa; - target = 79867C45BAED3780AC32E6872F0EDC78 /* RxCocoa */; - targetProxy = 2FABEC2E8633D5D276BBA62F64C27DCD /* PBXContainerItemProxy */; + name = RxDataSources; + target = 13B0540A2A791159DBC198D8FA540AF5 /* RxDataSources */; + targetProxy = A2EF51A2D627C8F3D097716255C2BA3A /* PBXContainerItemProxy */; }; - 8DFDC4460DA150407DCF571682288AEB /* PBXTargetDependency */ = { + B103B6636B402C10D9678B698D17B33A /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = RxSwift; - target = F4DD11F54BDEA61E7187E0C1CCC41577 /* RxSwift */; - targetProxy = A074049731B0800B1557EE80118FE43C /* PBXContainerItemProxy */; + name = RxCocoa; + target = E958CE527B5002EAE5DE63C4FE245059 /* RxCocoa */; + targetProxy = EA200A0726AB36EB3B21633D5C3A34B0 /* PBXContainerItemProxy */; }; - 976BF4E59511C9E1895413AFBF3D6EBB /* PBXTargetDependency */ = { + B1D7E3DA7AA7C217310977B4A47D9A74 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = RxDataSources; - target = D057EC329F500215553CD883023B9D4F /* RxDataSources */; - targetProxy = 51CABC8066BA20C611FDF987AF72243D /* PBXContainerItemProxy */; + name = RxSwift; + target = 552436FA59024504867FCC4EFC55369C /* RxSwift */; + targetProxy = B5256C61250E1AE2BC4A4FDEB1B7B1B6 /* PBXContainerItemProxy */; }; - EEC18A04705C1D65624F08D79C4900E1 /* PBXTargetDependency */ = { + B80AA08A0A4D15B33C51F676F078436A /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = RxSwift; - target = F4DD11F54BDEA61E7187E0C1CCC41577 /* RxSwift */; - targetProxy = 3E159DD13D4D825698A612538ECA3E7F /* PBXContainerItemProxy */; + name = RxCocoa; + target = E958CE527B5002EAE5DE63C4FE245059 /* RxCocoa */; + targetProxy = 33054E37AA7288043D4A334FF4B58497 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 01B0525C3AAA04F1D10E2C934631B736 /* Release */ = { + 12C18FAAE3CB1943AEFAEE46EC054664 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5C74B88FEDDD88D3129A163740E09672 /* Pods-RxTableViewDemo.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-RxTableViewDemo/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-RxTableViewDemo/Pods-RxTableViewDemo.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_RxTableViewDemo; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 13E96A645A77DAD1FD4F541F18F5DDBF /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -1498,61 +1638,74 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", "$(inherited)", ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; }; - name = Release; + name = Debug; }; - 61CCD3A3829F4DF3CEA1C83156FF807C /* Debug */ = { + 276CE33CCC4FC1E3E18FB5E97BA7141B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DEB4DEA9B6B691B91D3A1D951B003FCF /* RxDataSources.xcconfig */; + baseConfigurationReference = 7EAFABB0CC9B88CDD47FC36B7EC200DF /* Pods-RxTableViewDemo.release.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxDataSources/RxDataSources-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxDataSources/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-RxTableViewDemo/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxDataSources/RxDataSources.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = RxDataSources; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-RxTableViewDemo/Pods-RxTableViewDemo.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_RxTableViewDemo; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 711FCABA21DA18E3A4DD1A14D522BB23 /* Release */ = { + 2C69718C93E84F2B342F30BAABD35A08 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8B6204C70778BA7BEC8E6E8912A792CF /* RxSwift.xcconfig */; + baseConfigurationReference = FCF427D95B299699812817C049CE4CE8 /* RxDataSources.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; @@ -1561,27 +1714,30 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxDataSources/RxDataSources-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxDataSources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; + MODULEMAP_FILE = "Target Support Files/RxDataSources/RxDataSources.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = RxSwift; + PRODUCT_NAME = RxDataSources; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 779530BDA50D069D345E6E13417A142D /* Release */ = { + 4BD8D13D19CCE0EF5C0684E5F7CDEE6B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BCFF00744C5A1F85DBFF3A180FDA2ACE /* RxCocoa.xcconfig */; + baseConfigurationReference = C8F5BD14FBA3B56B4C1A34A6ACBB4CB3 /* RxCocoa.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; @@ -1600,17 +1756,20 @@ PRODUCT_NAME = RxCocoa; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 7C13051C6A24258694E2CD161D652906 /* Release */ = { + 7DAB56E01DD6B73BFD8D5AB55397EE63 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7EAFABB0CC9B88CDD47FC36B7EC200DF /* Pods-RxTableViewDemo.release.xcconfig */; + baseConfigurationReference = C8E4AFC16FA6F3647A8FE0111C2EDC29 /* RxSwift.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; @@ -1619,94 +1778,28 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-RxTableViewDemo/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxTableViewDemo/Pods-RxTableViewDemo.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_RxTableViewDemo; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 8A81B6F5983A716275785A5A1B1C44D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8B6204C70778BA7BEC8E6E8912A792CF /* RxSwift.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = RxSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A0AAC9E712390F06466D64FF4F76E8D3 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5C74B88FEDDD88D3129A163740E09672 /* Pods-RxTableViewDemo.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-RxTableViewDemo/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxTableViewDemo/Pods-RxTableViewDemo.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_RxTableViewDemo; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - A37822B79A6217169456B6E4E5834FD9 /* Debug */ = { + 862AF3139CD84E18D34FAF2F43CD0DA6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -1720,37 +1813,70 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", + "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - ONLY_ACTIVE_ARCH = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + BCE3AF0765399D1EB3F758264162FE7C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C8F5BD14FBA3B56B4C1A34A6ACBB4CB3 /* RxCocoa.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/RxCocoa/RxCocoa-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxCocoa/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/RxCocoa/RxCocoa.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = RxCocoa; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - CD3B9E3D0FD57D7186F8D46ED810FD71 /* Release */ = { + BF079BE335357E901C0F0E3B8A76A9E3 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DEB4DEA9B6B691B91D3A1D951B003FCF /* RxDataSources.xcconfig */; + baseConfigurationReference = FCF427D95B299699812817C049CE4CE8 /* RxDataSources.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1763,21 +1889,25 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/RxDataSources/RxDataSources.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = RxDataSources; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - CF7F6C8370D314FB0DF3F42185C6C709 /* Debug */ = { + D8C62E51D8C96BCD0A183CA1EC43A022 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BCFF00744C5A1F85DBFF3A180FDA2ACE /* RxCocoa.xcconfig */; + baseConfigurationReference = C8E4AFC16FA6F3647A8FE0111C2EDC29 /* RxSwift.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; @@ -1786,17 +1916,18 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxCocoa/RxCocoa-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxCocoa/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxCocoa/RxCocoa.modulemap"; + MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = RxCocoa; + PRODUCT_NAME = RxSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1806,11 +1937,11 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 0AB6C416F60C4257096905DFC3EE8A49 /* Build configuration list for PBXNativeTarget "RxCocoa" */ = { + 0FA98BB74DF70F5CA3E019D00BC37360 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - CF7F6C8370D314FB0DF3F42185C6C709 /* Debug */, - 779530BDA50D069D345E6E13417A142D /* Release */, + D8C62E51D8C96BCD0A183CA1EC43A022 /* Debug */, + 7DAB56E01DD6B73BFD8D5AB55397EE63 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1818,35 +1949,35 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - A37822B79A6217169456B6E4E5834FD9 /* Debug */, - 01B0525C3AAA04F1D10E2C934631B736 /* Release */, + 13E96A645A77DAD1FD4F541F18F5DDBF /* Debug */, + 862AF3139CD84E18D34FAF2F43CD0DA6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 5FB42F0651C54618DD41CAAE62AD0569 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { + 51E240E5B9BAF8EF12732A8F00E3903F /* Build configuration list for PBXNativeTarget "Pods-RxTableViewDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8A81B6F5983A716275785A5A1B1C44D2 /* Debug */, - 711FCABA21DA18E3A4DD1A14D522BB23 /* Release */, + 12C18FAAE3CB1943AEFAEE46EC054664 /* Debug */, + 276CE33CCC4FC1E3E18FB5E97BA7141B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 636F65E6FD9BC64F3891ED3544EB99BC /* Build configuration list for PBXNativeTarget "RxDataSources" */ = { + 924390AA72BFF3DC984890FB3BC789A1 /* Build configuration list for PBXNativeTarget "RxDataSources" */ = { isa = XCConfigurationList; buildConfigurations = ( - 61CCD3A3829F4DF3CEA1C83156FF807C /* Debug */, - CD3B9E3D0FD57D7186F8D46ED810FD71 /* Release */, + BF079BE335357E901C0F0E3B8A76A9E3 /* Debug */, + 2C69718C93E84F2B342F30BAABD35A08 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 808D0596822A16E32E8220C57129E32F /* Build configuration list for PBXNativeTarget "Pods-RxTableViewDemo" */ = { + F21CBD44C8D96D869BE8C9E2A69EFBAA /* Build configuration list for PBXNativeTarget "RxCocoa" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0AAC9E712390F06466D64FF4F76E8D3 /* Debug */, - 7C13051C6A24258694E2CD161D652906 /* Release */, + BCE3AF0765399D1EB3F758264162FE7C /* Debug */, + 4BD8D13D19CCE0EF5C0684E5F7CDEE6B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/Bag.swift b/RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/Bag.swift new file mode 100644 index 0000000..4ab6f94 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/Bag.swift @@ -0,0 +1,167 @@ +// +// Bag.swift +// Platform +// +// Created by Krunoslav Zaher on 2/28/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation +import Swift + +let arrayDictionaryMaxSize = 30 + +struct BagKey { + /** + Unique identifier for object added to `Bag`. + + It's underlying type is UInt64. If we assume there in an idealized CPU that works at 4GHz, + it would take ~150 years of continuous running time for it to overflow. + */ + fileprivate let rawValue: UInt64 +} + +/** +Data structure that represents a bag of elements typed `T`. + +Single element can be stored multiple times. + +Time and space complexity of insertion an deletion is O(n). + +It is suitable for storing small number of elements. +*/ +struct Bag : CustomDebugStringConvertible { + /// Type of identifier for inserted elements. + typealias KeyType = BagKey + + typealias Entry = (key: BagKey, value: T) + + fileprivate var _nextKey: BagKey = BagKey(rawValue: 0) + + // data + + // first fill inline variables + var _key0: BagKey? = nil + var _value0: T? = nil + + // last is sparse dictionary + var _dictionary: [BagKey : T]? = nil + + var _onlyFastPath = true + + /// Creates new empty `Bag`. + init() { + } + + /** + Inserts `value` into bag. + + - parameter element: Element to insert. + - returns: Key that can be used to remove element from bag. + */ + mutating func insert(_ element: T) -> BagKey { + let key = _nextKey + + _nextKey = BagKey(rawValue: _nextKey.rawValue &+ 1) + + if _key0 == nil { + _key0 = key + _value0 = element + return key + } + + _onlyFastPath = false + + if _dictionary != nil { + _dictionary![key] = element + return key + } + + if _dictionary == nil { + _dictionary = [:] + } + + _dictionary![key] = element + + return key + } + + /// - returns: Number of elements in bag. + var count: Int { + let dictionaryCount: Int = _dictionary?.count ?? 0 + return (_value0 != nil ? 1 : 0) + dictionaryCount + } + + /// Removes all elements from bag and clears capacity. + mutating func removeAll() { + _key0 = nil + _value0 = nil + + _dictionary?.removeAll(keepingCapacity: false) + } + + /** + Removes element with a specific `key` from bag. + + - parameter key: Key that identifies element to remove from bag. + - returns: Element that bag contained, or nil in case element was already removed. + */ + mutating func removeKey(_ key: BagKey) -> T? { + if _key0 == key { + _key0 = nil + let value = _value0! + _value0 = nil + return value + } + + if let existingObject = _dictionary?.removeValue(forKey: key) { + return existingObject + } + + return nil + } +} + +extension Bag { + /// A textual representation of `self`, suitable for debugging. + var debugDescription : String { + return "\(self.count) elements in Bag" + } +} + +extension Bag { + /// Enumerates elements inside the bag. + /// + /// - parameter action: Enumeration closure. + func forEach(_ action: (T) -> Void) { + if _onlyFastPath { + if let value0 = _value0 { + action(value0) + } + return + } + + let value0 = _value0 + let dictionary = _dictionary + + if let value0 = value0 { + action(value0) + } + + if dictionary?.count ?? 0 > 0 { + for element in dictionary!.values { + action(element) + } + } + } +} + +extension BagKey: Hashable { + var hashValue: Int { + return rawValue.hashValue + } +} + +func ==(lhs: BagKey, rhs: BagKey) -> Bool { + return lhs.rawValue == rhs.rawValue +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/InfiniteSequence.swift b/RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/InfiniteSequence.swift similarity index 62% rename from RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/InfiniteSequence.swift rename to RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/InfiniteSequence.swift index a594bb5..5fad383 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/InfiniteSequence.swift +++ b/RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/InfiniteSequence.swift @@ -1,6 +1,6 @@ // // InfiniteSequence.swift -// RxSwift +// Platform // // Created by Krunoslav Zaher on 6/13/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,12 +8,10 @@ import Foundation -/** -Sequence that repeats `repeatedValue` infinite number of times. -*/ -struct InfiniteSequence : SequenceType { +/// Sequence that repeats `repeatedValue` infinite number of times. +struct InfiniteSequence : Sequence { typealias Element = E - typealias Generator = AnyGenerator + typealias Iterator = AnyIterator private let _repeatedValue: E @@ -21,10 +19,10 @@ struct InfiniteSequence : SequenceType { _repeatedValue = repeatedValue } - func generate() -> Generator { + func makeIterator() -> Iterator { let repeatedValue = _repeatedValue - return AnyGenerator { + return AnyIterator { return repeatedValue } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/PriorityQueue.swift b/RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/PriorityQueue.swift similarity index 66% rename from RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/PriorityQueue.swift rename to RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/PriorityQueue.swift index efbd546..725feef 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/PriorityQueue.swift +++ b/RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/PriorityQueue.swift @@ -1,6 +1,6 @@ // // PriorityQueue.swift -// Rx +// Platform // // Created by Krunoslav Zaher on 12/27/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,15 +8,18 @@ import Foundation -struct PriorityQueue { +struct PriorityQueue { private let _hasHigherPriority: (Element, Element) -> Bool - private var _elements = [Element]() + private let _isEqual: (Element, Element) -> Bool - init(hasHigherPriority: (Element, Element) -> Bool) { + fileprivate var _elements = [Element]() + + init(hasHigherPriority: @escaping (Element, Element) -> Bool, isEqual: @escaping (Element, Element) -> Bool) { _hasHigherPriority = hasHigherPriority + _isEqual = isEqual } - mutating func enqueue(element: Element) { + mutating func enqueue(_ element: Element) { _elements.append(element) bubbleToHigherPriority(_elements.count - 1) } @@ -39,22 +42,22 @@ struct PriorityQueue { return front } - mutating func remove(element: Element) { + mutating func remove(_ element: Element) { for i in 0 ..< _elements.count { - if _elements[i] === element { + if _isEqual(_elements[i], element) { removeAt(i) return } } } - private mutating func removeAt(index: Int) { + private mutating func removeAt(_ index: Int) { let removingLast = index == _elements.count - 1 if !removingLast { swap(&_elements[index], &_elements[_elements.count - 1]) } - _elements.popLast() + _ = _elements.popLast() if !removingLast { bubbleToHigherPriority(index) @@ -62,7 +65,7 @@ struct PriorityQueue { } } - private mutating func bubbleToHigherPriority(initialUnbalancedIndex: Int) { + private mutating func bubbleToHigherPriority(_ initialUnbalancedIndex: Int) { precondition(initialUnbalancedIndex >= 0) precondition(initialUnbalancedIndex < _elements.count) @@ -70,24 +73,19 @@ struct PriorityQueue { while unbalancedIndex > 0 { let parentIndex = (unbalancedIndex - 1) / 2 - - if _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) { - swap(&_elements[unbalancedIndex], &_elements[parentIndex]) - - unbalancedIndex = parentIndex - } - else { - break - } + guard _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) else { break } + + swap(&_elements[unbalancedIndex], &_elements[parentIndex]) + unbalancedIndex = parentIndex } } - private mutating func bubbleToLowerPriority(initialUnbalancedIndex: Int) { + private mutating func bubbleToLowerPriority(_ initialUnbalancedIndex: Int) { precondition(initialUnbalancedIndex >= 0) precondition(initialUnbalancedIndex < _elements.count) var unbalancedIndex = initialUnbalancedIndex - repeat { + while true { let leftChildIndex = unbalancedIndex * 2 + 1 let rightChildIndex = unbalancedIndex * 2 + 2 @@ -101,15 +99,11 @@ struct PriorityQueue { highestPriorityIndex = rightChildIndex } - if highestPriorityIndex != unbalancedIndex { - swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex]) + guard highestPriorityIndex != unbalancedIndex else { break } - unbalancedIndex = highestPriorityIndex - } - else { - break - } - } while true + swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex]) + unbalancedIndex = highestPriorityIndex + } } } @@ -117,4 +111,4 @@ extension PriorityQueue : CustomDebugStringConvertible { var debugDescription: String { return _elements.debugDescription } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/Queue.swift b/RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/Queue.swift similarity index 53% rename from RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/Queue.swift rename to RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/Queue.swift index f38d4ae..cfe3df4 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/Queue.swift +++ b/RxTableViewDemo/Pods/RxCocoa/Platform/DataStructures/Queue.swift @@ -1,6 +1,6 @@ // // Queue.swift -// Rx +// Platform // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -16,36 +16,26 @@ averaged over N operations. Complexity of `peek` is O(1). */ -public struct Queue: SequenceType { - /** - Type of generator. - */ - public typealias Generator = AnyGenerator - +struct Queue: Sequence { + /// Type of generator. + typealias Generator = AnyIterator + private let _resizeFactor = 2 private var _storage: ContiguousArray - private var _count: Int - private var _pushNextIndex: Int - private var _initialCapacity: Int - + private var _count = 0 + private var _pushNextIndex = 0 + private let _initialCapacity: Int + /** Creates new queue. - parameter capacity: Capacity of newly created queue. */ - public init(capacity: Int) { + init(capacity: Int) { _initialCapacity = capacity - - _count = 0 - _pushNextIndex = 0 - - if capacity > 0 { - _storage = ContiguousArray(count: capacity, repeatedValue: nil) - } - else { - _storage = ContiguousArray() - } + + _storage = ContiguousArray(repeating: nil, count: capacity) } private var dequeueIndex: Int { @@ -53,31 +43,25 @@ public struct Queue: SequenceType { return index < 0 ? index + _storage.count : index } - /** - - returns: Is queue empty. - */ - public var isEmpty: Bool { + /// - returns: Is queue empty. + var isEmpty: Bool { return count == 0 } - /** - - returns: Number of elements inside queue. - */ - public var count: Int { + /// - returns: Number of elements inside queue. + var count: Int { return _count } - /** - - returns: Element in front of a list of elements to `dequeue`. - */ - public func peek() -> T { + /// - returns: Element in front of a list of elements to `dequeue`. + func peek() -> T { precondition(count > 0) return _storage[dequeueIndex]! } - mutating private func resizeTo(size: Int) { - var newStorage = ContiguousArray(count: size, repeatedValue: nil) + mutating private func resizeTo(_ size: Int) { + var newStorage = ContiguousArray(repeating: nil, count: size) let count = _count @@ -85,7 +69,7 @@ public struct Queue: SequenceType { let spaceToEndOfQueue = _storage.count - dequeueIndex // first batch is from dequeue index to end of array - let countElementsInFirstBatch = min(count, spaceToEndOfQueue) + let countElementsInFirstBatch = Swift.min(count, spaceToEndOfQueue) // second batch is wrapped from start of array to end of queue let numberOfElementsInSecondBatch = count - countElementsInFirstBatch @@ -97,19 +81,17 @@ public struct Queue: SequenceType { _storage = newStorage } - /** - Enqueues `element`. - - - parameter element: Element to enqueue. - */ - public mutating func enqueue(element: T) { + /// Enqueues `element`. + /// + /// - parameter element: Element to enqueue. + mutating func enqueue(_ element: T) { if count == _storage.count { - resizeTo(max(_storage.count, 1) * _resizeFactor) + resizeTo(Swift.max(_storage.count, 1) * _resizeFactor) } _storage[_pushNextIndex] = element _pushNextIndex += 1 - _count = _count + 1 + _count += 1 if _pushNextIndex >= _storage.count { _pushNextIndex -= _storage.count @@ -120,55 +102,53 @@ public struct Queue: SequenceType { precondition(count > 0) let index = dequeueIndex - let value = _storage[index]! - - _storage[index] = nil - - _count = _count - 1 - - return value + + defer { + _storage[index] = nil + _count -= 1 + } + + return _storage[index]! } - /** - Dequeues element or throws an exception in case queue is empty. - - - returns: Dequeued element. - */ - public mutating func dequeue() -> T? { + /// Dequeues element or throws an exception in case queue is empty. + /// + /// - returns: Dequeued element. + mutating func dequeue() -> T? { if self.count == 0 { return nil } - let value = dequeueElementOnly() - - let downsizeLimit = _storage.count / (_resizeFactor * _resizeFactor) - if _count < downsizeLimit && downsizeLimit >= _initialCapacity { - resizeTo(_storage.count / _resizeFactor) + defer { + let downsizeLimit = _storage.count / (_resizeFactor * _resizeFactor) + if _count < downsizeLimit && downsizeLimit >= _initialCapacity { + resizeTo(_storage.count / _resizeFactor) + } } - - return value + + return dequeueElementOnly() } - /** - - returns: Generator of contained elements. - */ - public func generate() -> Generator { + /// - returns: Generator of contained elements. + func makeIterator() -> AnyIterator { var i = dequeueIndex var count = _count - return AnyGenerator { + return AnyIterator { if count == 0 { return nil } - count -= 1 + defer { + count -= 1 + i += 1 + } + if i >= self._storage.count { i -= self._storage.count } - let element = self._storage[i] - i += 1 - return element + return self._storage[i] } } } diff --git a/RxTableViewDemo/Pods/RxCocoa/Platform/DispatchQueue+Extensions.swift b/RxTableViewDemo/Pods/RxCocoa/Platform/DispatchQueue+Extensions.swift new file mode 100644 index 0000000..0df1ce7 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/Platform/DispatchQueue+Extensions.swift @@ -0,0 +1,22 @@ +// +// DispatchQueue+Extensions.swift +// Platform +// +// Created by Krunoslav Zaher on 10/22/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation +import Dispatch + +extension DispatchQueue { + private static var token: DispatchSpecificKey<()> = { + let key = DispatchSpecificKey<()>() + DispatchQueue.main.setSpecific(key: key, value: ()) + return key + }() + + static var isMain: Bool { + return DispatchQueue.getSpecific(key: token) != nil + } +} diff --git a/RxTableViewDemo/Pods/RxCocoa/Platform/Platform.Darwin.swift b/RxTableViewDemo/Pods/RxCocoa/Platform/Platform.Darwin.swift new file mode 100644 index 0000000..e0d7f0d --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/Platform/Platform.Darwin.swift @@ -0,0 +1,49 @@ +// +// Platform.Darwin.swift +// Platform +// +// Created by Krunoslav Zaher on 12/29/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + + import Darwin + import Foundation + + typealias AtomicInt = Int32 + + let AtomicCompareAndSwap = OSAtomicCompareAndSwap32Barrier + let AtomicIncrement = OSAtomicIncrement32Barrier + let AtomicDecrement = OSAtomicDecrement32Barrier + + extension Thread { + + static func setThreadLocalStorageValue(_ value: T?, forKey key: String + ) { + let currentThread = Thread.current + let threadDictionary = currentThread.threadDictionary + + if let newValue = value { + threadDictionary[key] = newValue + } + else { + threadDictionary[key] = nil + } + + } + static func getThreadLocalStorageValueForKey(_ key: String) -> T? { + let currentThread = Thread.current + let threadDictionary = currentThread.threadDictionary + + return threadDictionary[key] as? T + } + } + + extension AtomicInt { + func valueSnapshot() -> Int32 { + return self + } + } + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/Platform/Platform.Linux.swift b/RxTableViewDemo/Pods/RxCocoa/Platform/Platform.Linux.swift new file mode 100644 index 0000000..ae5a49d --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/Platform/Platform.Linux.swift @@ -0,0 +1,97 @@ +// +// Platform.Linux.swift +// Platform +// +// Created by Krunoslav Zaher on 12/29/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#if os(Linux) + //////////////////////////////////////////////////////////////////////////////// + // This is not the greatest API in the world, this is just a tribute. + // !!! Proof of concept until libdispatch becomes operational. !!! + //////////////////////////////////////////////////////////////////////////////// + + import Foundation + import XCTest + import Glibc + import SwiftShims + + final class AtomicInt { + typealias IntegerLiteralType = Int + fileprivate var value: Int32 = 0 + fileprivate var _lock = NSRecursiveLock() + + func lock() { + _lock.lock() + } + func unlock() { + _lock.unlock() + } + + func valueSnapshot() -> Int32 { + return value + } + } + + extension AtomicInt: ExpressibleByIntegerLiteral { + convenience init(integerLiteral value: Int) { + self.init() + self.value = Int32(value) + } + } + + func >(lhs: AtomicInt, rhs: Int32) -> Bool { + return lhs.value > rhs + } + func ==(lhs: AtomicInt, rhs: Int32) -> Bool { + return lhs.value == rhs + } + + func AtomicIncrement(_ atomic: inout AtomicInt) -> Int32 { + atomic.lock(); defer { atomic.unlock() } + atomic.value += 1 + return atomic.value + } + + func AtomicDecrement(_ atomic: inout AtomicInt) -> Int32 { + atomic.lock(); defer { atomic.unlock() } + atomic.value -= 1 + return atomic.value + } + + func AtomicCompareAndSwap(_ l: Int32, _ r: Int32, _ atomic: inout AtomicInt) -> Bool { + atomic.lock(); defer { atomic.unlock() } + if atomic.value == l { + atomic.value = r + return true + } + + return false + } + + extension Thread { + + static func setThreadLocalStorageValue(_ value: T?, forKey key: String) { + let currentThread = Thread.current + var threadDictionary = currentThread.threadDictionary + + if let newValue = value { + threadDictionary[key] = newValue + } + else { + threadDictionary[key] = nil + } + + currentThread.threadDictionary = threadDictionary + } + + static func getThreadLocalStorageValueForKey(_ key: String) -> T? { + let currentThread = Thread.current + let threadDictionary = currentThread.threadDictionary + + return threadDictionary[key] as? T + } + } + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/README.md b/RxTableViewDemo/Pods/RxCocoa/README.md index b5d5519..c80e351 100644 --- a/RxTableViewDemo/Pods/RxCocoa/README.md +++ b/RxTableViewDemo/Pods/RxCocoa/README.md @@ -1,18 +1,19 @@ Miss Electric Eel 2016 RxSwift: ReactiveX for Swift ====================================== -[![Travis CI](https://travis-ci.org/ReactiveX/RxSwift.svg?branch=master)](https://travis-ci.org/ReactiveX/RxSwift) ![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20OSX%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux%28experimental%29-333333.svg) ![pod](https://img.shields.io/cocoapods/v/RxSwift.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Travis CI](https://travis-ci.org/ReactiveX/RxSwift.svg?branch=master)](https://travis-ci.org/ReactiveX/RxSwift) ![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-333333.svg) ![pod](https://img.shields.io/cocoapods/v/RxSwift.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) +## About Rx -Xcode 7.3 Swift 2.2 required +**:warning: This readme describes RxSwift 3.0 version that requires Swift 3.0.** -## About Rx +**:warning: If you are looking for Swift 2.3 compatible version, please take a look at RxSwift ~> 2.0 versions and [swift-2.3](https://github.com/ReactiveX/RxSwift/tree/rxswift-2.0) branch.** Rx is a [generic abstraction of computation](https://youtu.be/looJcaeboBY) expressed through `Observable` interface. This is a Swift version of [Rx](https://github.com/Reactive-Extensions/Rx.NET). -It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/OSX environment. +It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS environment. Cross platform documentation can be found on [ReactiveX.io](http://reactivex.io/). @@ -32,21 +33,20 @@ KVO observing, async operations and streams are all unified under [abstraction o * [debugging](Documentation/GettingStarted.md#debugging) * [the math behind Rx](Documentation/MathBehindRx.md) * [what are hot and cold observable sequences?](Documentation/HotAndColdObservables.md) -* [what does the the public API look like?](Documentation/API.md) ###### ... install -* Integrate RxSwift/RxCocoa with my app. [Installation Guide](Documentation/Installation.md) +* Integrate RxSwift/RxCocoa with my app. [Installation Guide](#installation) ###### ... hack around -* with example app. [Running Example App](Documentation/ExampleApp.md) +* with the example app. [Running Example App](Documentation/ExampleApp.md) * with operators in playgrounds. [Playgrounds](Documentation/Playgrounds.md) ###### ... interact -* All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences.
[![Slack channel](http://slack.rxswift.org/badge.svg)](http://slack.rxswift.org) [Join Slack Channel](http://slack.rxswift.org/) -* Report a problem using the library. [Open an Issue With Bug Template](Documentation/IssueTemplate.md) +* All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences.
[![Slack channel](http://rxswift-slack.herokuapp.com/badge.svg)](http://slack.rxswift.org) [Join Slack Channel](http://rxswift-slack.herokuapp.com) +* Report a problem using the library. [Open an Issue With Bug Template](.github/ISSUE_TEMPLATE.md) * Request a new feature. [Open an Issue With Feature Request Template](Documentation/NewFeatureRequestTemplate.md) @@ -65,7 +65,138 @@ KVO observing, async operations and streams are all unified under [abstraction o * Does this exist for Android? [RxJava](https://github.com/ReactiveX/RxJava) * Where is all of this going, what is the future, what about reactive architectures, how do you design entire apps this way? [Cycle.js](https://github.com/cyclejs/cycle-core) - this is javascript, but [RxJS](https://github.com/Reactive-Extensions/RxJS) is javascript version of Rx. -##### References +## Usage + + + + + + + + + + + + + + + + + + + +
Here's an exampleIn Action
Define search for GitHub repositories ...
+let searchResults = searchBar.rx.text.orEmpty
+    .throttle(0.3, scheduler: MainScheduler.instance)
+    .distinctUntilChanged()
+    .flatMapLatest { query -> Observable<[Repository]> in
+        if query.isEmpty {
+            return .just([])
+        }
+
+        return searchGitHub(query)
+            .catchErrorJustReturn([])
+    }
+    .observeOn(MainScheduler.instance)
... then bind the results to your tableview
+searchResults
+    .bindTo(tableView.rx.items(cellIdentifier: "Cell")) {
+        (index, repository: Repository, cell) in
+        cell.textLabel?.text = repository.name
+        cell.detailTextLabel?.text = repository.url
+    }
+    .addDisposableTo(disposeBag)
+ + +## Requirements + +* Xcode 8.0 +* Swift 3.0 + +## Installation + +Rx doesn't contain any external dependencies. + +These are currently the supported options: + +### Manual + +Open Rx.xcworkspace, choose `RxExample` and hit run. This method will build everything and run the sample app + +### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html) + +**Tested with `pod --version`: `1.1.1`** + +``` +# Podfile +use_frameworks! + +target 'YOUR_TARGET_NAME' do + pod 'RxSwift', '~> 3.0' + pod 'RxCocoa', '~> 3.0' +end + +# RxTests and RxBlocking make the most sense in the context of unit/integration tests +target 'YOUR_TESTING_TARGET' do + pod 'RxBlocking', '~> 3.0' + pod 'RxTest', '~> 3.0' +end +``` + +Replace `YOUR_TARGET_NAME` and then, in the `Podfile` directory, type: + +``` +$ pod install +``` + +### [Carthage](https://github.com/Carthage/Carthage) + +**Tested with `carthage version`: `0.18.1`** + +Add this to `Cartfile` + +``` +github "ReactiveX/RxSwift" ~> 3.0 +``` + +``` +$ carthage update +``` + +### [Swift Package Manager](https://github.com/apple/swift-package-manager) + +**Tested with `swift build --version`: `3.0.0 (swiftpm-19)`** + +Create a `Package.swift` file. + +``` +import PackageDescription + +let package = Package( + name: "RxTestProject", + targets: [], + dependencies: [ + .Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 3) + ] +) +``` + +``` +$ swift build +``` + +### Manually using git submodules + +* Add RxSwift as a submodule + +``` +$ git submodule add git@github.com:ReactiveX/RxSwift.git +``` + +* Drag `Rx.xcodeproj` into Project Navigator +* Go to `Project > Targets > Build Phases > Link Binary With Libraries`, click `+` and select `RxSwift-[Platform]` and `RxCocoa-[Platform]` targets + + +## References * [http://reactivex.io/](http://reactivex.io/) * [Reactive Extensions GitHub (GitHub)](https://github.com/Reactive-Extensions) diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/ControlEvent.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/ControlEvent.swift similarity index 62% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/ControlEvent.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/ControlEvent.swift index 8157389..ef8d430 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/ControlEvent.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/ControlEvent.swift @@ -1,6 +1,6 @@ // // ControlEvent.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 8/28/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -11,14 +11,10 @@ import Foundation import RxSwift #endif -/** -Protocol that enables extension of `ControlEvent`. -*/ +/// Protocol that enables extension of `ControlEvent`. public protocol ControlEventType : ObservableType { - /** - - returns: `ControlEvent` interface - */ + /// - returns: `ControlEvent` interface func asControlEvent() -> ControlEvent } @@ -48,38 +44,28 @@ public struct ControlEvent : ControlEventType { let _events: Observable - /** - Initializes control event with a observable sequence that represents events. - - - parameter events: Observable sequence that represents events. - - returns: Control event created with a observable sequence of events. - */ - public init(events: Ev) { + /// Initializes control event with a observable sequence that represents events. + /// + /// - parameter events: Observable sequence that represents events. + /// - returns: Control event created with a observable sequence of events. + public init(events: Ev) where Ev.E == E { _events = events.subscribeOn(ConcurrentMainScheduler.instance) } - /** - Subscribes an observer to control events. - - - parameter observer: Observer to subscribe to events. - - returns: Disposable object that can be used to unsubscribe the observer from receiving control events. - */ - public func subscribe(observer: O) -> Disposable { + /// Subscribes an observer to control events. + /// + /// - parameter observer: Observer to subscribe to events. + /// - returns: Disposable object that can be used to unsubscribe the observer from receiving control events. + public func subscribe(_ observer: O) -> Disposable where O.E == E { return _events.subscribe(observer) } - /** - - returns: `Observable` interface. - */ - @warn_unused_result(message="http://git.io/rxs.uo") + /// - returns: `Observable` interface. public func asObservable() -> Observable { return _events } - /** - - returns: `ControlEvent` interface. - */ - @warn_unused_result(message="http://git.io/rxs.uo") + /// - returns: `ControlEvent` interface. public func asControlEvent() -> ControlEvent { return self } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/ControlProperty.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/ControlProperty.swift new file mode 100644 index 0000000..6cb2c61 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/ControlProperty.swift @@ -0,0 +1,124 @@ +// +// ControlProperty.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 8/28/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation +#if !RX_NO_MODULE +import RxSwift +#endif + +/// Protocol that enables extension of `ControlProperty`. +public protocol ControlPropertyType : ObservableType, ObserverType { + + /// - returns: `ControlProperty` interface + func asControlProperty() -> ControlProperty +} + +/** + Unit for `Observable`/`ObservableType` that represents property of UI element. + + Sequence of values only represents initial control value and user initiated value changes. + Programatic value changes won't be reported. + + It's properties are: + + - it never fails + - `shareReplay(1)` behavior + - it's stateful, upon subscription (calling subscribe) last element is immediately replayed if it was produced + - it will `Complete` sequence on control being deallocated + - it never errors out + - it delivers events on `MainScheduler.instance` + + **The implementation of `ControlProperty` will ensure that sequence of values is being subscribed on main scheduler + (`subscribeOn(ConcurrentMainScheduler.instance)` behavior).** + + **It is implementor's responsibility to make sure that that all other properties enumerated above are satisfied.** + + **If they aren't, then using this unit communicates wrong properties and could potentially break someone's code.** + + **In case `values` observable sequence that is being passed into initializer doesn't satisfy all enumerated + properties, please don't use this unit.** +*/ +public struct ControlProperty : ControlPropertyType { + public typealias E = PropertyType + + let _values: Observable + let _valueSink: AnyObserver + + /// Initializes control property with a observable sequence that represents property values and observer that enables + /// binding values to property. + /// + /// - parameter values: Observable sequence that represents property values. + /// - parameter valueSink: Observer that enables binding values to control property. + /// - returns: Control property created with a observable sequence of values and an observer that enables binding values + /// to property. + public init(values: V, valueSink: S) where E == V.E, E == S.E { + _values = values.subscribeOn(ConcurrentMainScheduler.instance) + _valueSink = valueSink.asObserver() + } + + /// Subscribes an observer to control property values. + /// + /// - parameter observer: Observer to subscribe to property values. + /// - returns: Disposable object that can be used to unsubscribe the observer from receiving control property values. + public func subscribe(_ observer: O) -> Disposable where O.E == E { + return _values.subscribe(observer) + } + + /// `ControlEvent` of user initiated value changes. Every time user updates control value change event + /// will be emitted from `changed` event. + /// + /// Programatic changes to control value won't be reported. + /// + /// It contains all control property values except for first one. + /// + /// The name only implies that sequence element will be generated once user changes a value and not that + /// adjacent sequence values need to be different (e.g. because of interaction between programatic and user updates, + /// or for any other reason). + public var changed: ControlEvent { + get { + return ControlEvent(events: _values.skip(1)) + } + } + + /// - returns: `Observable` interface. + public func asObservable() -> Observable { + return _values + } + + /// - returns: `ControlProperty` interface. + public func asControlProperty() -> ControlProperty { + return self + } + + /// Binds event to user interface. + /// + /// - In case next element is received, it is being set to control value. + /// - In case error is received, DEBUG buids raise fatal error, RELEASE builds log event to standard output. + /// - In case sequence completes, nothing happens. + public func on(_ event: Event) { + switch event { + case .error(let error): + bindingErrorToInterface(error) + case .next: + _valueSink.on(event) + case .completed: + _valueSink.on(event) + } + } +} + +extension ControlPropertyType where E == String? { + /// Transforms control property of type `String?` into control property of type `String`. + public var orEmpty: ControlProperty { + let original: ControlProperty = self.asControlProperty() + + let values: Observable = original._values.map { $0 ?? "" } + let valueSink: AnyObserver = original._valueSink.mapObserver { $0 } + return ControlProperty(values: values, valueSink: valueSink) + } +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/ControlEvent+Driver.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ControlEvent+Driver.swift similarity index 72% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/ControlEvent+Driver.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ControlEvent+Driver.swift index 6e2559b..ca73235 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/ControlEvent+Driver.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ControlEvent+Driver.swift @@ -1,6 +1,6 @@ // // ControlEvent+Driver.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 9/19/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -12,12 +12,9 @@ import RxSwift #endif extension ControlEvent { - /** - Converts `ControlEvent` to `Driver` unit. - - `ControlEvent` already can't fail, so no special case needs to be handled. - */ - @warn_unused_result(message="http://git.io/rxs.uo") + /// Converts `ControlEvent` to `Driver` unit. + /// + /// `ControlEvent` already can't fail, so no special case needs to be handled. public func asDriver() -> Driver { return self.asDriver { (error) -> Driver in #if DEBUG @@ -27,4 +24,4 @@ extension ControlEvent { #endif } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/ControlProperty+Driver.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ControlProperty+Driver.swift similarity index 71% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/ControlProperty+Driver.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ControlProperty+Driver.swift index 9e7048d..a8a59e2 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/ControlProperty+Driver.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ControlProperty+Driver.swift @@ -1,6 +1,6 @@ // // ControlProperty+Driver.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 9/19/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -12,12 +12,9 @@ import RxSwift #endif extension ControlProperty { - /** - Converts `ControlProperty` to `Driver` unit. - - `ControlProperty` already can't fail, so no special case needs to be handled. - */ - @warn_unused_result(message="http://git.io/rxs.uo") + /// Converts `ControlProperty` to `Driver` unit. + /// + /// `ControlProperty` already can't fail, so no special case needs to be handled. public func asDriver() -> Driver { return self.asDriver { (error) -> Driver in #if DEBUG @@ -27,4 +24,4 @@ extension ControlProperty { #endif } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Driver+Subscription.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Driver+Subscription.swift new file mode 100644 index 0000000..d04007d --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Driver+Subscription.swift @@ -0,0 +1,125 @@ +// +// Driver+Subscription.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 9/19/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation +#if !RX_NO_MODULE +import RxSwift +#endif + +private let driverErrorMessage = "`drive*` family of methods can be only called from `MainThread`.\n" + +"This is required to ensure that the last replayed `Driver` element is delivered on `MainThread`.\n" + +// This would ideally be Driver, but unfortunatelly Driver can't be extended in Swift 3.0 +extension SharedSequenceConvertibleType where SharingStrategy == DriverSharingStrategy { + /** + Creates new subscription and sends elements to observer. + This method can be only called from `MainThread`. + + In this form it's equivalent to `subscribe` method, but it communicates intent better. + + - parameter observer: Observer that receives events. + - returns: Disposable object that can be used to unsubscribe the observer from the subject. + */ + public func drive(_ observer: O) -> Disposable where O.E == E { + MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage) + return self.asSharedSequence().asObservable().subscribe(observer) + } + + /** + Creates new subscription and sends elements to observer. + This method can be only called from `MainThread`. + + In this form it's equivalent to `subscribe` method, but it communicates intent better. + + - parameter observer: Observer that receives events. + - returns: Disposable object that can be used to unsubscribe the observer from the subject. + */ + public func drive(_ observer: O) -> Disposable where O.E == E? { + MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage) + return self.asSharedSequence().asObservable().map { $0 as E? }.subscribe(observer) + } + + /** + Creates new subscription and sends elements to variable. + This method can be only called from `MainThread`. + + - parameter variable: Target variable for sequence elements. + - returns: Disposable object that can be used to unsubscribe the observer from the variable. + */ + public func drive(_ variable: Variable) -> Disposable { + MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage) + return drive(onNext: { e in + variable.value = e + }) + } + + /** + Creates new subscription and sends elements to variable. + This method can be only called from `MainThread`. + + - parameter variable: Target variable for sequence elements. + - returns: Disposable object that can be used to unsubscribe the observer from the variable. + */ + public func drive(_ variable: Variable) -> Disposable { + MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage) + return drive(onNext: { e in + variable.value = e + }) + } + + /** + Subscribes to observable sequence using custom binder function. + This method can be only called from `MainThread`. + + - parameter with: Function used to bind elements from `self`. + - returns: Object representing subscription. + */ + public func drive(_ transformation: (Observable) -> R) -> R { + MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage) + return transformation(self.asObservable()) + } + + /** + Subscribes to observable sequence using custom binder function and final parameter passed to binder function + after `self` is passed. + + public func drive(with: Self -> R1 -> R2, curriedArgument: R1) -> R2 { + return with(self)(curriedArgument) + } + + This method can be only called from `MainThread`. + + - parameter with: Function used to bind elements from `self`. + - parameter curriedArgument: Final argument passed to `binder` to finish binding process. + - returns: Object representing subscription. + */ + public func drive(_ with: (Observable) -> (R1) -> R2, curriedArgument: R1) -> R2 { + MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage) + return with(self.asObservable())(curriedArgument) + } + + /** + Subscribes an element handler, a completion handler and disposed handler to an observable sequence. + This method can be only called from `MainThread`. + + Error callback is not exposed because `Driver` can't error out. + + - parameter onNext: Action to invoke for each element in the observable sequence. + - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. + gracefully completed, errored, or if the generation is cancelled by disposing subscription) + - parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has + gracefully completed, errored, or if the generation is cancelled by disposing subscription) + - returns: Subscription object used to unsubscribe from the observable sequence. + */ + public func drive(onNext: ((E) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) -> Disposable { + MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage) + return self.asObservable().subscribe(onNext: onNext, onCompleted: onCompleted, onDisposed: onDisposed) + } +} + + diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Driver.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Driver.swift new file mode 100644 index 0000000..b31c2b5 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Driver.swift @@ -0,0 +1,89 @@ +// +// Driver.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 9/26/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation +#if !RX_NO_MODULE + import RxSwift +#endif + + +/** + Unit that represents observable sequence with following properties: + + - it never fails + - it delivers events on `MainScheduler.instance` + - `shareReplayLatestWhileConnected()` behavior + - all observers share sequence computation resources + - it's stateful, upon subscription (calling subscribe) last element is immediatelly replayed if it was produced + - computation of elements is reference counted with respect to the number of observers + - if there are no subscribers, it will release sequence computation resources + + `Driver` can be considered a builder pattern for observable sequences that drive the application. + + If observable sequence has produced at least one element, after new subscription is made last produced element will be + immediately replayed on the same thread on which the subscription was made. + + When using `drive*`, `subscribe*` and `bind*` family of methods, they should always be called from main thread. + + If `drive*`, `subscribe*` and `bind*` are called from background thread, it is possible that initial replay + will happen on background thread, and subsequent events will arrive on main thread. + + To find out more about units and how to use them, please visit `Documentation/Units.md`. + */ +public typealias Driver = SharedSequence + +public struct DriverSharingStrategy: SharingStrategyProtocol { + public static var scheduler: SchedulerType { return driverObserveOnScheduler } + public static func share(_ source: Observable) -> Observable { + return source.shareReplayLatestWhileConnected() + } +} + +extension SharedSequenceConvertibleType where SharingStrategy == DriverSharingStrategy { + /// Adds `asDriver` to `SharingSequence` with `DriverSharingStrategy`. + public func asDriver() -> Driver { + return self.asSharedSequence() + } +} + +/** + This method can be used in unit tests to ensure that driver is using mock schedulers instead of + main schedulers. + + **This shouldn't be used in normal release builds.** +*/ +public func driveOnScheduler(_ scheduler: SchedulerType, action: () -> ()) { + let originalObserveOnScheduler = driverObserveOnScheduler + driverObserveOnScheduler = scheduler + + action() + + // If you remove this line , compiler buggy optimizations will change behavior of this code + _forceCompilerToStopDoingInsaneOptimizationsThatBreakCode(driverObserveOnScheduler) + // Scary, I know + + driverObserveOnScheduler = originalObserveOnScheduler +} + +#if os(Linux) + import Glibc +#endif + +func _forceCompilerToStopDoingInsaneOptimizationsThatBreakCode(_ scheduler: SchedulerType) { + let a: Int32 = 1 +#if os(Linux) + let b = 314 + Int32(Glibc.random() & 1) +#else + let b = 314 + Int32(arc4random() & 1) +#endif + if a == b { + print(scheduler) + } +} + +fileprivate var driverObserveOnScheduler: SchedulerType = MainScheduler.instance diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/ObservableConvertibleType+Driver.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ObservableConvertibleType+Driver.swift similarity index 68% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/ObservableConvertibleType+Driver.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ObservableConvertibleType+Driver.swift index 5bc3f43..ef97b0e 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/ObservableConvertibleType+Driver.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ObservableConvertibleType+Driver.swift @@ -1,6 +1,6 @@ // // ObservableConvertibleType+Driver.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 9/19/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -18,11 +18,10 @@ extension ObservableConvertibleType { - parameter onErrorJustReturn: Element to return in case of error and after that complete the sequence. - returns: Driving observable sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func asDriver(onErrorJustReturn onErrorJustReturn: E) -> Driver { + public func asDriver(onErrorJustReturn: E) -> Driver { let source = self .asObservable() - .observeOn(driverObserveOnScheduler) + .observeOn(DriverSharingStrategy.scheduler) .catchErrorJustReturn(onErrorJustReturn) return Driver(source) } @@ -33,11 +32,10 @@ extension ObservableConvertibleType { - parameter onErrorDriveWith: Driver that continues to drive the sequence in case of error. - returns: Driving observable sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func asDriver(onErrorDriveWith onErrorDriveWith: Driver) -> Driver { + public func asDriver(onErrorDriveWith: Driver) -> Driver { let source = self .asObservable() - .observeOn(driverObserveOnScheduler) + .observeOn(DriverSharingStrategy.scheduler) .catchError { _ in onErrorDriveWith.asObservable() } @@ -50,14 +48,13 @@ extension ObservableConvertibleType { - parameter onErrorRecover: Calculates driver that continues to drive the sequence in case of error. - returns: Driving observable sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func asDriver(onErrorRecover onErrorRecover: (error: ErrorType) -> Driver) -> Driver { + public func asDriver(onErrorRecover: @escaping (_ error: Swift.Error) -> Driver) -> Driver { let source = self .asObservable() - .observeOn(driverObserveOnScheduler) + .observeOn(DriverSharingStrategy.scheduler) .catchError { error in - onErrorRecover(error: error).asObservable() + onErrorRecover(error).asObservable() } return Driver(source) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Variable+Driver.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Variable+Driver.swift similarity index 61% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Variable+Driver.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Variable+Driver.swift index f2c038f..9f9b21d 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Variable+Driver.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Variable+Driver.swift @@ -1,6 +1,6 @@ // // Variable+Driver.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 12/28/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -12,15 +12,12 @@ import Foundation #endif extension Variable { - /** - Converts `Variable` to `Driver` unit. - - - returns: Driving observable sequence. - */ - @warn_unused_result(message="http://git.io/rxs.uo") + /// Converts `Variable` to `Driver` unit. + /// + /// - returns: Driving observable sequence. public func asDriver() -> Driver { let source = self.asObservable() - .observeOn(driverObserveOnScheduler) + .observeOn(DriverSharingStrategy.scheduler) return Driver(source) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/ObservableConvertibleType+SharedSequence.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/ObservableConvertibleType+SharedSequence.swift new file mode 100644 index 0000000..4cb6de5 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/ObservableConvertibleType+SharedSequence.swift @@ -0,0 +1,60 @@ +// +// ObservableConvertibleType+SharedSequence.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 9/19/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation +#if !RX_NO_MODULE +import RxSwift +#endif + +extension ObservableConvertibleType { + /** + Converts anything convertible to `Observable` to `SharedSequence` unit. + + - parameter onErrorJustReturn: Element to return in case of error and after that complete the sequence. + - returns: Driving observable sequence. + */ + public func asSharedSequence(sharingStrategy: S.Type = S.self, onErrorJustReturn: E) -> SharedSequence { + let source = self + .asObservable() + .observeOn(S.scheduler) + .catchErrorJustReturn(onErrorJustReturn) + return SharedSequence(source) + } + + /** + Converts anything convertible to `Observable` to `SharedSequence` unit. + + - parameter onErrorDriveWith: SharedSequence that provides elements of the sequence in case of error. + - returns: Driving observable sequence. + */ + public func asSharedSequence(sharingStrategy: S.Type = S.self, onErrorDriveWith: SharedSequence) -> SharedSequence { + let source = self + .asObservable() + .observeOn(S.scheduler) + .catchError { _ in + onErrorDriveWith.asObservable() + } + return SharedSequence(source) + } + + /** + Converts anything convertible to `Observable` to `SharedSequence` unit. + + - parameter onErrorRecover: Calculates driver that continues to drive the sequence in case of error. + - returns: Driving observable sequence. + */ + public func asSharedSequence(sharingStrategy: S.Type = S.self, onErrorRecover: @escaping (_ error: Swift.Error) -> SharedSequence) -> SharedSequence { + let source = self + .asObservable() + .observeOn(S.scheduler) + .catchError { error in + onErrorRecover(error).asObservable() + } + return SharedSequence(source) + } +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence+Operators+arity.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence+Operators+arity.swift new file mode 100644 index 0000000..e66fc47 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence+Operators+arity.swift @@ -0,0 +1,351 @@ +// This file is autogenerated. Take a look at `Preprocessor` target in RxSwift project +// +// SharedSequence+Operators+arity.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 10/14/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation +#if !RX_NO_MODULE +import RxSwift +#endif + + + +// 2 + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. + + - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func zip + (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy { + let source = Observable.zip( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. + + - parameter resultSelector: Function to invoke whenever any of the sources produces an element. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy { + let source = Observable.combineLatest( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + + + +// 3 + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. + + - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy { + let source = Observable.zip( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. + + - parameter resultSelector: Function to invoke whenever any of the sources produces an element. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy { + let source = Observable.combineLatest( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + + + +// 4 + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. + + - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy, + O1.SharingStrategy == O4.SharingStrategy { + let source = Observable.zip( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), source4.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. + + - parameter resultSelector: Function to invoke whenever any of the sources produces an element. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy, + O1.SharingStrategy == O4.SharingStrategy { + let source = Observable.combineLatest( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), source4.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + + + +// 5 + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. + + - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy, + O1.SharingStrategy == O4.SharingStrategy, + O1.SharingStrategy == O5.SharingStrategy { + let source = Observable.zip( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), source4.asSharedSequence().asObservable(), source5.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. + + - parameter resultSelector: Function to invoke whenever any of the sources produces an element. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy, + O1.SharingStrategy == O4.SharingStrategy, + O1.SharingStrategy == O5.SharingStrategy { + let source = Observable.combineLatest( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), source4.asSharedSequence().asObservable(), source5.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + + + +// 6 + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. + + - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy, + O1.SharingStrategy == O4.SharingStrategy, + O1.SharingStrategy == O5.SharingStrategy, + O1.SharingStrategy == O6.SharingStrategy { + let source = Observable.zip( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), source4.asSharedSequence().asObservable(), source5.asSharedSequence().asObservable(), source6.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. + + - parameter resultSelector: Function to invoke whenever any of the sources produces an element. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy, + O1.SharingStrategy == O4.SharingStrategy, + O1.SharingStrategy == O5.SharingStrategy, + O1.SharingStrategy == O6.SharingStrategy { + let source = Observable.combineLatest( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), source4.asSharedSequence().asObservable(), source5.asSharedSequence().asObservable(), source6.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + + + +// 7 + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. + + - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy, + O1.SharingStrategy == O4.SharingStrategy, + O1.SharingStrategy == O5.SharingStrategy, + O1.SharingStrategy == O6.SharingStrategy, + O1.SharingStrategy == O7.SharingStrategy { + let source = Observable.zip( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), source4.asSharedSequence().asObservable(), source5.asSharedSequence().asObservable(), source6.asSharedSequence().asObservable(), source7.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. + + - parameter resultSelector: Function to invoke whenever any of the sources produces an element. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy, + O1.SharingStrategy == O4.SharingStrategy, + O1.SharingStrategy == O5.SharingStrategy, + O1.SharingStrategy == O6.SharingStrategy, + O1.SharingStrategy == O7.SharingStrategy { + let source = Observable.combineLatest( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), source4.asSharedSequence().asObservable(), source5.asSharedSequence().asObservable(), source6.asSharedSequence().asObservable(), source7.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + + + +// 8 + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. + + - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy, + O1.SharingStrategy == O4.SharingStrategy, + O1.SharingStrategy == O5.SharingStrategy, + O1.SharingStrategy == O6.SharingStrategy, + O1.SharingStrategy == O7.SharingStrategy, + O1.SharingStrategy == O8.SharingStrategy { + let source = Observable.zip( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), source4.asSharedSequence().asObservable(), source5.asSharedSequence().asObservable(), source6.asSharedSequence().asObservable(), source7.asSharedSequence().asObservable(), source8.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + +extension SharedSequence { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. + + - parameter resultSelector: Function to invoke whenever any of the sources produces an element. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) + -> SharedSequence where O1.SharingStrategy == O2.SharingStrategy, + O1.SharingStrategy == O3.SharingStrategy, + O1.SharingStrategy == O4.SharingStrategy, + O1.SharingStrategy == O5.SharingStrategy, + O1.SharingStrategy == O6.SharingStrategy, + O1.SharingStrategy == O7.SharingStrategy, + O1.SharingStrategy == O8.SharingStrategy { + let source = Observable.combineLatest( + source1.asSharedSequence().asObservable(), source2.asSharedSequence().asObservable(), source3.asSharedSequence().asObservable(), source4.asSharedSequence().asObservable(), source5.asSharedSequence().asObservable(), source6.asSharedSequence().asObservable(), source7.asSharedSequence().asObservable(), source8.asSharedSequence().asObservable(), + resultSelector: resultSelector + ) + + return SharedSequence(source) + } +} + + diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Operators.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence+Operators.swift similarity index 53% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Operators.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence+Operators.swift index c3fb732..d76fbd3 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Operators.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence+Operators.swift @@ -1,6 +1,6 @@ // -// Driver+Operators.swift -// Rx +// SharedSequence+Operators.swift +// RxCocoa // // Created by Krunoslav Zaher on 9/19/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -12,7 +12,7 @@ import RxSwift #endif // MARK: map -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Projects each element of an observable sequence into a new form. @@ -20,34 +20,32 @@ extension DriverConvertibleType { - parameter selector: A transform function to apply to each source element. - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func map(selector: E -> R) -> Driver { + public func map(_ selector: @escaping (E) -> R) -> SharedSequence { let source = self .asObservable() .map(selector) - return Driver(source) + return SharedSequence(source) } } // MARK: filter -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Filters the elements of an observable sequence based on a predicate. - parameter predicate: A function to test each source element for a condition. - returns: An observable sequence that contains elements from the input sequence that satisfy the condition. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func filter(predicate: (E) -> Bool) -> Driver { + public func filter(_ predicate: @escaping (E) -> Bool) -> SharedSequence { let source = self .asObservable() .filter(predicate) - return Driver(source) + return SharedSequence(source) } } // MARK: switchLatest -extension DriverConvertibleType where E : DriverConvertibleType { +extension SharedSequenceConvertibleType where E : SharedSequenceConvertibleType, E.SharingStrategy == SharingStrategy { /** Transforms an observable sequence of observable sequences into an observable sequence @@ -58,18 +56,17 @@ extension DriverConvertibleType where E : DriverConvertibleType { - returns: The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func switchLatest() -> Driver { + public func switchLatest() -> SharedSequence { let source: Observable = self .asObservable() - .map { $0.asDriver() } + .map { $0.asSharedSequence() } .switchLatest() - return Driver(source) + return SharedSequence(source) } } // MARK: flatMapLatest -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Projects each element of an observable sequence into a new sequence of observable sequences and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. @@ -80,18 +77,17 @@ extension DriverConvertibleType { - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func flatMapLatest(selector: (E) -> Driver) - -> Driver { + public func flatMapLatest(_ selector: @escaping (E) -> SharedSequence) + -> SharedSequence { let source: Observable = self .asObservable() .flatMapLatest(selector) - return Driver(source) + return SharedSequence(source) } } // MARK: flatMapFirst -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. @@ -100,78 +96,37 @@ extension DriverConvertibleType { - parameter selector: A transform function to apply to element that was observed while no observable is executing in parallel. - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence that was received while no other sequence was being calculated. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func flatMapFirst(selector: (E) -> Driver) - -> Driver { + public func flatMapFirst(_ selector: @escaping (E) -> SharedSequence) + -> SharedSequence { let source: Observable = self .asObservable() .flatMapFirst(selector) - return Driver(source) + return SharedSequence(source) } } -// MARK: doOn -extension DriverConvertibleType { - - /** - Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - - - parameter eventHandler: Action to invoke for each event in the observable sequence. - - returns: The source sequence with the side-effecting behavior applied. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func doOn(eventHandler: (Event) -> Void) - -> Driver { - let source = self.asObservable() - .doOn(eventHandler) - - return Driver(source) - } - - /** - Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. This callback will never be invoked since driver can't error out. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - returns: The source sequence with the side-effecting behavior applied. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func doOn(onNext onNext: (E -> Void)? = nil, onError: (ErrorType -> Void)? = nil, onCompleted: (() -> Void)? = nil) - -> Driver { - let source = self.asObservable() - .doOn(onNext: onNext, onError: onError, onCompleted: onCompleted) - - return Driver(source) - } - +// MARK: do +extension SharedSequenceConvertibleType { /** - Invokes an action for each Next event in the observable sequence, and propagates all observer messages through the result sequence. + Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - parameter onNext: Action to invoke for each element in the observable sequence. - - returns: The source sequence with the side-effecting behavior applied. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func doOnNext(onNext: (E -> Void)) - -> Driver { - return self.doOn(onNext: onNext) - } - - /** - Invokes an action for the Completed event in the observable sequence, and propagates all observer messages through the result sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. + - parameter onSubscribe: Action to invoke before subscribing to source observable sequence. + - parameter onDispose: Action to invoke after subscription to source observable has been disposed for any reason. It can be either because sequence terminates for some reason or observer subscription being disposed. - returns: The source sequence with the side-effecting behavior applied. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func doOnCompleted(onCompleted: (() -> Void)) - -> Driver { - return self.doOn(onCompleted: onCompleted) + public func `do`(onNext: ((E) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onSubscribe: (() -> ())? = nil, onDispose: (() -> ())? = nil) + -> SharedSequence { + let source = self.asObservable() + .do(onNext: onNext, onCompleted: onCompleted, onSubscribe: onSubscribe, onDispose: onDispose) + + return SharedSequence(source) } } // MARK: debug -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Prints received events for all observers on standard output. @@ -179,33 +134,31 @@ extension DriverConvertibleType { - parameter identifier: Identifier that is printed together with event description to standard output. - returns: An observable sequence whose events are printed to standard output. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func debug(identifier: String? = nil, file: String = #file, line: UInt = #line, function: String = #function) -> Driver { + public func debug(_ identifier: String? = nil, file: String = #file, line: UInt = #line, function: String = #function) -> SharedSequence { let source = self.asObservable() .debug(identifier, file: file, line: line, function: function) - return Driver(source) + return SharedSequence(source) } } // MARK: distinctUntilChanged -extension DriverConvertibleType where E: Equatable { +extension SharedSequenceConvertibleType where E: Equatable { /** Returns an observable sequence that contains only distinct contiguous elements according to equality operator. - returns: An observable sequence only containing the distinct contiguous elements, based on equality operator, from the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func distinctUntilChanged() - -> Driver { + -> SharedSequence { let source = self.asObservable() .distinctUntilChanged({ $0 }, comparer: { ($0 == $1) }) - return Driver(source) + return SharedSequence(source) } } -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Returns an observable sequence that contains only distinct contiguous elements according to the `keySelector`. @@ -213,11 +166,10 @@ extension DriverConvertibleType { - parameter keySelector: A function to compute the comparison key for each element. - returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func distinctUntilChanged(keySelector: (E) -> K) -> Driver { + public func distinctUntilChanged(_ keySelector: @escaping (E) -> K) -> SharedSequence { let source = self.asObservable() .distinctUntilChanged(keySelector, comparer: { $0 == $1 }) - return Driver(source) + return SharedSequence(source) } /** @@ -226,11 +178,10 @@ extension DriverConvertibleType { - parameter comparer: Equality comparer for computed key values. - returns: An observable sequence only containing the distinct contiguous elements, based on `comparer`, from the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func distinctUntilChanged(comparer: (lhs: E, rhs: E) -> Bool) -> Driver { + public func distinctUntilChanged(_ comparer: @escaping (E, E) -> Bool) -> SharedSequence { let source = self.asObservable() .distinctUntilChanged({ $0 }, comparer: comparer) - return Driver(source) + return SharedSequence(source) } /** @@ -240,17 +191,16 @@ extension DriverConvertibleType { - parameter comparer: Equality comparer for computed key values. - returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value and the comparer, from the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func distinctUntilChanged(keySelector: (E) -> K, comparer: (lhs: K, rhs: K) -> Bool) -> Driver { + public func distinctUntilChanged(_ keySelector: @escaping (E) -> K, comparer: @escaping (K, K) -> Bool) -> SharedSequence { let source = self.asObservable() .distinctUntilChanged(keySelector, comparer: comparer) - return Driver(source) + return SharedSequence(source) } } // MARK: flatMap -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. @@ -258,17 +208,16 @@ extension DriverConvertibleType { - parameter selector: A transform function to apply to each element. - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func flatMap(selector: (E) -> Driver) -> Driver { + public func flatMap(_ selector: @escaping (E) -> SharedSequence) -> SharedSequence { let source = self.asObservable() .flatMap(selector) - return Driver(source) + return SharedSequence(source) } } // MARK: merge -extension DriverConvertibleType where E : DriverConvertibleType { +extension SharedSequenceConvertibleType where E : SharedSequenceConvertibleType, E.SharingStrategy == SharingStrategy { /** Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence. @@ -276,12 +225,11 @@ extension DriverConvertibleType where E : DriverConvertibleType { - parameter maxConcurrent: Maximum number of inner observable sequences being subscribed to concurrently. - returns: The observable sequence that merges the elements of the observable sequences. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func merge() -> Driver { + public func merge() -> SharedSequence { let source = self.asObservable() - .map { $0.asDriver() } + .map { $0.asSharedSequence() } .merge() - return Driver(source) + return SharedSequence(source) } /** @@ -289,56 +237,54 @@ extension DriverConvertibleType where E : DriverConvertibleType { - returns: The observable sequence that merges the elements of the inner sequences. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func merge(maxConcurrent maxConcurrent: Int) - -> Driver { + public func merge(maxConcurrent: Int) + -> SharedSequence { let source = self.asObservable() - .map { $0.asDriver() } + .map { $0.asSharedSequence() } .merge(maxConcurrent: maxConcurrent) - return Driver(source) + return SharedSequence(source) } } // MARK: throttle -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** - Ignores elements from an observable sequence which are followed by another element within a specified relative time duration, using the specified scheduler to run throttling timers. - - `throttle` and `debounce` are synonyms. - - - parameter dueTime: Throttling duration for each element. - - returns: The throttled sequence. + Returns an Observable that emits the first and the latest item emitted by the source Observable during sequential time windows of a specified duration. + + This operator makes sure that no two elements are emitted in less then dueTime. + + - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) + + - parameter dueTime: Throttling duration for each element. + - parameter latest: Should latest element received in a dueTime wide time window since last element emission be emitted. + - returns: The throttled sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func throttle(dueTime: RxTimeInterval) - -> Driver { + public func throttle(_ dueTime: RxTimeInterval) + -> SharedSequence { let source = self.asObservable() - .throttle(dueTime, scheduler: driverObserveOnScheduler) + .throttle(dueTime, scheduler: SharingStrategy.scheduler) - return Driver(source) + return SharedSequence(source) } /** Ignores elements from an observable sequence which are followed by another element within a specified relative time duration, using the specified scheduler to run throttling timers. - `throttle` and `debounce` are synonyms. - - parameter dueTime: Throttling duration for each element. - returns: The throttled sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func debounce(dueTime: RxTimeInterval) - -> Driver { + public func debounce(_ dueTime: RxTimeInterval) + -> SharedSequence { let source = self.asObservable() - .debounce(dueTime, scheduler: driverObserveOnScheduler) + .debounce(dueTime, scheduler: SharingStrategy.scheduler) - return Driver(source) + return SharedSequence(source) } } // MARK: scan -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Applies an accumulator function over an observable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. @@ -348,80 +294,74 @@ extension DriverConvertibleType { - parameter accumulator: An accumulator function to be invoked on each element. - returns: An observable sequence containing the accumulated values. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func scan(seed: A, accumulator: (A, E) -> A) - -> Driver { + public func scan(_ seed: A, accumulator: @escaping (A, E) -> A) + -> SharedSequence { let source = self.asObservable() .scan(seed, accumulator: accumulator) - return Driver(source) + return SharedSequence(source) } } // MARK: concat -extension SequenceType where Generator.Element : DriverConvertibleType { +extension SharedSequence { /** - Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. + Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func concat() - -> Driver { - let source = self.lazy.map { $0.asDriver().asObservable() }.concat() - return Driver(source) + - returns: An observable sequence that contains the elements of each given sequence, in sequential order. + */ + public static func concat(_ sequence: S) -> SharedSequence + where S.Iterator.Element == SharedSequence { + let source = Observable.concat(sequence.lazy.map { $0.asObservable() }) + return SharedSequence(source) } -} - -extension CollectionType where Generator.Element : DriverConvertibleType { /** Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. - returns: An observable sequence that contains the elements of each given sequence, in sequential order. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func concat() - -> Driver { - let source = self.map { $0.asDriver().asObservable() }.concat() - return Driver(source) + public static func concat(_ collection: C) -> SharedSequence + where C.Iterator.Element == SharedSequence { + let source = Observable.concat(collection.map { $0.asObservable() }) + return SharedSequence(source) } } // MARK: zip -extension CollectionType where Generator.Element : DriverConvertibleType { +extension SharedSequence { /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. + Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func zip(resultSelector: [Generator.Element.E] throws -> R) -> Driver { - let source = self.map { $0.asDriver().asObservable() }.zip(resultSelector) - return Driver(source) + - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func zip(_ collection: C, _ resultSelector: @escaping ([Element]) throws -> R) -> SharedSequence + where C.Iterator.Element == SharedSequence { + let source = Observable.zip(collection.map { $0.asSharedSequence().asObservable() }, resultSelector) + return SharedSequence(source) } } // MARK: combineLatest -extension CollectionType where Generator.Element : DriverConvertibleType { +extension SharedSequence { /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. + Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func combineLatest(resultSelector: [Generator.Element.E] throws -> R) -> Driver { - let source = self.map { $0.asDriver().asObservable() }.combineLatest(resultSelector) - return Driver(source) + - parameter resultSelector: Function to invoke whenever any of the sources produces an element. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func combineLatest(_ collection: C, _ resultSelector: @escaping ([Element]) throws -> R) -> SharedSequence + where C.Iterator.Element == SharedSequence { + let source = Observable.combineLatest(collection.map { $0.asObservable() }, resultSelector) + return SharedSequence(source) } } // MARK: withLatestFrom -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Merges two observable sequences into one observable sequence by combining each element from self with the latest element from the second source, if any. @@ -430,11 +370,11 @@ extension DriverConvertibleType { - parameter resultSelector: Function to invoke for each element from the self combined with the latest element from the second source, if any. - returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function. */ - public func withLatestFrom(second: SecondO, resultSelector: (E, SecondO.E) -> ResultType) -> Driver { + public func withLatestFrom(_ second: SecondO, resultSelector: @escaping (E, SecondO.E) -> ResultType) -> SharedSequence where SecondO.SharingStrategy == SecondO.SharingStrategy { let source = self.asObservable() - .withLatestFrom(second.asDriver(), resultSelector: resultSelector) + .withLatestFrom(second.asSharedSequence(), resultSelector: resultSelector) - return Driver(source) + return SharedSequence(source) } /** @@ -443,16 +383,16 @@ extension DriverConvertibleType { - parameter second: Second observable source. - returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function. */ - public func withLatestFrom(second: SecondO) -> Driver { + public func withLatestFrom(_ second: SecondO) -> SharedSequence { let source = self.asObservable() - .withLatestFrom(second.asDriver()) + .withLatestFrom(second.asSharedSequence()) - return Driver(source) + return SharedSequence(source) } } // MARK: skip -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. @@ -462,17 +402,16 @@ extension DriverConvertibleType { - parameter count: The number of elements to skip before returning the remaining elements. - returns: An observable sequence that contains the elements that occur after the specified index in the input sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func skip(count: Int) - -> Driver { + public func skip(_ count: Int) + -> SharedSequence { let source = self.asObservable() .skip(count) - return Driver(source) + return SharedSequence(source) } } // MARK: startWith -extension DriverConvertibleType { +extension SharedSequenceConvertibleType { /** Prepends a value to an observable sequence. @@ -482,12 +421,11 @@ extension DriverConvertibleType { - parameter element: Element to prepend to the specified sequence. - returns: The source sequence prepended with the specified values. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func startWith(element: E) - -> Driver { + public func startWith(_ element: E) + -> SharedSequence { let source = self.asObservable() .startWith(element) - return Driver(source) + return SharedSequence(source) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence.swift new file mode 100644 index 0000000..a0a4162 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/SharedSequence.swift @@ -0,0 +1,191 @@ +// +// SharedSequence.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 8/27/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation +#if !RX_NO_MODULE + import RxSwift +#endif + +/** + Unit that represents observable sequence that shares computation resources with following properties: + + - it never fails + - it delivers events on `SharingStrategy.scheduler` + - sharing strategy is customizable using `SharingStrategy.share` behavior + + `SharedSequence` can be considered a builder pattern for observable sequences that share computation resources. + + To find out more about units and how to use them, please visit `Documentation/Units.md`. +*/ +public struct SharedSequence : SharedSequenceConvertibleType { + public typealias E = Element + public typealias SharingStrategy = S + + let _source: Observable + + init(_ source: Observable) { + self._source = S.share(source) + } + + init(raw: Observable) { + self._source = raw + } + + #if EXPANDABLE_SHARED_SEQUENCE + /** + This method is extension hook in case this unit needs to extended from outside the library. + + By defining `EXPANDABLE_SHARED_SEQUENCE` one agrees that it's up to him to ensure shared sequence + properties are preserved after extension. + */ + public static func createUnsafe(source: O) -> SharedSequence { + return SharedSequence(raw: source.asObservable()) + } + #endif + + /** + - returns: Built observable sequence. + */ + public func asObservable() -> Observable { + return _source + } + + /** + - returns: `self` + */ + public func asSharedSequence() -> SharedSequence { + return self + } +} + +/** + Different `SharedSequence` sharing strategies must conform to this protocol. + */ +public protocol SharingStrategyProtocol { + /** + Scheduled on which all sequence events will be delivered. + */ + static var scheduler: SchedulerType { get } + + /** + Computation resources sharing strategy for multiple sequence observers. + + E.g. One can choose `shareReplayWhenConnected`, `shareReplay` or `share` + as sequence event sharing strategies, but also do something more exotic, like + implementing promises or lazy loading chains. + */ + static func share(_ source: Observable) -> Observable +} + +/** +A type that can be converted to `SharedSequence`. +*/ +public protocol SharedSequenceConvertibleType : ObservableConvertibleType { + associatedtype SharingStrategy: SharingStrategyProtocol + + /** + Converts self to `SharedSequence`. + */ + func asSharedSequence() -> SharedSequence +} + +extension SharedSequenceConvertibleType { + public func asObservable() -> Observable { + return asSharedSequence().asObservable() + } +} + + +extension SharedSequence { + + /** + Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message. + + - returns: An observable sequence with no elements. + */ + public static func empty() -> SharedSequence { + return SharedSequence(Observable.empty().subscribeOn(S.scheduler)) + } + + /** + Returns a non-terminating observable sequence, which can be used to denote an infinite duration. + + - returns: An observable sequence whose observers will never get called. + */ + public static func never() -> SharedSequence { + return SharedSequence(Observable.never()) + } + + /** + Returns an observable sequence that contains a single element. + + - parameter element: Single element in the resulting observable sequence. + - returns: An observable sequence containing the single specified element. + */ + public static func just(_ element: E) -> SharedSequence { + return SharedSequence(Observable.just(element).subscribeOn(S.scheduler)) + } + + /** + Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. + + - parameter observableFactory: Observable factory function to invoke for each observer that subscribes to the resulting sequence. + - returns: An observable sequence whose observers trigger an invocation of the given observable factory function. + */ + public static func deferred(_ observableFactory: @escaping () -> SharedSequence) + -> SharedSequence { + return SharedSequence(Observable.deferred { observableFactory().asObservable() }) + } + + /** + This method creates a new Observable instance with a variable number of elements. + + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + + - parameter elements: Elements to generate. + - returns: The observable sequence whose elements are pulled from the given arguments. + */ + public static func of(_ elements: E ...) -> SharedSequence { + let source = Observable.from(elements, scheduler: S.scheduler) + return SharedSequence(raw: source) + } +} + +extension SharedSequence where Element : SignedInteger { + /** + Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages. + + - seealso: [interval operator on reactivex.io](http://reactivex.io/documentation/operators/interval.html) + + - parameter period: Period for producing the values in the resulting sequence. + - returns: An observable sequence that produces a value after each period. + */ + public static func interval(_ period: RxTimeInterval) + -> SharedSequence { + return SharedSequence(Observable.interval(period, scheduler: S.scheduler)) + } +} + +// MARK: timer + +extension SharedSequence where Element: SignedInteger { + /** + Returns an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the specified scheduler to run timers. + + - seealso: [timer operator on reactivex.io](http://reactivex.io/documentation/operators/timer.html) + + - parameter dueTime: Relative time at which to produce the first value. + - parameter period: Period to produce subsequent values. + - returns: An observable sequence that produces a value after due time has elapsed and then each period. + */ + public static func timer(_ dueTime: RxTimeInterval, period: RxTimeInterval) + -> SharedSequence { + return SharedSequence(Observable.timer(dueTime, period: period, scheduler: S.scheduler)) + } +} + diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/Variable+SharedSequence.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/Variable+SharedSequence.swift new file mode 100644 index 0000000..904f5f7 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/Variable+SharedSequence.swift @@ -0,0 +1,23 @@ +// +// Variable+SharedSequence.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 12/28/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation +#if !RX_NO_MODULE + import RxSwift +#endif + +extension Variable { + /// Converts `Variable` to `SharedSequence` unit. + /// + /// - returns: Observable sequence. + public func asSharedSequence(strategy: SharingStrategy.Type = SharingStrategy.self) -> SharedSequence { + let source = self.asObservable() + .observeOn(SharingStrategy.scheduler) + return SharedSequence(source) + } +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/UIBindingObserver.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/UIBindingObserver.swift new file mode 100644 index 0000000..087c74c --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/CocoaUnits/UIBindingObserver.swift @@ -0,0 +1,65 @@ +// +// UIBindingObserver.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 2/7/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation +import Dispatch +#if !RX_NO_MODULE + import RxSwift +#endif + +/** +Observer that enforces interface binding rules: + * can't bind errors (in debug builds binding of errors causes `fatalError` in release builds errors are being logged) + * ensures binding is performed on main thread + +`UIBindingObserver` doesn't retain target interface and in case owned interface element is released, element isn't bound. + + In case event binding is attempted from non main dispatch queue, event binding will be dispatched async to main dispatch + queue. +*/ +public class UIBindingObserver : ObserverType where UIElementType: AnyObject { + public typealias E = Value + + weak var UIElement: UIElementType? + + let binding: (UIElementType, Value) -> Void + + /// Initializes `ViewBindingObserver` using + public init(UIElement: UIElementType, binding: @escaping (UIElementType, Value) -> Void) { + self.UIElement = UIElement + self.binding = binding + } + + /// Binds next element to owner view as described in `binding`. + public func on(_ event: Event) { + if !DispatchQueue.isMain { + DispatchQueue.main.async { + self.on(event) + } + return + } + + switch event { + case .next(let element): + if let view = self.UIElement { + binding(view, element) + } + case .error(let error): + bindingErrorToInterface(error) + case .completed: + break + } + } + + /// Erases type of observer. + /// + /// - returns: type erased observer. + public func asObserver() -> AnyObserver { + return AnyObserver(eventHandler: on) + } +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CLLocationManager+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CLLocationManager+Rx.swift deleted file mode 100644 index 18318c7..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CLLocationManager+Rx.swift +++ /dev/null @@ -1,218 +0,0 @@ -// -// CLLocationManager+Rx.swift -// RxCocoa -// -// Created by Carlos García on 8/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import CoreLocation -#if !RX_NO_MODULE -import RxSwift -#endif - - -extension CLLocationManager { - - /** - Reactive wrapper for `delegate`. - - For more information take a look at `DelegateProxyType` protocol documentation. - */ - public var rx_delegate: DelegateProxy { - return proxyForObject(RxCLLocationManagerDelegateProxy.self, self) - } - - // MARK: Responding to Location Events - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didUpdateLocations: Observable<[CLLocation]> { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didUpdateLocations:))) - .map { a in - return try castOrThrow([CLLocation].self, a[1]) - } - } - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didFailWithError: Observable { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didFailWithError:))) - .map { a in - return try castOrThrow(NSError.self, a[1]) - } - } - - #if os(iOS) || os(OSX) - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didFinishDeferredUpdatesWithError: Observable { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didFinishDeferredUpdatesWithError:))) - .map { a in - return try castOptionalOrThrow(NSError.self, a[1]) - } - } - #endif - - #if os(iOS) - - // MARK: Pausing Location Updates - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didPauseLocationUpdates: Observable { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManagerDidPauseLocationUpdates(_:))) - .map { _ in - return () - } - } - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didResumeLocationUpdates: Observable { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManagerDidResumeLocationUpdates(_:))) - .map { _ in - return () - } - } - - // MARK: Responding to Heading Events - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didUpdateHeading: Observable { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didUpdateHeading:))) - .map { a in - return try castOrThrow(CLHeading.self, a[1]) - } - } - - // MARK: Responding to Region Events - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didEnterRegion: Observable { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didEnterRegion:))) - .map { a in - return try castOrThrow(CLRegion.self, a[1]) - } - } - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didExitRegion: Observable { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didExitRegion:))) - .map { a in - return try castOrThrow(CLRegion.self, a[1]) - } - } - - #endif - - #if os(iOS) || os(OSX) - - /** - Reactive wrapper for `delegate` message. - */ - @available(OSX 10.10, *) - public var rx_didDetermineStateForRegion: Observable<(state: CLRegionState, region: CLRegion)> { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didDetermineState:forRegion:))) - .map { a in - let stateNumber = try castOrThrow(NSNumber.self, a[1]) - let state = CLRegionState(rawValue: stateNumber.integerValue) ?? CLRegionState.Unknown - let region = try castOrThrow(CLRegion.self, a[2]) - return (state: state, region: region) - } - } - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_monitoringDidFailForRegionWithError: Observable<(region: CLRegion?, error: NSError)> { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:monitoringDidFailForRegion:withError:))) - .map { a in - let region = try castOptionalOrThrow(CLRegion.self, a[1]) - let error = try castOrThrow(NSError.self, a[2]) - return (region: region, error: error) - } - } - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didStartMonitoringForRegion: Observable { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didStartMonitoringForRegion:))) - .map { a in - return try castOrThrow(CLRegion.self, a[1]) - } - } - - #endif - - #if os(iOS) - - // MARK: Responding to Ranging Events - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didRangeBeaconsInRegion: Observable<(beacons: [CLBeacon], region: CLBeaconRegion)> { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didRangeBeacons:inRegion:))) - .map { a in - let beacons = try castOrThrow([CLBeacon].self, a[1]) - let region = try castOrThrow(CLBeaconRegion.self, a[2]) - return (beacons: beacons, region: region) - } - } - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_rangingBeaconsDidFailForRegionWithError: Observable<(region: CLBeaconRegion, error: NSError)> { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:rangingBeaconsDidFailForRegion:withError:))) - .map { a in - let region = try castOrThrow(CLBeaconRegion.self, a[1]) - let error = try castOrThrow(NSError.self, a[2]) - return (region: region, error: error) - } - } - - // MARK: Responding to Visit Events - - /** - Reactive wrapper for `delegate` message. - */ - @available(iOS 8.0, *) - public var rx_didVisit: Observable { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didVisit:))) - .map { a in - return try castOrThrow(CLVisit.self, a[1]) - } - } - - #endif - - // MARK: Responding to Authorization Changes - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didChangeAuthorizationStatus: Observable { - return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didChangeAuthorizationStatus:))) - .map { a in - let number = try castOrThrow(NSNumber.self, a[1]) - return CLAuthorizationStatus(rawValue: Int32(number.integerValue)) ?? .NotDetermined - } - } - - - -} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/ControlProperty.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/ControlProperty.swift deleted file mode 100644 index a432f0e..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/ControlProperty.swift +++ /dev/null @@ -1,110 +0,0 @@ -// -// ControlProperty.swift -// Rx -// -// Created by Krunoslav Zaher on 8/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE -import RxSwift -#endif - -/** -Protocol that enables extension of `ControlProperty`. -*/ -public protocol ControlPropertyType : ObservableType, ObserverType { - - /** - - returns: `ControlProperty` interface - */ - func asControlProperty() -> ControlProperty -} - -/** - Unit for `Observable`/`ObservableType` that represents property of UI element. - - It's properties are: - - - it never fails - - `shareReplay(1)` behavior - - it's stateful, upon subscription (calling subscribe) last element is immediately replayed if it was produced - - it will `Complete` sequence on control being deallocated - - it never errors out - - it delivers events on `MainScheduler.instance` - - **The implementation of `ControlProperty` will ensure that sequence of values is being subscribed on main scheduler - (`subscribeOn(ConcurrentMainScheduler.instance)` behavior).** - - **It is implementor's responsibility to make sure that that all other properties enumerated above are satisfied.** - - **If they aren't, then using this unit communicates wrong properties and could potentially break someone's code.** - - **In case `values` observable sequence that is being passed into initializer doesn't satisfy all enumerated - properties, please don't use this unit.** -*/ -public struct ControlProperty : ControlPropertyType { - public typealias E = PropertyType - - let _values: Observable - let _valueSink: AnyObserver - - /** - Initializes control property with a observable sequence that represents property values and observer that enables - binding values to property. - - - parameter values: Observable sequence that represents property values. - - parameter valueSink: Observer that enables binding values to control property. - - returns: Control property created with a observable sequence of values and an observer that enables binding values - to property. - */ - public init(values: V, valueSink: S) { - _values = values.subscribeOn(ConcurrentMainScheduler.instance) - _valueSink = valueSink.asObserver() - } - - /** - Subscribes an observer to control property values. - - - parameter observer: Observer to subscribe to property values. - - returns: Disposable object that can be used to unsubscribe the observer from receiving control property values. - */ - public func subscribe(observer: O) -> Disposable { - return _values.subscribe(observer) - } - - /** - - returns: `Observable` interface. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func asObservable() -> Observable { - return _values - } - - /** - - returns: `ControlProperty` interface. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func asControlProperty() -> ControlProperty { - return self - } - - /** - Binds event to user interface. - - - In case next element is received, it is being set to control value. - - In case error is received, DEBUG buids raise fatal error, RELEASE builds log event to standard output. - - In case sequence completes, nothing happens. - */ - public func on(event: Event) { - switch event { - case .Error(let error): - bindingErrorToInterface(error) - case .Next: - _valueSink.on(event) - case .Completed: - _valueSink.on(event) - } - } -} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Operators+arity.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Operators+arity.swift deleted file mode 100644 index dde0f05..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Operators+arity.swift +++ /dev/null @@ -1,322 +0,0 @@ -// This file is autogenerated. Take a look at `Preprocessor` target in RxSwift project -// -// Driver+Operators+arity.swift -// Rx -// -// Created by Krunoslav Zaher on 10/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE -import RxSwift -#endif - - - -// 2 - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func zip - (source1: O1, _ source2: O2, resultSelector: (O1.E, O2.E) throws -> E) - -> Driver { - let source = Observable.zip( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func combineLatest - (source1: O1, _ source2: O2, resultSelector: (O1.E, O2.E) throws -> E) - -> Driver { - let source = Observable.combineLatest( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - - - -// 3 - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func zip - (source1: O1, _ source2: O2, _ source3: O3, resultSelector: (O1.E, O2.E, O3.E) throws -> E) - -> Driver { - let source = Observable.zip( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, resultSelector: (O1.E, O2.E, O3.E) throws -> E) - -> Driver { - let source = Observable.combineLatest( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - - - -// 4 - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func zip - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: (O1.E, O2.E, O3.E, O4.E) throws -> E) - -> Driver { - let source = Observable.zip( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: (O1.E, O2.E, O3.E, O4.E) throws -> E) - -> Driver { - let source = Observable.combineLatest( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - - - -// 5 - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func zip - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) - -> Driver { - let source = Observable.zip( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) - -> Driver { - let source = Observable.combineLatest( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - - - -// 6 - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func zip - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) - -> Driver { - let source = Observable.zip( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) - -> Driver { - let source = Observable.combineLatest( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - - - -// 7 - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func zip - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) - -> Driver { - let source = Observable.zip( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(), source7.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) - -> Driver { - let source = Observable.combineLatest( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(), source7.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - - - -// 8 - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func zip - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) - -> Driver { - let source = Observable.zip( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(), source7.asDriver().asObservable(), source8.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - -extension Driver { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) - -> Driver { - let source = Observable.combineLatest( - source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(), source7.asDriver().asObservable(), source8.asDriver().asObservable(), - resultSelector: resultSelector - ) - - return Driver(source) - } -} - diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Subscription.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Subscription.swift deleted file mode 100644 index d56f8cb..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver+Subscription.swift +++ /dev/null @@ -1,103 +0,0 @@ -// -// Driver+Subscription.swift -// Rx -// -// Created by Krunoslav Zaher on 9/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE -import RxSwift -#endif - -extension DriverConvertibleType { - /** - Creates new subscription and sends elements to observer. - - In this form it's equivalent to `subscribe` method, but it communicates intent better. - - - parameter observer: Observer that receives events. - - returns: Disposable object that can be used to unsubscribe the observer from the subject. - */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func drive(observer: O) -> Disposable { - MainScheduler.ensureExecutingOnScheduler() - return self.asObservable().subscribe(observer) - } - - /** - Creates new subscription and sends elements to variable. - - - parameter variable: Target variable for sequence elements. - - returns: Disposable object that can be used to unsubscribe the observer from the variable. - */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func drive(variable: Variable) -> Disposable { - return drive(onNext: { e in - variable.value = e - }) - } - - /** - Subscribes to observable sequence using custom binder function. - - - parameter with: Function used to bind elements from `self`. - - returns: Object representing subscription. - */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func drive(transformation: Observable -> R) -> R { - MainScheduler.ensureExecutingOnScheduler() - return transformation(self.asObservable()) - } - - /** - Subscribes to observable sequence using custom binder function and final parameter passed to binder function - after `self` is passed. - - public func drive(with: Self -> R1 -> R2, curriedArgument: R1) -> R2 { - return with(self)(curriedArgument) - } - - - parameter with: Function used to bind elements from `self`. - - parameter curriedArgument: Final argument passed to `binder` to finish binding process. - - returns: Object representing subscription. - */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func drive(with: Observable -> R1 -> R2, curriedArgument: R1) -> R2 { - MainScheduler.ensureExecutingOnScheduler() - return with(self.asObservable())(curriedArgument) - } - - /** - Subscribes an element handler, a completion handler and disposed handler to an observable sequence. - - Error callback is not exposed because `Driver` can't error out. - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - gracefully completed, errored, or if the generation is cancelled by disposing subscription) - - parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has - gracefully completed, errored, or if the generation is cancelled by disposing subscription) - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func drive(onNext onNext: ((E) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) -> Disposable { - MainScheduler.ensureExecutingOnScheduler() - return self.asObservable().subscribe(onNext: onNext, onCompleted: onCompleted, onDisposed: onDisposed) - } - - /** - Subscribes an element handler to an observable sequence. - - - parameter onNext: Action to invoke for each element in the observable sequence. - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func driveNext(onNext: E -> Void) -> Disposable { - MainScheduler.ensureExecutingOnScheduler() - return self.asObservable().subscribeNext(onNext) - } -} - - diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver.swift deleted file mode 100644 index d12f939..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/Driver/Driver.swift +++ /dev/null @@ -1,221 +0,0 @@ -// -// Driver.swift -// Rx -// -// Created by Krunoslav Zaher on 8/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE -import RxSwift -#endif - -/** -A type that can be converted to `Driver`. -*/ -public protocol DriverConvertibleType : ObservableConvertibleType { - - /** - Converts self to `Driver`. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - func asDriver() -> Driver -} - -extension DriverConvertibleType { - @warn_unused_result(message="http://git.io/rxs.uo") - public func asObservable() -> Observable { - return asDriver().asObservable() - } -} - -/** - Unit that represents observable sequence with following properties: - - - it never fails - - it delivers events on `MainScheduler.instance` - - `shareReplayLatestWhileConnected()` behavior - - all observers share sequence computation resources - - it's stateful, upon subscription (calling subscribe) last element is immediatelly replayed if it was produced - - computation of elements is reference counted with respect to the number of observers - - if there are no subscribers, it will release sequence computation resources - - `Driver` can be considered a builder pattern for observable sequences that drive the application. - - If observable sequence has produced at least one element, after new subscription is made last produced element will be - immediately replayed on the same thread on which the subscription was made. - - When using `drive*`, `subscribe*` and `bind*` family of methods, they should always be called from main thread. - - If `drive*`, `subscribe*` and `bind*` are called from background thread, it is possible that initial replay - will happen on background thread, and subsequent events will arrive on main thread. - - To find out more about units and how to use them, please visit `Documentation/Units.md`. -*/ -public struct Driver : DriverConvertibleType { - public typealias E = Element - - let _source: Observable - - init(_ source: Observable) { - self._source = source.shareReplayLatestWhileConnected() - } - - init(raw: Observable) { - self._source = raw - } - - #if EXPANDABLE_DRIVER - public static func createUnsafe(source: O) -> Driver { - return Driver(raw: source.asObservable()) - } - #endif - - /** - - returns: Built observable sequence. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func asObservable() -> Observable { - return _source - } - - /** - - returns: `self` - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func asDriver() -> Driver { - return self - } -} - - -extension Driver { - - /** - Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message. - - - returns: An observable sequence with no elements. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func empty() -> Driver { - return Driver(raw: Observable.empty().subscribeOn(driverSubscribeOnScheduler)) - } - - /** - Returns a non-terminating observable sequence, which can be used to denote an infinite duration. - - - returns: An observable sequence whose observers will never get called. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func never() -> Driver { - return Driver(raw: Observable.never().subscribeOn(driverSubscribeOnScheduler)) - } - - /** - Returns an observable sequence that contains a single element. - - - parameter element: Single element in the resulting observable sequence. - - returns: An observable sequence containing the single specified element. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func just(element: E) -> Driver { - return Driver(raw: Observable.just(element).subscribeOn(driverSubscribeOnScheduler)) - } - - /** - Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. - - - parameter observableFactory: Observable factory function to invoke for each observer that subscribes to the resulting sequence. - - returns: An observable sequence whose observers trigger an invocation of the given observable factory function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func deferred(observableFactory: () -> Driver) - -> Driver { - return Driver(Observable.deferred { observableFactory().asObservable() }) - } - - /** - This method creates a new Observable instance with a variable number of elements. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter elements: Elements to generate. - - returns: The observable sequence whose elements are pulled from the given arguments. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func of(elements: E ...) -> Driver { - let source = elements.toObservable(driverSubscribeOnScheduler) - return Driver(raw: source) - } -} - -extension Driver where Element : SignedIntegerType { - /** - Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages. - - - seealso: [interval operator on reactivex.io](http://reactivex.io/documentation/operators/interval.html) - - - parameter period: Period for producing the values in the resulting sequence. - - returns: An observable sequence that produces a value after each period. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func interval(period: RxTimeInterval) - -> Driver { - return Driver(Observable.interval(period, scheduler: driverObserveOnScheduler)) - } -} - -// MARK: timer - -extension Driver where Element: SignedIntegerType { - /** - Returns an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the specified scheduler to run timers. - - - seealso: [timer operator on reactivex.io](http://reactivex.io/documentation/operators/timer.html) - - - parameter dueTime: Relative time at which to produce the first value. - - parameter period: Period to produce subsequent values. - - returns: An observable sequence that produces a value after due time has elapsed and then each period. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func timer(dueTime: RxTimeInterval, period: RxTimeInterval) - -> Driver { - return Driver(Observable.timer(dueTime, period: period, scheduler: driverObserveOnScheduler)) - } -} - -/** - This method can be used in unit tests to ensure that driver is using mock schedulers instead of - maind schedulers. - - **This shouldn't be used in normal release builds.** -*/ -public func driveOnScheduler(scheduler: SchedulerType, action: () -> ()) { - let originalObserveOnScheduler = driverObserveOnScheduler - let originalSubscribeOnScheduler = driverSubscribeOnScheduler - - driverObserveOnScheduler = scheduler - driverSubscribeOnScheduler = scheduler - - action() - - // If you remove this line , compiler buggy optimizations will change behavior of this code - _forceCompilerToStopDoingInsaneOptimizationsThatBreakCode(driverObserveOnScheduler) - _forceCompilerToStopDoingInsaneOptimizationsThatBreakCode(driverSubscribeOnScheduler) - // Scary, I know - - driverObserveOnScheduler = originalObserveOnScheduler - driverSubscribeOnScheduler = originalSubscribeOnScheduler -} - -func _forceCompilerToStopDoingInsaneOptimizationsThatBreakCode(scheduler: SchedulerType) { - let a: Int32 = 1 - let b = 314 + Int32(rand() & 1) - if a == b { - print(scheduler) - } -} - -var driverObserveOnScheduler: SchedulerType = MainScheduler.instance -var driverSubscribeOnScheduler: SchedulerType = ConcurrentMainScheduler.instance diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/UIBindingObserver.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/UIBindingObserver.swift deleted file mode 100644 index b5a29ed..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/CocoaUnits/UIBindingObserver.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// UIBindingObserver.swift -// Rx -// -// Created by Krunoslav Zaher on 2/7/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE - import RxSwift -#endif - -/** -Observer that enforces interface binding rules: - * can't bind errors (in debug builds binding of errors causes `fatalError` in release builds errors are being logged) - * ensures binding is performed on main thread - -`InterfaceBindingObserver` doesn't retain target interface and in case owned interface element is released, element isn't bound. -*/ -public class UIBindingObserver : ObserverType { - public typealias E = Value - - weak var UIElement: UIElementType? - - let binding: (UIElementType, Value) -> Void - - /** - Initializes `ViewBindingObserver` using - */ - public init(UIElement: UIElementType, binding: (UIElementType, Value) -> Void) { - self.UIElement = UIElement - self.binding = binding - } - - /** - Binds next element to owner view as described in `binding`. - */ - public func on(event: Event) { - MainScheduler.ensureExecutingOnScheduler() - - switch event { - case .Next(let element): - if let view = self.UIElement { - binding(view, element) - } - case .Error(let error): - bindingErrorToInterface(error) - case .Completed: - break - } - } - - /** - Erases type of observer. - - - returns: type erased observer. - */ - public func asObserver() -> AnyObserver { - return AnyObserver(eventHandler: on) - } -} \ No newline at end of file diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/ControlTarget.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/ControlTarget.swift similarity index 77% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/ControlTarget.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/ControlTarget.swift index ade22a2..42b7db9 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/ControlTarget.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/ControlTarget.swift @@ -6,7 +6,7 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -#if os(iOS) || os(tvOS) || os(OSX) +#if os(iOS) || os(tvOS) || os(macOS) import Foundation #if !RX_NO_MODULE @@ -18,7 +18,7 @@ import RxSwift typealias Control = UIKit.UIControl typealias ControlEvents = UIKit.UIControlEvents -#elseif os(OSX) +#elseif os(macOS) import Cocoa typealias Control = Cocoa.NSControl @@ -36,7 +36,7 @@ class ControlTarget: RxTarget { #endif var callback: Callback? #if os(iOS) || os(tvOS) - init(control: Control, controlEvents: UIControlEvents, callback: Callback) { + init(control: Control, controlEvents: UIControlEvents, callback: @escaping Callback) { MainScheduler.ensureExecutingOnScheduler() self.control = control @@ -45,15 +45,15 @@ class ControlTarget: RxTarget { super.init() - control.addTarget(self, action: selector, forControlEvents: controlEvents) + control.addTarget(self, action: selector, for: controlEvents) - let method = self.methodForSelector(selector) + let method = self.method(for: selector) if method == nil { rxFatalError("Can't find method") } } -#elseif os(OSX) - init(control: Control, callback: Callback) { +#elseif os(macOS) + init(control: Control, callback: @escaping Callback) { MainScheduler.ensureExecutingOnScheduler() self.control = control @@ -64,15 +64,15 @@ class ControlTarget: RxTarget { control.target = self control.action = selector - let method = self.methodForSelector(selector) + let method = self.method(for: selector) if method == nil { rxFatalError("Can't find method") } } #endif - func eventHandler(sender: Control!) { - if let callback = self.callback, control = self.control { + func eventHandler(_ sender: Control!) { + if let callback = self.callback, let control = self.control { callback(control) } } @@ -80,8 +80,8 @@ class ControlTarget: RxTarget { override func dispose() { super.dispose() #if os(iOS) || os(tvOS) - self.control?.removeTarget(self, action: self.selector, forControlEvents: self.controlEvents) -#elseif os(OSX) + self.control?.removeTarget(self, action: self.selector, for: self.controlEvents) +#elseif os(macOS) self.control?.target = nil self.control?.action = nil #endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/DelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/DelegateProxy.swift index 89213e7..3634ffc 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/DelegateProxy.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/DelegateProxy.swift @@ -6,150 +6,253 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // +#if !os(Linux) + import Foundation #if !RX_NO_MODULE -import RxSwift + import RxSwift + #if SWIFT_PACKAGE && !os(Linux) + import RxCocoaRuntime + #endif #endif var delegateAssociatedTag: UInt8 = 0 var dataSourceAssociatedTag: UInt8 = 0 -/** -Base class for `DelegateProxyType` protocol. +/// Base class for `DelegateProxyType` protocol. +/// +/// This implementation is not thread safe and can be used only from one thread (Main thread). +open class DelegateProxy : _RXDelegateProxy { -This implementation is not thread safe and can be used only from one thread (Main thread). -*/ -public class DelegateProxy : _RXDelegateProxy { - - private var subjectsForSelector = [Selector: PublishSubject<[AnyObject]>]() + private var sentMessageForSelector = [Selector: PublishSubject<[Any]>]() + private var methodInvokedForSelector = [Selector: PublishSubject<[Any]>]() - /** - Parent object associated with delegate proxy. - */ + /// Parent object associated with delegate proxy. weak private(set) var parentObject: AnyObject? - /** - Initializes new instance. - - - parameter parentObject: Optional parent object that owns `DelegateProxy` as associated object. - */ + /// Initializes new instance. + /// + /// - parameter parentObject: Optional parent object that owns `DelegateProxy` as associated object. public required init(parentObject: AnyObject) { self.parentObject = parentObject MainScheduler.ensureExecutingOnScheduler() #if TRACE_RESOURCES - OSAtomicIncrement32(&resourceCount) + _ = Resources.incrementTotal() #endif super.init() } - + /** - Returns observable sequence of invocations of delegate methods. - + Returns observable sequence of invocations of delegate methods. Elements are sent *before method is invoked*. + + Only methods that have `void` return value can be observed using this method because + those methods are used as a notification mechanism. It doesn't matter if they are optional + or not. Observing is performed by installing a hidden associated `PublishSubject` that is + used to dispatch messages to observers. + + Delegate methods that have non `void` return value can't be observed directly using this method + because: + * those methods are not intended to be used as a notification mechanism, but as a behavior customization mechanism + * there is no sensible automatic way to determine a default return value + + In case observing of delegate methods that have return type is required, it can be done by + manually installing a `PublishSubject` or `BehaviorSubject` and implementing delegate method. + + e.g. + + // delegate proxy part (RxScrollViewDelegateProxy) + + let internalSubject = PublishSubject + + public func requiredDelegateMethod(scrollView: UIScrollView, arg1: CGPoint) -> Bool { + internalSubject.on(.next(arg1)) + return self._forwardToDelegate?.requiredDelegateMethod?(scrollView, arg1: arg1) ?? defaultReturnValue + } + + .... + + // reactive property implementation in a real class (`UIScrollView`) + public var property: Observable { + let proxy = RxScrollViewDelegateProxy.proxyForObject(base) + return proxy.internalSubject.asObservable() + } + + **In case calling this method prints "Delegate proxy is already implementing `\(selector)`, + a more performant way of registering might exist.", that means that manual observing method + is required analog to the example above because delegate method has already been implemented.** + - parameter selector: Selector used to filter observed invocations of delegate methods. - returns: Observable sequence of arguments passed to `selector` method. */ - public func observe(selector: Selector) -> Observable<[AnyObject]> { - if hasWiredImplementationForSelector(selector) { - print("Delegate proxy is already implementing `\(selector)`, a more performant way of registering might exist.") - } + open func sentMessage(_ selector: Selector) -> Observable<[Any]> { + checkSelectorIsObservable(selector) - if !self.respondsToSelector(selector) { - rxFatalError("This class doesn't respond to selector \(selector)") - } - - let subject = subjectsForSelector[selector] + let subject = sentMessageForSelector[selector] if let subject = subject { return subject } else { - let subject = PublishSubject<[AnyObject]>() - subjectsForSelector[selector] = subject + let subject = PublishSubject<[Any]>() + sentMessageForSelector[selector] = subject return subject } } - + + /** + Returns observable sequence of invoked delegate methods. Elements are sent *after method is invoked*. + + Only methods that have `void` return value can be observed using this method because + those methods are used as a notification mechanism. It doesn't matter if they are optional + or not. Observing is performed by installing a hidden associated `PublishSubject` that is + used to dispatch messages to observers. + + Delegate methods that have non `void` return value can't be observed directly using this method + because: + * those methods are not intended to be used as a notification mechanism, but as a behavior customization mechanism + * there is no sensible automatic way to determine a default return value + + In case observing of delegate methods that have return type is required, it can be done by + manually installing a `PublishSubject` or `BehaviorSubject` and implementing delegate method. + + e.g. + + // delegate proxy part (RxScrollViewDelegateProxy) + + let internalSubject = PublishSubject + + public func requiredDelegateMethod(scrollView: UIScrollView, arg1: CGPoint) -> Bool { + internalSubject.on(.next(arg1)) + return self._forwardToDelegate?.requiredDelegateMethod?(scrollView, arg1: arg1) ?? defaultReturnValue + } + + .... + + // reactive property implementation in a real class (`UIScrollView`) + public var property: Observable { + let proxy = RxScrollViewDelegateProxy.proxyForObject(base) + return proxy.internalSubject.asObservable() + } + + **In case calling this method prints "Delegate proxy is already implementing `\(selector)`, + a more performant way of registering might exist.", that means that manual observing method + is required analog to the example above because delegate method has already been implemented.** + + - parameter selector: Selector used to filter observed invocations of delegate methods. + - returns: Observable sequence of arguments passed to `selector` method. + */ + open func methodInvoked(_ selector: Selector) -> Observable<[Any]> { + checkSelectorIsObservable(selector) + + let subject = methodInvokedForSelector[selector] + + if let subject = subject { + return subject + } + else { + let subject = PublishSubject<[Any]>() + methodInvokedForSelector[selector] = subject + return subject + } + } + + private func checkSelectorIsObservable(_ selector: Selector) { + MainScheduler.ensureExecutingOnScheduler() + + if hasWiredImplementation(for: selector) { + print("Delegate proxy is already implementing `\(selector)`, a more performant way of registering might exist.") + } + + // It's important to see if super class reponds to selector and not self, + // because super class (_RxDelegateProxy) returns all methods delegate proxy + // can respond to. + // Because of https://github.com/ReactiveX/RxSwift/issues/907 , and possibly + // some other reasons, subclasses could overrride `responds(to:)`, but it shouldn't matter + // for this case. + if !super.responds(to: selector) { + rxFatalError("This class doesn't respond to selector \(selector)") + } + } + // proxy - - public override func interceptedSelector(selector: Selector, withArguments arguments: [AnyObject]!) { - subjectsForSelector[selector]?.on(.Next(arguments)) + + open override func _sentMessage(_ selector: Selector, withArguments arguments: [Any]) { + sentMessageForSelector[selector]?.on(.next(arguments)) } - - /** - Returns tag used to identify associated object. - - - returns: Associated object tag. - */ - public class func delegateAssociatedObjectTag() -> UnsafePointer { + + open override func _methodInvoked(_ selector: Selector, withArguments arguments: [Any]) { + methodInvokedForSelector[selector]?.on(.next(arguments)) + } + + /// Returns tag used to identify associated object. + /// + /// - returns: Associated object tag. + open class func delegateAssociatedObjectTag() -> UnsafeRawPointer { return _pointer(&delegateAssociatedTag) } - /** - Initializes new instance of delegate proxy. - - - returns: Initialized instance of `self`. - */ - public class func createProxyForObject(object: AnyObject) -> AnyObject { + /// Initializes new instance of delegate proxy. + /// + /// - returns: Initialized instance of `self`. + open class func createProxyForObject(_ object: AnyObject) -> AnyObject { return self.init(parentObject: object) } - /** - Returns assigned proxy for object. - - - parameter object: Object that can have assigned delegate proxy. - - returns: Assigned delegate proxy or `nil` if no delegate proxy is assigned. - */ - public class func assignedProxyFor(object: AnyObject) -> AnyObject? { - let maybeDelegate: AnyObject? = objc_getAssociatedObject(object, self.delegateAssociatedObjectTag()) - return castOptionalOrFatalError(maybeDelegate) + /// Returns assigned proxy for object. + /// + /// - parameter object: Object that can have assigned delegate proxy. + /// - returns: Assigned delegate proxy or `nil` if no delegate proxy is assigned. + open class func assignedProxyFor(_ object: AnyObject) -> AnyObject? { + let maybeDelegate = objc_getAssociatedObject(object, self.delegateAssociatedObjectTag()) + return castOptionalOrFatalError(maybeDelegate.map { $0 as AnyObject }) } - /** - Assigns proxy to object. - - - parameter object: Object that can have assigned delegate proxy. - - parameter proxy: Delegate proxy object to assign to `object`. - */ - public class func assignProxy(proxy: AnyObject, toObject object: AnyObject) { - precondition(proxy.isKindOfClass(self.classForCoder())) + /// Assigns proxy to object. + /// + /// - parameter object: Object that can have assigned delegate proxy. + /// - parameter proxy: Delegate proxy object to assign to `object`. + open class func assignProxy(_ proxy: AnyObject, toObject object: AnyObject) { + precondition(proxy.isKind(of: self.classForCoder())) objc_setAssociatedObject(object, self.delegateAssociatedObjectTag(), proxy, .OBJC_ASSOCIATION_RETAIN) } - /** - Sets reference of normal delegate that receives all forwarded messages - through `self`. - - - parameter forwardToDelegate: Reference of delegate that receives all messages through `self`. - - parameter retainDelegate: Should `self` retain `forwardToDelegate`. - */ - public func setForwardToDelegate(delegate: AnyObject?, retainDelegate: Bool) { - self._setForwardToDelegate(delegate, retainDelegate: retainDelegate) + /// Sets reference of normal delegate that receives all forwarded messages + /// through `self`. + /// + /// - parameter forwardToDelegate: Reference of delegate that receives all messages through `self`. + /// - parameter retainDelegate: Should `self` retain `forwardToDelegate`. + open func setForwardToDelegate(_ delegate: AnyObject?, retainDelegate: Bool) { + self._setForward(toDelegate: delegate, retainDelegate: retainDelegate) } - /** - Returns reference of normal delegate that receives all forwarded messages - through `self`. - - - returns: Value of reference if set or nil. - */ - public func forwardToDelegate() -> AnyObject? { + /// Returns reference of normal delegate that receives all forwarded messages + /// through `self`. + /// + /// - returns: Value of reference if set or nil. + open func forwardToDelegate() -> AnyObject? { return self._forwardToDelegate } deinit { - for v in subjectsForSelector.values { - v.on(.Completed) + for v in sentMessageForSelector.values { + v.on(.completed) + } + for v in methodInvokedForSelector.values { + v.on(.completed) } #if TRACE_RESOURCES - OSAtomicDecrement32(&resourceCount) + _ = Resources.decrementTotal() #endif } // MARK: Pointer - class func _pointer(p: UnsafePointer) -> UnsafePointer { + class func _pointer(_ p: UnsafeRawPointer) -> UnsafeRawPointer { return p } -} \ No newline at end of file +} + +#endif + diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/DelegateProxyType.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/DelegateProxyType.swift index 8b0992e..91cf807 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/DelegateProxyType.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/DelegateProxyType.swift @@ -6,6 +6,8 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // +#if !os(Linux) + import Foundation #if !RX_NO_MODULE import RxSwift @@ -68,9 +70,9 @@ every view has a corresponding delegate virtual factory method. In case of UITableView / UIScrollView, there is - extensions UIScrollView { - public func rx_createDelegateProxy() -> RxScrollViewDelegateProxy { - return RxScrollViewDelegateProxy(view: self) + extension UIScrollView { + public func createRxDelegateProxy() -> RxScrollViewDelegateProxy { + return RxScrollViewDelegateProxy(parentObject: base) } .... @@ -78,175 +80,193 @@ In case of UITableView / UIScrollView, there is and override in UITableView extension UITableView { - public override func rx_createDelegateProxy() -> RxScrollViewDelegateProxy { + public override func createRxDelegateProxy() -> RxScrollViewDelegateProxy { .... */ public protocol DelegateProxyType : AnyObject { - /** - Creates new proxy for target object. - */ - static func createProxyForObject(object: AnyObject) -> AnyObject - - /** - Returns assigned proxy for object. - - - parameter object: Object that can have assigned delegate proxy. - - returns: Assigned delegate proxy or `nil` if no delegate proxy is assigned. - */ - static func assignedProxyFor(object: AnyObject) -> AnyObject? - - /** - Assigns proxy to object. - - - parameter object: Object that can have assigned delegate proxy. - - parameter proxy: Delegate proxy object to assign to `object`. - */ - static func assignProxy(proxy: AnyObject, toObject object: AnyObject) - - /** - Returns designated delegate property for object. - - Objects can have multiple delegate properties. + /// Creates new proxy for target object. + static func createProxyForObject(_ object: AnyObject) -> AnyObject + + /// Returns assigned proxy for object. + /// + /// - parameter object: Object that can have assigned delegate proxy. + /// - returns: Assigned delegate proxy or `nil` if no delegate proxy is assigned. + static func assignedProxyFor(_ object: AnyObject) -> AnyObject? - Each delegate property needs to have it's own type implementing `DelegateProxyType`. + /// Assigns proxy to object. + /// + /// - parameter object: Object that can have assigned delegate proxy. + /// - parameter proxy: Delegate proxy object to assign to `object`. + static func assignProxy(_ proxy: AnyObject, toObject object: AnyObject) - - parameter object: Object that has delegate property. - - returns: Value of delegate property. - */ - static func currentDelegateFor(object: AnyObject) -> AnyObject? - - /** - Sets designated delegate property for object. - - Objects can have multiple delegate properties. - - Each delegate property needs to have it's own type implementing `DelegateProxyType`. + /// Returns designated delegate property for object. + /// + /// Objects can have multiple delegate properties. + /// + /// Each delegate property needs to have it's own type implementing `DelegateProxyType`. + /// + /// - parameter object: Object that has delegate property. + /// - returns: Value of delegate property. + static func currentDelegateFor(_ object: AnyObject) -> AnyObject? + + /// Sets designated delegate property for object. + /// + /// Objects can have multiple delegate properties. + /// + /// Each delegate property needs to have it's own type implementing `DelegateProxyType`. + /// + /// - parameter toObject: Object that has delegate property. + /// - parameter delegate: Delegate value. + static func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) - - parameter toObject: Object that has delegate property. - - parameter delegate: Delegate value. - */ - static func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) - - /** - Returns reference of normal delegate that receives all forwarded messages - through `self`. - - - returns: Value of reference if set or nil. - */ + /// Returns reference of normal delegate that receives all forwarded messages + /// through `self`. + /// + /// - returns: Value of reference if set or nil. func forwardToDelegate() -> AnyObject? - /** - Sets reference of normal delegate that receives all forwarded messages - through `self`. - - - parameter forwardToDelegate: Reference of delegate that receives all messages through `self`. - - parameter retainDelegate: Should `self` retain `forwardToDelegate`. - */ - func setForwardToDelegate(forwardToDelegate: AnyObject?, retainDelegate: Bool) + /// Sets reference of normal delegate that receives all forwarded messages + /// through `self`. + /// + /// - parameter forwardToDelegate: Reference of delegate that receives all messages through `self`. + /// - parameter retainDelegate: Should `self` retain `forwardToDelegate`. + func setForwardToDelegate(_ forwardToDelegate: AnyObject?, retainDelegate: Bool) } -/** -Returns existing proxy for object or installs new instance of delegate proxy. +extension DelegateProxyType { + /// Returns existing proxy for object or installs new instance of delegate proxy. + /// + /// - parameter object: Target object on which to install delegate proxy. + /// - returns: Installed instance of delegate proxy. + /// + /// + /// extension Reactive where Base: UISearchBar { + /// + /// public var delegate: DelegateProxy { + /// return RxSearchBarDelegateProxy.proxyForObject(base) + /// } + /// + /// public var text: ControlProperty { + /// let source: Observable = self.delegate.observe(#selector(UISearchBarDelegate.searchBar(_:textDidChange:))) + /// ... + /// } + /// } + public static func proxyForObject(_ object: AnyObject) -> Self { + MainScheduler.ensureExecutingOnScheduler() -- parameter object: Target object on which to install delegate proxy. -- returns: Installed instance of delegate proxy. + let maybeProxy = Self.assignedProxyFor(object) as? Self + let proxy: Self + if let existingProxy = maybeProxy { + proxy = existingProxy + } + else { + proxy = Self.createProxyForObject(object) as! Self + Self.assignProxy(proxy, toObject: object) + assert(Self.assignedProxyFor(object) === proxy) + } - extension UISearchBar { + let currentDelegate: AnyObject? = Self.currentDelegateFor(object) - public var rx_delegate: DelegateProxy { - return proxyForObject(RxSearchBarDelegateProxy.self, self) + if currentDelegate !== proxy { + proxy.setForwardToDelegate(currentDelegate, retainDelegate: false) + assert(proxy.forwardToDelegate() === currentDelegate) + Self.setCurrentDelegate(proxy, toObject: object) + assert(Self.currentDelegateFor(object) === proxy) + assert(proxy.forwardToDelegate() === currentDelegate) } - public var rx_text: ControlProperty { - let source: Observable = self.rx_delegate.observe("searchBar:textDidChange:") - ... - } - } -*/ -public func proxyForObject(type: P.Type, _ object: AnyObject) -> P { - MainScheduler.ensureExecutingOnScheduler() - - let maybeProxy = P.assignedProxyFor(object) as? P - - let proxy: P - if maybeProxy == nil { - proxy = P.createProxyForObject(object) as! P - P.assignProxy(proxy, toObject: object) - assert(P.assignedProxyFor(object) === proxy) - } - else { - proxy = maybeProxy! - } - - let currentDelegate: AnyObject? = P.currentDelegateFor(object) - - if currentDelegate !== proxy { - proxy.setForwardToDelegate(currentDelegate, retainDelegate: false) - P.setCurrentDelegate(proxy, toObject: object) - assert(P.currentDelegateFor(object) === proxy) - assert(proxy.forwardToDelegate() === currentDelegate) + return proxy } + + /// Sets forward delegate for `DelegateProxyType` associated with a specific object and return disposable that can be used to unset the forward to delegate. + /// Using this method will also make sure that potential original object cached selectors are cleared and will report any accidental forward delegate mutations. + /// + /// - parameter forwardDelegate: Delegate object to set. + /// - parameter retainDelegate: Retain `forwardDelegate` while it's being set. + /// - parameter onProxyForObject: Object that has `delegate` property. + /// - returns: Disposable object that can be used to clear forward delegate. + public static func installForwardDelegate(_ forwardDelegate: AnyObject, retainDelegate: Bool, onProxyForObject object: AnyObject) -> Disposable { + weak var weakForwardDelegate: AnyObject? = forwardDelegate + + let proxy = Self.proxyForObject(object) - return proxy -} + assert(proxy.forwardToDelegate() === nil, "This is a feature to warn you that there is already a delegate (or data source) set somewhere previously. The action you are trying to perform will clear that delegate (data source) and that means that some of your features that depend on that delegate (data source) being set will likely stop working.\n" + + "If you are ok with this, try to set delegate (data source) to `nil` in front of this operation.\n" + + " This is the source object value: \(object)\n" + + " This this the original delegate (data source) value: \(proxy.forwardToDelegate()!)\n" + + "Hint: Maybe delegate was already set in xib or storyboard and now it's being overwritten in code.\n") -func installDelegate(proxy: P, delegate: AnyObject, retainDelegate: Bool, onProxyForObject object: AnyObject) -> Disposable { - weak var weakDelegate: AnyObject? = delegate - - assert(proxy.forwardToDelegate() === nil, "There is already a delegate set -> `\(proxy.forwardToDelegate())` for object -> `\(object)`.\nMaybe delegate was already set in `xib` or `storyboard` and now it's being overwritten in code.") - - proxy.setForwardToDelegate(delegate, retainDelegate: retainDelegate) - - // refresh properties after delegate is set - // some views like UITableView cache `respondsToSelector` - P.setCurrentDelegate(nil, toObject: object) - P.setCurrentDelegate(proxy, toObject: object) - - assert(proxy.forwardToDelegate() === delegate, "Setting of delegate failed") - - return AnonymousDisposable { - MainScheduler.ensureExecutingOnScheduler() + proxy.setForwardToDelegate(forwardDelegate, retainDelegate: retainDelegate) - let delegate: AnyObject? = weakDelegate + // refresh properties after delegate is set + // some views like UITableView cache `respondsToSelector` + Self.setCurrentDelegate(nil, toObject: object) + Self.setCurrentDelegate(proxy, toObject: object) - assert(delegate == nil || proxy.forwardToDelegate() === delegate, "Delegate was changed from time it was first set. Current \(proxy.forwardToDelegate()), and it should have been \(proxy)") + assert(proxy.forwardToDelegate() === forwardDelegate, "Setting of delegate failed:\ncurrent:\n\(proxy.forwardToDelegate())\nexpected:\n\(forwardDelegate)") - proxy.setForwardToDelegate(nil, retainDelegate: retainDelegate) + return Disposables.create { + MainScheduler.ensureExecutingOnScheduler() + + let delegate: AnyObject? = weakForwardDelegate + + assert(delegate == nil || 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) + } } } -extension ObservableType { - func subscribeProxyDataSourceForObject(object: AnyObject, dataSource: AnyObject, retainDataSource: Bool, binding: (P, Event) -> Void) - -> Disposable { - let proxy = proxyForObject(P.self, object) - let disposable = installDelegate(proxy, delegate: dataSource, retainDelegate: retainDataSource, onProxyForObject: object) - - let subscription = self.asObservable() - // source can't ever end, otherwise it will release the subscriber - .concat(Observable.never()) - .subscribe { [weak object] (event: Event) in - MainScheduler.ensureExecutingOnScheduler() - - if let object = object { - assert(proxy === P.currentDelegateFor(object), "Proxy changed from the time it was first set.\nOriginal: \(proxy)\nExisting: \(P.currentDelegateFor(object))") - } - - binding(proxy, event) - - switch event { - case .Error(let error): - bindingErrorToInterface(error) - disposable.dispose() - case .Completed: - disposable.dispose() - default: - break + #if os(iOS) || os(tvOS) + import UIKit + + extension ObservableType { + func subscribeProxyDataSource(ofObject object: UIView, dataSource: AnyObject, retainDataSource: Bool, binding: @escaping (P, Event) -> Void) + -> Disposable { + let proxy = P.proxyForObject(object) + let unregisterDelegate = P.installForwardDelegate(dataSource, retainDelegate: retainDataSource, onProxyForObject: object) + // this is needed to flush any delayed old state (https://github.com/RxSwiftCommunity/RxDataSources/pull/75) + object.layoutIfNeeded() + + let subscription = self.asObservable() + .observeOn(MainScheduler()) + .catchError { error in + bindingErrorToInterface(error) + return Observable.empty() + } + // source can never end, otherwise it would release the subscriber, and deallocate the data source + .concat(Observable.never()) + .takeUntil(object.rx.deallocated) + .subscribe { [weak object] (event: Event) in + + if let object = object { + assert(proxy === P.currentDelegateFor(object), "Proxy changed from the time it was first set.\nOriginal: \(proxy)\nExisting: \(P.currentDelegateFor(object))") + } + + binding(proxy, event) + + switch event { + case .error(let error): + bindingErrorToInterface(error) + unregisterDelegate.dispose() + case .completed: + unregisterDelegate.dispose() + default: + break + } + } + + return Disposables.create { [weak object] in + subscription.dispose() + unregisterDelegate.dispose() + object?.layoutIfNeeded() } } - - return StableCompositeDisposable.create(subscription, disposable) - } -} + } + + #endif + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/NSLayoutConstraint+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/NSLayoutConstraint+Rx.swift index 36e9759..96db728 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/NSLayoutConstraint+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/NSLayoutConstraint+Rx.swift @@ -1,14 +1,16 @@ // // NSLayoutConstraint+Rx.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 12/6/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // +#if !os(Linux) + import Foundation -#if os(OSX) +#if os(macOS) import Cocoa #else import UIKit @@ -18,26 +20,24 @@ import UIKit import RxSwift #endif -#if os(iOS) || os(OSX) || os(tvOS) -extension NSLayoutConstraint { - /** - Bindable sink for `constant` property. - */ - public var rx_constant: AnyObserver { - return UIBindingObserver(UIElement: self) { constraint, constant in +#if os(iOS) || os(macOS) || os(tvOS) +extension Reactive where Base: NSLayoutConstraint { + /// Bindable sink for `constant` property. + public var constant: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { constraint, constant in constraint.constant = constant - }.asObserver() + } } - /** - Bindable sink for `active` property. - */ + /// Bindable sink for `active` property. @available(iOS 8, OSX 10.10, *) - public var rx_active: AnyObserver { - return UIBindingObserver(UIElement: self) { constraint, value in - constraint.active = value - }.asObserver() + public var active: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { constraint, value in + constraint.isActive = value + } } } #endif + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observable+Bind.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observable+Bind.swift index cff3762..e41a40a 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observable+Bind.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observable+Bind.swift @@ -1,6 +1,6 @@ // // Observable+Bind.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 8/29/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -22,11 +22,23 @@ extension ObservableType { - parameter observer: Observer that receives events. - returns: Disposable object that can be used to unsubscribe the observer. */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func bindTo(observer: O) -> Disposable { + public func bindTo(_ observer: O) -> Disposable where O.E == E { return self.subscribe(observer) } + /** + Creates new subscription and sends elements to observer. + + In this form it's equivalent to `subscribe` method, but it communicates intent better, and enables + writing more consistent binding code. + + - parameter observer: Observer that receives events. + - returns: Disposable object that can be used to unsubscribe the observer. + */ + public func bindTo(_ observer: O) -> Disposable where O.E == E? { + return self.map { $0 }.subscribe(observer) + } + /** Creates new subscription and sends elements to variable. @@ -36,24 +48,36 @@ extension ObservableType { - parameter variable: Target variable for sequence elements. - returns: Disposable object that can be used to unsubscribe the observer. */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func bindTo(variable: Variable) -> Disposable { + public func bindTo(_ variable: Variable) -> Disposable { return subscribe { e in switch e { - case let .Next(element): + case let .next(element): variable.value = element - case let .Error(error): + case let .error(error): let error = "Binding error to variable: \(error)" #if DEBUG rxFatalError(error) #else print(error) #endif - case .Completed: + case .completed: break } } } + + /** + Creates new subscription and sends elements to variable. + + In case error occurs in debug mode, `fatalError` will be raised. + In case error occurs in release mode, `error` will be logged. + + - parameter variable: Target variable for sequence elements. + - returns: Disposable object that can be used to unsubscribe the observer. + */ + public func bindTo(_ variable: Variable) -> Disposable { + return self.map { $0 as E? }.bindTo(variable) + } /** Subscribes to observable sequence using custom binder function. @@ -61,8 +85,7 @@ extension ObservableType { - parameter binder: Function used to bind elements from `self`. - returns: Object representing subscription. */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func bindTo(binder: Self -> R) -> R { + public func bindTo(_ binder: (Self) -> R) -> R { return binder(self) } @@ -78,8 +101,7 @@ extension ObservableType { - parameter curriedArgument: Final argument passed to `binder` to finish binding process. - returns: Object representing subscription. */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func bindTo(binder: Self -> R1 -> R2, curriedArgument: R1) -> R2 { + public func bindTo(_ binder: (Self) -> (R1) -> R2, curriedArgument: R1) -> R2 { return binder(self)(curriedArgument) } @@ -93,8 +115,7 @@ extension ObservableType { - parameter onNext: Action to invoke for each element in the observable sequence. - returns: Subscription object used to unsubscribe from the observable sequence. */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func bindNext(onNext: E -> Void) -> Disposable { + public func bindNext(_ onNext: @escaping (E) -> Void) -> Disposable { return subscribe(onNext: onNext, onError: { error in let error = "Binding error: \(error)" #if DEBUG diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/DeallocObservable.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/DeallocObservable.swift deleted file mode 100644 index 8d66996..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/DeallocObservable.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// DeallocObservable.swift -// Rx -// -// Created by Krunoslav Zaher on 12/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE -import RxSwift -#endif - -class DeallocObservable { - let _subject = ReplaySubject.create(bufferSize: 1) - - init() { - } - - deinit { - _subject.on(.Next(())) - _subject.on(.Completed) - } -} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/KVOObservable.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/KVOObservable.swift deleted file mode 100644 index 08cfeea..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/KVOObservable.swift +++ /dev/null @@ -1,147 +0,0 @@ -// -// KVOObservable.swift -// RxCocoa -// -// Created by Krunoslav Zaher on 7/5/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE -import RxSwift -#endif - -class KVOObservable - : ObservableType - , KVOObservableProtocol { - typealias E = Element? - - unowned var target: AnyObject - var strongTarget: AnyObject? - - var keyPath: String - var options: NSKeyValueObservingOptions - var retainTarget: Bool - - init(object: AnyObject, keyPath: String, options: NSKeyValueObservingOptions, retainTarget: Bool) { - self.target = object - self.keyPath = keyPath - self.options = options - self.retainTarget = retainTarget - if retainTarget { - self.strongTarget = object - } - } - - func subscribe(observer: O) -> Disposable { - let observer = KVOObserver(parent: self) { (value) in - if value as? NSNull != nil { - observer.on(.Next(nil)) - return - } - observer.on(.Next(value as? Element)) - } - - return AnonymousDisposable { - observer.dispose() - } - } - -} - -#if !DISABLE_SWIZZLING - -func observeWeaklyKeyPathFor(target: NSObject, keyPath: String, options: NSKeyValueObservingOptions) -> Observable { - let components = keyPath.componentsSeparatedByString(".").filter { $0 != "self" } - - let observable = observeWeaklyKeyPathFor(target, keyPathSections: components, options: options) - .distinctUntilChanged { $0 === $1 } - .finishWithNilWhenDealloc(target) - - if !options.intersect(.Initial).isEmpty { - return observable - } - else { - return observable - .skip(1) - } -} - -// This should work correctly -// Identifiers can't contain `,`, so the only place where `,` can appear -// is as a delimiter. -// This means there is `W` as element in an array of property attributes. -func isWeakProperty(properyRuntimeInfo: String) -> Bool { - return properyRuntimeInfo.rangeOfString(",W,") != nil -} - -extension ObservableType where E == AnyObject? { - func finishWithNilWhenDealloc(target: NSObject) - -> Observable { - let deallocating = target.rx_deallocating - - return deallocating - .map { _ in - return Observable.just(nil) - } - .startWith(self.asObservable()) - .switchLatest() - } -} - -func observeWeaklyKeyPathFor( - target: NSObject, - keyPathSections: [String], - options: NSKeyValueObservingOptions - ) -> Observable { - - weak var weakTarget: AnyObject? = target - - let propertyName = keyPathSections[0] - let remainingPaths = Array(keyPathSections[1.. - - // KVO recursion for value changes - return propertyObservable - .flatMapLatest { (nextTarget: AnyObject?) -> Observable in - if nextTarget == nil { - return Observable.just(nil) - } - let nextObject = nextTarget! as? NSObject - - let strongTarget: AnyObject? = weakTarget - - if nextObject == nil { - return Observable.error(RxCocoaError.InvalidObjectOnKeyPath(object: nextTarget!, sourceObject: strongTarget ?? NSNull(), propertyName: propertyName)) - } - - // if target is alive, then send change - // if it's deallocated, don't send anything - if strongTarget == nil { - return Observable.empty() - } - - let nextElementsObservable = keyPathSections.count == 1 - ? Observable.just(nextTarget) - : observeWeaklyKeyPathFor(nextObject!, keyPathSections: remainingPaths, options: options) - - if isWeak { - return nextElementsObservable - .finishWithNilWhenDealloc(nextObject!) - } - else { - return nextElementsObservable - } - } -} -#endif - diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/KVOObserver.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/KVOObserver.swift deleted file mode 100644 index eea490e..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/KVOObserver.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// KVOObserver.swift -// RxCocoa -// -// Created by Krunoslav Zaher on 7/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE -import RxSwift -#endif - -protocol KVOObservableProtocol { - var target: AnyObject { get } - var keyPath: String { get } - var retainTarget: Bool { get } - var options: NSKeyValueObservingOptions { get } -} - -class KVOObserver : _RXKVOObserver - , Disposable { - typealias Callback = (AnyObject?) -> Void - - var retainSelf: KVOObserver? = nil - - init(parent: KVOObservableProtocol, callback: Callback) { - #if TRACE_RESOURCES - OSAtomicIncrement32(&resourceCount) - #endif - - super.init(target: parent.target, retainTarget: parent.retainTarget, keyPath: parent.keyPath, options: parent.options, callback: callback) - self.retainSelf = self - } - - override func dispose() { - super.dispose() - self.retainSelf = nil - } - - deinit { - #if TRACE_RESOURCES - OSAtomicDecrement32(&resourceCount) - #endif - } -} \ No newline at end of file diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/MessageSentObserver.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/MessageSentObserver.swift deleted file mode 100644 index a73fb01..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/Implementations/MessageSentObserver.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// MessageSentObserver.swift -// RxCocoa -// -// Created by Krunoslav Zaher on 7/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE - import RxSwift -#endif - -#if !DISABLE_SWIZZLING - - class DeallocatingObservable - : ObservableConvertibleType - , RXMessageSentObserver { - typealias E = () - - private let _subject = ReplaySubject<()>.create(bufferSize: 1) - - @objc var targetImplementation: IMP = RX_default_target_implementation() - - var isActive: Bool { - return targetImplementation != RX_default_target_implementation() - } - - init() { - } - - @objc func messageSentWithParameters(parameters: [AnyObject]) -> Void { - _subject.on(.Next()) - } - - func asObservable() -> Observable<()> { - return _subject - } - - deinit { - _subject.on(.Completed) - } - } - - class MessageSentObservable - : ObservableConvertibleType - , RXMessageSentObserver { - typealias E = [AnyObject] - - private let _subject = PublishSubject<[AnyObject]>() - - @objc var targetImplementation: IMP = RX_default_target_implementation() - - var isActive: Bool { - return targetImplementation != RX_default_target_implementation() - } - - init() { - } - - @objc func messageSentWithParameters(parameters: [AnyObject]) -> Void { - _subject.on(.Next(parameters)) - } - - func asObservable() -> Observable<[AnyObject]> { - return _subject - } - - deinit { - _subject.on(.Completed) - } - } - -#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx+KVORepresentable.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx+KVORepresentable.swift deleted file mode 100644 index 91ac289..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx+KVORepresentable.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// NSObject+Rx+KVORepresentable.swift -// Rx -// -// Created by Krunoslav Zaher on 11/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE - import RxSwift -#endif - -extension NSObject { - - /** - Specialization of generic `rx_observe` method. - - This is a special overload because to observe values of some type (for example `Int`), first values of KVO type - need to be observed (`NSNumber`), and then converted to result type. - - For more information take a look at `rx_observe` method. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_observe(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial], retainSelf: Bool = true) -> Observable { - return rx_observe(E.KVOType.self, keyPath, options: options, retainSelf: retainSelf) - .map(E.init) - } -} - -#if !DISABLE_SWIZZLING - // KVO - extension NSObject { - /** - Specialization of generic `rx_observeWeakly` method. - - For more information take a look at `rx_observeWeakly` method. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_observeWeakly(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial]) -> Observable { - return rx_observeWeakly(E.KVOType.self, keyPath, options: options) - .map(E.init) - } - } -#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx+RawRepresentable.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx+RawRepresentable.swift deleted file mode 100644 index 7ff37f4..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx+RawRepresentable.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// NSObject+Rx+RawRepresentable.swift -// Rx -// -// Created by Krunoslav Zaher on 11/9/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE - import RxSwift -#endif - -extension NSObject { - /** - Specialization of generic `rx_observe` method. - - This specialization first observes `KVORepresentable` value and then converts it to `RawRepresentable` value. - - It is useful for observing bridged ObjC enum values. - - For more information take a look at `rx_observe` method. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_observe(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial], retainSelf: Bool = true) -> Observable { - return rx_observe(E.RawValue.KVOType.self, keyPath, options: options, retainSelf: retainSelf) - .map(E.init) - } -} - -#if !DISABLE_SWIZZLING - - // rx_observeWeakly + RawRepresentable - extension NSObject { - - /** - Specialization of generic `rx_observeWeakly` method. - - This specialization first observes `KVORepresentable` value and then converts it to `RawRepresentable` value. - - It is useful for observing bridged ObjC enum values. - - For more information take a look at `rx_observeWeakly` method. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_observeWeakly(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial]) -> Observable { - return rx_observeWeakly(E.RawValue.KVOType.self, keyPath, options: options) - .map(E.init) - } - } -#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx.swift deleted file mode 100644 index 263647d..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSObject+Rx.swift +++ /dev/null @@ -1,240 +0,0 @@ -// -// NSObject+Rx.swift -// RxCocoa -// -// Created by Krunoslav Zaher on 2/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE -import RxSwift -#endif - -#if !DISABLE_SWIZZLING -var deallocatingSubjectTriggerContext: UInt8 = 0 -var deallocatingSubjectContext: UInt8 = 0 -#endif -var deallocatedSubjectTriggerContext: UInt8 = 0 -var deallocatedSubjectContext: UInt8 = 0 - -/** -KVO is a tricky mechanism. - -When observing child in a ownership hierarchy, usually retaining observing target is wanted behavior. -When observing parent in a ownership hierarchy, usually retaining target isn't wanter behavior. - -KVO with weak references is especially tricky. For it to work, some kind of swizzling is required. -That can be done by - * replacing object class dynamically (like KVO does) - * by swizzling `dealloc` method on all instances for a class. - * some third method ... - -Both approaches can fail in certain scenarios: - * problems arise when swizzlers return original object class (like KVO does when nobody is observing) - * Problems can arise because replacing dealloc method isn't atomic operation (get implementation, - set implementation). - -Second approach is chosen. It can fail in case there are multiple libraries dynamically trying -to replace dealloc method. In case that isn't the case, it should be ok. -*/ -extension NSObject { - - - /** - Observes values on `keyPath` starting from `self` with `options` and retains `self` if `retainSelf` is set. - - `rx_observe` is just a simple and performant wrapper around KVO mechanism. - - * it can be used to observe paths starting from `self` or from ancestors in ownership graph (`retainSelf = false`) - * it can be used to observe paths starting from descendants in ownership graph (`retainSelf = true`) - * the paths have to consist only of `strong` properties, otherwise you are risking crashing the system by not unregistering KVO observer before dealloc. - - If support for weak properties is needed or observing arbitrary or unknown relationships in the - ownership tree, `rx_observeWeakly` is the preferred option. - - - parameter keyPath: Key path of property names to observe. - - parameter options: KVO mechanism notification options. - - parameter retainSelf: Retains self during observation if set `true`. - - returns: Observable sequence of objects on `keyPath`. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_observe(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial], retainSelf: Bool = true) -> Observable { - return KVOObservable(object: self, keyPath: keyPath, options: options, retainTarget: retainSelf).asObservable() - } -} - -#if !DISABLE_SWIZZLING -// KVO -extension NSObject { - /** - Observes values on `keyPath` starting from `self` with `options` and doesn't retain `self`. - - It can be used in all cases where `rx_observe` can be used and additionally - - * because it won't retain observed target, it can be used to observe arbitrary object graph whose ownership relation is unknown - * it can be used to observe `weak` properties - - **Since it needs to intercept object deallocation process it needs to perform swizzling of `dealloc` method on observed object.** - - - parameter keyPath: Key path of property names to observe. - - parameter options: KVO mechanism notification options. - - returns: Observable sequence of objects on `keyPath`. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_observeWeakly(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial]) -> Observable { - return observeWeaklyKeyPathFor(self, keyPath: keyPath, options: options) - .map { n in - return n as? E - } - } -} -#endif - -// Dealloc -extension NSObject { - - /** - Observable sequence of object deallocated events. - - After object is deallocated one `()` element will be produced and sequence will immediately complete. - - - returns: Observable sequence of object deallocated events. - */ - public var rx_deallocated: Observable { - return rx_synchronized { - if let deallocObservable = objc_getAssociatedObject(self, &deallocatedSubjectContext) as? DeallocObservable { - return deallocObservable._subject - } - - let deallocObservable = DeallocObservable() - - objc_setAssociatedObject(self, &deallocatedSubjectContext, deallocObservable, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - return deallocObservable._subject - } - } - -#if !DISABLE_SWIZZLING - - /** - Observable sequence of message arguments that completes when object is deallocated. - - In case an error occurs sequence will fail with `RxCocoaObjCRuntimeError`. - - In case some argument is `nil`, instance of `NSNull()` will be sent. - - - returns: Observable sequence of object deallocating events. - */ - public func rx_sentMessage(selector: Selector) -> Observable<[AnyObject]> { - return rx_synchronized { - // in case of dealloc selector replay subject behavior needs to be used - if selector == deallocSelector { - return rx_deallocating.map { _ in [] } - } - - let rxSelector = RX_selector(selector) - let selectorReference = RX_reference_from_selector(rxSelector) - - let subject: MessageSentObservable - if let existingSubject = objc_getAssociatedObject(self, selectorReference) as? MessageSentObservable { - subject = existingSubject - } - else { - subject = MessageSentObservable() - objc_setAssociatedObject( - self, - selectorReference, - subject, - .OBJC_ASSOCIATION_RETAIN_NONATOMIC - ) - } - - if subject.isActive { - return subject.asObservable() - } - - var error: NSError? - let targetImplementation = RX_ensure_observing(self, selector, &error) - if targetImplementation == nil { - return Observable.error(error?.rxCocoaErrorForTarget(self) ?? RxCocoaError.Unknown) - } - - subject.targetImplementation = targetImplementation - return subject.asObservable() - } - } - - /** - Observable sequence of object deallocating events. - - When `dealloc` message is sent to `self` one `()` element will be produced and after object is deallocated sequence - will immediately complete. - - In case an error occurs sequence will fail with `RxCocoaObjCRuntimeError`. - - - returns: Observable sequence of object deallocating events. - */ - public var rx_deallocating: Observable<()> { - return rx_synchronized { - - let subject: DeallocatingObservable - if let existingSubject = objc_getAssociatedObject(self, rxDeallocatingSelectorReference) as? DeallocatingObservable { - subject = existingSubject - } - else { - subject = DeallocatingObservable() - objc_setAssociatedObject( - self, - rxDeallocatingSelectorReference, - subject, - .OBJC_ASSOCIATION_RETAIN_NONATOMIC - ) - } - - if subject.isActive { - return subject.asObservable() - } - - var error: NSError? - let targetImplementation = RX_ensure_observing(self, deallocSelector, &error) - if targetImplementation == nil { - return Observable.error(error?.rxCocoaErrorForTarget(self) ?? RxCocoaError.Unknown) - } - - subject.targetImplementation = targetImplementation - return subject.asObservable() - } - } -#endif -} - -let deallocSelector = NSSelectorFromString("dealloc") -let rxDeallocatingSelector = RX_selector(deallocSelector) -let rxDeallocatingSelectorReference = RX_reference_from_selector(rxDeallocatingSelector) - -extension NSObject { - func rx_synchronized(@noescape action: () -> T) -> T { - objc_sync_enter(self) - let result = action() - objc_sync_exit(self) - return result - } -} - -extension NSObject { - /** - Helper to make sure that `Observable` returned from `createCachedObservable` is only created once. - This is important because there is only one `target` and `action` properties on `NSControl` or `UIBarButtonItem`. - */ - func rx_lazyInstanceObservable(key: UnsafePointer, createCachedObservable: () -> T) -> T { - if let value = objc_getAssociatedObject(self, key) { - return value as! T - } - - let observable = createCachedObservable() - - objc_setAssociatedObject(self, key, observable, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) - - return observable - } -} \ No newline at end of file diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Proxies/RxCLLocationManagerDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Proxies/RxCLLocationManagerDelegateProxy.swift deleted file mode 100644 index 5ab7dd6..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Proxies/RxCLLocationManagerDelegateProxy.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// RxCLLocationManagerDelegateProxy.swift -// RxCocoa -// -// Created by Carlos García on 8/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import CoreLocation -#if !RX_NO_MODULE -import RxSwift -#endif - -class RxCLLocationManagerDelegateProxy : DelegateProxy - , CLLocationManagerDelegate - , DelegateProxyType { - - class func currentDelegateFor(object: AnyObject) -> AnyObject? { - let locationManager: CLLocationManager = castOrFatalError(object) - return locationManager.delegate - } - - class func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) { - let locationManager: CLLocationManager = castOrFatalError(object) - locationManager.delegate = castOptionalOrFatalError(delegate) - } -} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxCocoa.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxCocoa.swift deleted file mode 100644 index 9c58d6c..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxCocoa.swift +++ /dev/null @@ -1,343 +0,0 @@ -// -// RxCocoa.swift -// RxCocoa -// -// Created by Krunoslav Zaher on 2/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -#if !RX_NO_MODULE -import RxSwift -#endif -#if os(iOS) - import UIKit -#endif - -/** -RxCocoa errors. -*/ -public enum RxCocoaError - : ErrorType - , CustomDebugStringConvertible { - /** - Unknown error has occurred. - */ - case Unknown - /** - Invalid operation was attempted. - */ - case InvalidOperation(object: AnyObject) - /** - Items are not yet bound to user interface but have been requested. - */ - case ItemsNotYetBound(object: AnyObject) - /** - Invalid KVO Path. - */ - case InvalidPropertyName(object: AnyObject, propertyName: String) - /** - Invalid object on key path. - */ - case InvalidObjectOnKeyPath(object: AnyObject, sourceObject: AnyObject, propertyName: String) - /** - Error during swizzling. - */ - case ErrorDuringSwizzling - /* - Casting error. - */ - case CastingError(object: AnyObject, targetType: Any.Type) -} - -#if !DISABLE_SWIZZLING -/** -RxCocoa ObjC runtime interception mechanism. - */ -public enum RxCocoaInterceptionMechanism { - /** - Unknown message interception mechanism. - */ - case Unknown - /** - Key value observing interception mechanism. - */ - case KVO -} - -/** -RxCocoa ObjC runtime modification errors. - */ -public enum RxCocoaObjCRuntimeError - : ErrorType - , CustomDebugStringConvertible { - /** - Unknown error has occurred. - */ - case Unknown(target: AnyObject) - - /** - If the object is reporting a different class then it's real class, that means that there is probably - already some interception mechanism in place or something weird is happening. - - The most common case when this would happen is when using a combination of KVO (`rx_observe`) and `rx_sentMessage`. - - This error is easily resolved by just using `rx_sentMessage` observing before `rx_observe`. - - The reason why the other way around could create issues is because KVO will unregister it's interceptor - class and restore original class. Unfortunately that will happen no matter was there another interceptor - subclass registered in hierarchy or not. - - Failure scenario: - * KVO sets class to be `__KVO__OriginalClass` (subclass of `OriginalClass`) - * `rx_sentMessage` sets object class to be `_RX_namespace___KVO__OriginalClass` (subclass of `__KVO__OriginalClass`) - * then unobserving with KVO will restore class to be `OriginalClass` -> failure point (possibly a bug in KVO) - - The reason why changing order of observing works is because any interception method on unregistration - should return object's original real class (if that doesn't happen then it's really easy to argue that's a bug - in that interception mechanism). - - This library won't remove registered interceptor even if there aren't any observers left because - it's highly unlikely it would have any benefit in real world use cases, and it's even more - dangerous. - */ - case ObjectMessagesAlreadyBeingIntercepted(target: AnyObject, interceptionMechanism: RxCocoaInterceptionMechanism) - - /** - Trying to observe messages for selector that isn't implemented. - */ - case SelectorNotImplemented(target: AnyObject) - - /** - Core Foundation classes are usually toll free bridged. Those classes crash the program in case - `object_setClass` is performed on them. - - There is a possibility to just swizzle methods on original object, but since those won't be usual use - cases for this library, then an error will just be reported for now. - */ - case CantInterceptCoreFoundationTollFreeBridgedObjects(target: AnyObject) - - /** - Two libraries have simultaneously tried to modify ObjC runtime and that was detected. This can only - happen in scenarios where multiple interception libraries are used. - - To synchronize other libraries intercepting messages for an object, use `synchronized` on target object and - it's meta-class. - */ - case ThreadingCollisionWithOtherInterceptionMechanism(target: AnyObject) - - /** - For some reason saving original method implementation under RX namespace failed. - */ - case SavingOriginalForwardingMethodFailed(target: AnyObject) - - /** - Intercepting a sent message by replacing a method implementation with `_objc_msgForward` failed for some reason. - */ - case ReplacingMethodWithForwardingImplementation(target: AnyObject) - - /** - Attempt to intercept one of the performance sensitive methods: - * class - * respondsToSelector: - * methodSignatureForSelector: - * forwardingTargetForSelector: - */ - case ObservingPerformanceSensitiveMessages(target: AnyObject) - - /** - Message implementation has unsupported return type (for example large struct). The reason why this is a error - is because in some cases intercepting sent messages requires replacing implementation with `_objc_msgForward_stret` - instead of `_objc_msgForward`. - - The unsupported cases should be fairly uncommon. - */ - case ObservingMessagesWithUnsupportedReturnType(target: AnyObject) -} - -#endif - -// MARK: Debug descriptions - -public extension RxCocoaError { - /** - A textual representation of `self`, suitable for debugging. - */ - public var debugDescription: String { - switch self { - case .Unknown: - return "Unknown error occurred." - case let .InvalidOperation(object): - return "Invalid operation was attempted on `\(object)`." - case let .ItemsNotYetBound(object): - return "Data source is set, but items are not yet bound to user interface for `\(object)`." - case let .InvalidPropertyName(object, propertyName): - return "Object `\(object)` dosn't have a property named `\(propertyName)`." - case let .InvalidObjectOnKeyPath(object, sourceObject, propertyName): - return "Unobservable object `\(object)` was observed as `\(propertyName)` of `\(sourceObject)`." - case .ErrorDuringSwizzling: - return "Error during swizzling." - case .CastingError(let object, let targetType): - return "Error casting `\(object)` to `\(targetType)`" - } - } -} - -#if !DISABLE_SWIZZLING - -public extension RxCocoaObjCRuntimeError { - /** - A textual representation of `self`, suitable for debugging. - */ - public var debugDescription: String { - switch self { - case let .Unknown(target): - return "Unknown error occurred.\nTarget: `\(target)`" - case let ObjectMessagesAlreadyBeingIntercepted(target, interceptionMechanism): - let interceptionMechanismDescription = interceptionMechanism == .KVO ? "KVO" : "other interception mechanism" - return "Collision between RxCocoa interception mechanism and \(interceptionMechanismDescription)." - + " To resolve this conflict please use this interception mechanism first.\nTarget: \(target)" - case let SelectorNotImplemented(target): - return "Trying to observe messages for selector that isn't implemented.\nTarget: \(target)" - case let CantInterceptCoreFoundationTollFreeBridgedObjects(target): - return "Interception of messages sent to Core Foundation isn't supported.\nTarget: \(target)" - case let ThreadingCollisionWithOtherInterceptionMechanism(target): - return "Detected a conflict while modifying ObjC runtime.\nTarget: \(target)" - case let SavingOriginalForwardingMethodFailed(target): - return "Saving original method implementation failed.\nTarget: \(target)" - case let ReplacingMethodWithForwardingImplementation(target): - return "Intercepting a sent message by replacing a method implementation with `_objc_msgForward` failed for some reason.\nTarget: \(target)" - case let ObservingPerformanceSensitiveMessages(target): - return "Attempt to intercept one of the performance sensitive methods. \nTarget: \(target)" - case let ObservingMessagesWithUnsupportedReturnType(target): - return "Attempt to intercept a method with unsupported return type. \nTarget: \(target)" - } - } -} - -#endif - -// MARK: Error binding policies - -func bindingErrorToInterface(error: ErrorType) { - let error = "Binding error to UI: \(error)" -#if DEBUG - rxFatalError(error) -#else - print(error) -#endif -} - -// MARK: Abstract methods - -@noreturn func rxAbstractMethodWithMessage(message: String) { - rxFatalError(message) -} - -@noreturn func rxAbstractMethod() { - rxFatalError("Abstract method") -} - -// MARK: casts or fatal error - -// workaround for Swift compiler bug, cheers compiler team :) -func castOptionalOrFatalError(value: AnyObject?) -> T? { - if value == nil { - return nil - } - let v: T = castOrFatalError(value) - return v -} - -func castOrThrow(resultType: T.Type, _ object: AnyObject) throws -> T { - guard let returnValue = object as? T else { - throw RxCocoaError.CastingError(object: object, targetType: resultType) - } - - return returnValue -} - -func castOptionalOrThrow(resultType: T.Type, _ object: AnyObject) throws -> T? { - if NSNull().isEqual(object) { - return nil - } - - guard let returnValue = object as? T else { - throw RxCocoaError.CastingError(object: object, targetType: resultType) - } - - return returnValue -} - -func castOrFatalError(value: AnyObject!, message: String) -> T { - let maybeResult: T? = value as? T - guard let result = maybeResult else { - rxFatalError(message) - } - - return result -} - -func castOrFatalError(value: Any!) -> T { - let maybeResult: T? = value as? T - guard let result = maybeResult else { - rxFatalError("Failure converting from \(value) to \(T.self)") - } - - return result -} - -// MARK: Error messages - -let dataSourceNotSet = "DataSource not set" -let delegateNotSet = "Delegate not set" - -#if !DISABLE_SWIZZLING - -// MARK: Conversions `NSError` > `RxCocoaObjCRuntimeError` - -extension NSError { - func rxCocoaErrorForTarget(target: AnyObject) -> RxCocoaObjCRuntimeError { - if domain == RXObjCRuntimeErrorDomain { - let errorCode = RXObjCRuntimeError(rawValue: self.code) ?? .Unknown - - switch errorCode { - case .Unknown: - return .Unknown(target: target) - case .ObjectMessagesAlreadyBeingIntercepted: - let isKVO = (self.userInfo[RXObjCRuntimeErrorIsKVOKey] as? NSNumber)?.boolValue ?? false - return .ObjectMessagesAlreadyBeingIntercepted(target: target, interceptionMechanism: isKVO ? .KVO : .Unknown) - case .SelectorNotImplemented: - return .SelectorNotImplemented(target: target) - case .CantInterceptCoreFoundationTollFreeBridgedObjects: - return .CantInterceptCoreFoundationTollFreeBridgedObjects(target: target) - case .ThreadingCollisionWithOtherInterceptionMechanism: - return .ThreadingCollisionWithOtherInterceptionMechanism(target: target) - case .SavingOriginalForwardingMethodFailed: - return .SavingOriginalForwardingMethodFailed(target: target) - case .ReplacingMethodWithForwardingImplementation: - return .ReplacingMethodWithForwardingImplementation(target: target) - case .ObservingPerformanceSensitiveMessages: - return .ObservingPerformanceSensitiveMessages(target: target) - case .ObservingMessagesWithUnsupportedReturnType: - return .ObservingMessagesWithUnsupportedReturnType(target: target) - } - } - - return RxCocoaObjCRuntimeError.Unknown(target: target) - } -} - -#endif - - -// MARK: Shared with RxSwift - -#if !RX_NO_MODULE - -@noreturn func rxFatalError(lastMessage: String) { - // The temptation to comment this line is great, but please don't, it's for your own good. The choice is yours. - fatalError(lastMessage) -} - -#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxCocoaObjCRuntimeError+Extensions.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxCocoaObjCRuntimeError+Extensions.swift new file mode 100644 index 0000000..e368b03 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxCocoaObjCRuntimeError+Extensions.swift @@ -0,0 +1,162 @@ +// +// RxCocoaObjCRuntimeError+Extensions.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 10/9/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation +#if !RX_NO_MODULE + #if SWIFT_PACKAGE && !DISABLE_SWIZZLING && !os(Linux) + import RxCocoaRuntime + #endif +#endif + +#if !DISABLE_SWIZZLING && !os(Linux) + /// RxCocoa ObjC runtime interception mechanism. + public enum RxCocoaInterceptionMechanism { + /// Unknown message interception mechanism. + case unknown + /// Key value observing interception mechanism. + case kvo + } + + /// RxCocoa ObjC runtime modification errors. + public enum RxCocoaObjCRuntimeError + : Swift.Error + , CustomDebugStringConvertible { + /// Unknown error has occurred. + case unknown(target: AnyObject) + + /** + If the object is reporting a different class then it's real class, that means that there is probably + already some interception mechanism in place or something weird is happening. + + The most common case when this would happen is when using a combination of KVO (`observe`) and `sentMessage`. + + This error is easily resolved by just using `sentMessage` observing before `observe`. + + The reason why the other way around could create issues is because KVO will unregister it's interceptor + class and restore original class. Unfortunately that will happen no matter was there another interceptor + subclass registered in hierarchy or not. + + Failure scenario: + * KVO sets class to be `__KVO__OriginalClass` (subclass of `OriginalClass`) + * `sentMessage` sets object class to be `_RX_namespace___KVO__OriginalClass` (subclass of `__KVO__OriginalClass`) + * then unobserving with KVO will restore class to be `OriginalClass` -> failure point (possibly a bug in KVO) + + The reason why changing order of observing works is because any interception method on unregistration + should return object's original real class (if that doesn't happen then it's really easy to argue that's a bug + in that interception mechanism). + + This library won't remove registered interceptor even if there aren't any observers left because + it's highly unlikely it would have any benefit in real world use cases, and it's even more + dangerous. + */ + case objectMessagesAlreadyBeingIntercepted(target: AnyObject, interceptionMechanism: RxCocoaInterceptionMechanism) + + /// Trying to observe messages for selector that isn't implemented. + case selectorNotImplemented(target: AnyObject) + + /// Core Foundation classes are usually toll free bridged. Those classes crash the program in case + /// `object_setClass` is performed on them. + /// + /// There is a possibility to just swizzle methods on original object, but since those won't be usual use + /// cases for this library, then an error will just be reported for now. + case cantInterceptCoreFoundationTollFreeBridgedObjects(target: AnyObject) + + /// Two libraries have simultaneously tried to modify ObjC runtime and that was detected. This can only + /// happen in scenarios where multiple interception libraries are used. + /// + /// To synchronize other libraries intercepting messages for an object, use `synchronized` on target object and + /// it's meta-class. + case threadingCollisionWithOtherInterceptionMechanism(target: AnyObject) + + /// For some reason saving original method implementation under RX namespace failed. + case savingOriginalForwardingMethodFailed(target: AnyObject) + + /// Intercepting a sent message by replacing a method implementation with `_objc_msgForward` failed for some reason. + case replacingMethodWithForwardingImplementation(target: AnyObject) + + /// Attempt to intercept one of the performance sensitive methods: + /// * class + /// * respondsToSelector: + /// * methodSignatureForSelector: + /// * forwardingTargetForSelector: + case observingPerformanceSensitiveMessages(target: AnyObject) + + /// Message implementation has unsupported return type (for example large struct). The reason why this is a error + /// is because in some cases intercepting sent messages requires replacing implementation with `_objc_msgForward_stret` + /// instead of `_objc_msgForward`. + /// + /// The unsupported cases should be fairly uncommon. + case observingMessagesWithUnsupportedReturnType(target: AnyObject) + } + + extension RxCocoaObjCRuntimeError { + /// A textual representation of `self`, suitable for debugging. + public var debugDescription: String { + switch self { + case let .unknown(target): + return "Unknown error occurred.\nTarget: `\(target)`" + case let .objectMessagesAlreadyBeingIntercepted(target, interceptionMechanism): + let interceptionMechanismDescription = interceptionMechanism == .kvo ? "KVO" : "other interception mechanism" + return "Collision between RxCocoa interception mechanism and \(interceptionMechanismDescription)." + + " To resolve this conflict please use this interception mechanism first.\nTarget: \(target)" + case let .selectorNotImplemented(target): + return "Trying to observe messages for selector that isn't implemented.\nTarget: \(target)" + case let .cantInterceptCoreFoundationTollFreeBridgedObjects(target): + return "Interception of messages sent to Core Foundation isn't supported.\nTarget: \(target)" + case let .threadingCollisionWithOtherInterceptionMechanism(target): + return "Detected a conflict while modifying ObjC runtime.\nTarget: \(target)" + case let .savingOriginalForwardingMethodFailed(target): + return "Saving original method implementation failed.\nTarget: \(target)" + case let .replacingMethodWithForwardingImplementation(target): + return "Intercepting a sent message by replacing a method implementation with `_objc_msgForward` failed for some reason.\nTarget: \(target)" + case let .observingPerformanceSensitiveMessages(target): + return "Attempt to intercept one of the performance sensitive methods. \nTarget: \(target)" + case let .observingMessagesWithUnsupportedReturnType(target): + return "Attempt to intercept a method with unsupported return type. \nTarget: \(target)" + } + } + } + + // MARK: Conversions `NSError` > `RxCocoaObjCRuntimeError` + + extension Error { + func rxCocoaErrorForTarget(_ target: AnyObject) -> RxCocoaObjCRuntimeError { + let error = self as NSError + + if error.domain == RXObjCRuntimeErrorDomain { + let errorCode = RXObjCRuntimeError(rawValue: error.code) ?? .unknown + + switch errorCode { + case .unknown: + return .unknown(target: target) + case .objectMessagesAlreadyBeingIntercepted: + let isKVO = (error.userInfo[RXObjCRuntimeErrorIsKVOKey] as? NSNumber)?.boolValue ?? false + return .objectMessagesAlreadyBeingIntercepted(target: target, interceptionMechanism: isKVO ? .kvo : .unknown) + case .selectorNotImplemented: + return .selectorNotImplemented(target: target) + case .cantInterceptCoreFoundationTollFreeBridgedObjects: + return .cantInterceptCoreFoundationTollFreeBridgedObjects(target: target) + case .threadingCollisionWithOtherInterceptionMechanism: + return .threadingCollisionWithOtherInterceptionMechanism(target: target) + case .savingOriginalForwardingMethodFailed: + return .savingOriginalForwardingMethodFailed(target: target) + case .replacingMethodWithForwardingImplementation: + return .replacingMethodWithForwardingImplementation(target: target) + case .observingPerformanceSensitiveMessages: + return .observingPerformanceSensitiveMessages(target: target) + case .observingMessagesWithUnsupportedReturnType: + return .observingMessagesWithUnsupportedReturnType(target: target) + } + } + + return RxCocoaObjCRuntimeError.unknown(target: target) + } + } + +#endif + diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxTarget.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxTarget.swift index f9fe14c..804bd91 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxTarget.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/RxTarget.swift @@ -21,7 +21,7 @@ class RxTarget : NSObject self.retainSelf = self #if TRACE_RESOURCES - OSAtomicIncrement32(&resourceCount) + _ = Resources.incrementTotal() #endif #if DEBUG @@ -38,7 +38,7 @@ class RxTarget : NSObject #if TRACE_RESOURCES deinit { - OSAtomicDecrement32(&resourceCount) + _ = Resources.decrementTotal() } #endif -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/SectionedViewDataSourceType.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/SectionedViewDataSourceType.swift index e4d52d3..5c3cf3c 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/SectionedViewDataSourceType.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/SectionedViewDataSourceType.swift @@ -1,6 +1,6 @@ // // SectionedViewDataSourceType.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 1/10/16. // Copyright © 2016 Krunoslav Zaher. All rights reserved. @@ -8,17 +8,13 @@ import Foundation -/** -Data source with access to underlying sectioned model. -*/ +/// Data source with access to underlying sectioned model. public protocol SectionedViewDataSourceType { - /** - Returns model at index path. - - In case data source doesn't contain any sections when this method is being called, `RxCocoaError.ItemsNotYetBound(object: self)` is thrown. + /// Returns model at index path. + /// + /// In case data source doesn't contain any sections when this method is being called, `RxCocoaError.ItemsNotYetBound(object: self)` is thrown. - - parameter indexPath: Model index path - - returns: Model at index path. - */ - func modelAtIndexPath(indexPath: NSIndexPath) throws -> Any -} \ No newline at end of file + /// - parameter indexPath: Model index path + /// - returns: Model at index path. + func model(at indexPath: IndexPath) throws -> Any +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/TextInput.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/TextInput.swift new file mode 100644 index 0000000..5f139ea --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/TextInput.swift @@ -0,0 +1,82 @@ +// +// TextInput.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 5/12/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +#if !RX_NO_MODULE + import RxSwift +#endif + +#if os(iOS) || os(tvOS) + import UIKit + + /// Represents text input with reactive extensions. + public struct TextInput { + /// Base text input to extend. + public let base: Base + + /// Reactive wrapper for `text` property. + public let text: ControlProperty + + /// Initializes new text input. + /// + /// - parameter base: Base object. + /// - parameter text: Textual control property. + public init(base: Base, text: ControlProperty) { + self.base = base + self.text = text + } + } + + extension Reactive where Base: UITextField { + /// Reactive text input. + public var textInput: TextInput { + return TextInput(base: base, text: self.text) + } + } + + extension Reactive where Base: UITextView { + /// Reactive text input. + public var textInput: TextInput { + return TextInput(base: base, text: self.text) + } + } + +#endif + +#if os(macOS) + import Cocoa + + /// Represents text input with reactive extensions. + public struct TextInput { + /// Base text input to extend. + public let base: Base + + /// Reactive wrapper for `text` property. + public let text: ControlProperty + + /// Initializes new text input. + /// + /// - parameter base: Base object. + /// - parameter text: Textual control property. + public init(base: Base, text: ControlProperty) { + self.base = base + self.text = text + } + } + + extension Reactive where Base: NSTextField, Base: NSTextInputClient { + /// Reactive text input. + public var textInput: TextInput { + return TextInput(base: base, text: self.text) + } + } + +#endif + + diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXDelegateProxy.h b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXDelegateProxy.h deleted file mode 100644 index 718636b..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXDelegateProxy.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// _RXDelegateProxy.h -// RxCocoa -// -// Created by Krunoslav Zaher on 7/4/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#import - -@interface _RXDelegateProxy : NSObject - -@property (nonatomic, assign, readonly) id _forwardToDelegate; - --(void)_setForwardToDelegate:(id)forwardToDelegate retainDelegate:(BOOL)retainDelegate; - --(BOOL)hasWiredImplementationForSelector:(SEL)selector; - --(void)interceptedSelector:(SEL)selector withArguments:(NSArray*)arguments; - -@end diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/KVORepresentable+CoreGraphics.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+CoreGraphics.swift similarity index 90% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/KVORepresentable+CoreGraphics.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+CoreGraphics.swift index 19abf65..61ef1db 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/KVORepresentable+CoreGraphics.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+CoreGraphics.swift @@ -1,11 +1,13 @@ // // KVORepresentable+CoreGraphics.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 11/14/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // +#if !os(Linux) + import Foundation #if !RX_NO_MODULE import RxSwift @@ -25,9 +27,7 @@ let CGPointType = "{CGPoint=ff}" extension CGRect : KVORepresentable { public typealias KVOType = NSValue - /** - Constructs self from `NSValue`. - */ + /// Constructs self from `NSValue`. public init?(KVOValue: KVOType) { if strcmp(KVOValue.objCType, CGRectType) != 0 { return nil @@ -41,9 +41,7 @@ extension CGRect : KVORepresentable { extension CGPoint : KVORepresentable { public typealias KVOType = NSValue - /** - Constructs self from `NSValue`. - */ + /// Constructs self from `NSValue`. public init?(KVOValue: KVOType) { if strcmp(KVOValue.objCType, CGPointType) != 0 { return nil @@ -57,9 +55,7 @@ extension CGPoint : KVORepresentable { extension CGSize : KVORepresentable { public typealias KVOType = NSValue - /** - Constructs self from `NSValue`. - */ + /// Constructs self from `NSValue`. public init?(KVOValue: KVOType) { if strcmp(KVOValue.objCType, CGSizeType) != 0 { return nil @@ -68,4 +64,6 @@ extension CGSize : KVORepresentable { KVOValue.getValue(&typedValue) self = typedValue } -} \ No newline at end of file +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/KVORepresentable+Swift.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+Swift.swift similarity index 61% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/KVORepresentable+Swift.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+Swift.swift index a118bc4..00d53dd 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/KVORepresentable+Swift.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable+Swift.swift @@ -1,6 +1,6 @@ // // KVORepresentable+Swift.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 11/14/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -11,74 +11,69 @@ import Foundation extension Int : KVORepresentable { public typealias KVOType = NSNumber - /** - Constructs `Self` using KVO value. - */ + /// Constructs `Self` using KVO value. public init?(KVOValue: KVOType) { - self.init(KVOValue.integerValue) + self.init(KVOValue.int32Value) } } extension Int32 : KVORepresentable { public typealias KVOType = NSNumber - /** - Constructs `Self` using KVO value. - */ + /// Constructs `Self` using KVO value. public init?(KVOValue: KVOType) { - self.init(KVOValue.intValue) + self.init(KVOValue.int32Value) } } extension Int64 : KVORepresentable { public typealias KVOType = NSNumber - /** - Constructs `Self` using KVO value. - */ + /// Constructs `Self` using KVO value. public init?(KVOValue: KVOType) { - self.init(KVOValue.longLongValue) + self.init(KVOValue.int64Value) } } extension UInt : KVORepresentable { public typealias KVOType = NSNumber - /** - Constructs `Self` using KVO value. - */ + /// Constructs `Self` using KVO value. public init?(KVOValue: KVOType) { - self.init(KVOValue.unsignedLongValue) + self.init(KVOValue.uintValue) } } extension UInt32 : KVORepresentable { public typealias KVOType = NSNumber - /** - Constructs `Self` using KVO value. - */ + /// Constructs `Self` using KVO value. public init?(KVOValue: KVOType) { - self.init(KVOValue.unsignedIntValue) + self.init(KVOValue.uint32Value) } } extension UInt64 : KVORepresentable { public typealias KVOType = NSNumber - /** - Constructs `Self` using KVO value. - */ + /// Constructs `Self` using KVO value. public init?(KVOValue: KVOType) { - self.init(KVOValue.unsignedLongLongValue) + self.init(KVOValue.uint64Value) + } +} + +extension Bool : KVORepresentable { + public typealias KVOType = NSNumber + + /// Constructs `Self` using KVO value. + public init?(KVOValue: KVOType) { + self.init(KVOValue.boolValue) } } extension RawRepresentable where RawValue: KVORepresentable { - /** - Constructs `Self` using optional KVO value. - */ + /// Constructs `Self` using optional KVO value. init?(KVOValue: RawValue.KVOType?) { guard let KVOValue = KVOValue else { return nil @@ -90,4 +85,4 @@ extension RawRepresentable where RawValue: KVORepresentable { self.init(rawValue: rawValue) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/KVORepresentable.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable.swift similarity index 63% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/KVORepresentable.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable.swift index c51774b..ad59682 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/KVORepresentable.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable.swift @@ -1,6 +1,6 @@ // // KVORepresentable.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 11/14/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,25 +8,17 @@ import Foundation -/** -Type that is KVO representable (KVO mechanism can be used to observe it). -*/ +/// Type that is KVO representable (KVO mechanism can be used to observe it). public protocol KVORepresentable { - /** - Associated KVO type. - */ + /// Associated KVO type. associatedtype KVOType - /** - Constructs `Self` using KVO value. - */ + /// Constructs `Self` using KVO value. init?(KVOValue: KVOType) } extension KVORepresentable { - /** - Initializes `KVORepresentable` with optional value. - */ + /// Initializes `KVORepresentable` with optional value. init?(KVOValue: KVOType?) { guard let KVOValue = KVOValue else { return nil diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Logging.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/Logging.swift similarity index 64% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Logging.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/Logging.swift index 0db671a..8b821ca 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Logging.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/Logging.swift @@ -8,15 +8,11 @@ import Foundation -/** -Simple logging settings for RxCocoa library. -*/ +/// Simple logging settings for RxCocoa library. public struct Logging { - public typealias LogURLRequest = (NSURLRequest) -> Bool + public typealias LogURLRequest = (URLRequest) -> Bool - /** - Log URL requests to standard output in curl format. - */ + /// Log URL requests to standard output in curl format. public static var URLRequests: LogURLRequest = { _ in #if DEBUG return true @@ -24,4 +20,4 @@ public struct Logging { return false #endif } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSNotificationCenter+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSNotificationCenter+Rx.swift similarity index 54% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSNotificationCenter+Rx.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSNotificationCenter+Rx.swift index a9ad451..66703d6 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSNotificationCenter+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSNotificationCenter+Rx.swift @@ -11,24 +11,23 @@ import Foundation import RxSwift #endif -extension NSNotificationCenter { +extension Reactive where Base: NotificationCenter { /** Transforms notifications posted to notification center to observable sequence of notifications. - - parameter name: Filter notifications by name. + - parameter name: Optional name used to filter notifications. - parameter object: Optional object used to filter notifications. - returns: Observable sequence of posted notifications. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_notification(name: String?, object: AnyObject? = nil) -> Observable { + public func notification(_ name: Notification.Name?, object: AnyObject? = nil) -> Observable { return Observable.create { [weak object] observer in - let nsObserver = self.addObserverForName(name, object: object, queue: nil) { notification in - observer.on(.Next(notification)) + let nsObserver = self.base.addObserver(forName: name, object: object, queue: nil) { notification in + observer.on(.next(notification)) } - return AnonymousDisposable { - self.removeObserver(nsObserver) + return Disposables.create { + self.base.removeObserver(nsObserver) } } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+KVORepresentable.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+KVORepresentable.swift new file mode 100644 index 0000000..cb2573c --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+KVORepresentable.swift @@ -0,0 +1,47 @@ +// +// NSObject+Rx+KVORepresentable.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 11/14/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#if !os(Linux) + +import Foundation +#if !RX_NO_MODULE + import RxSwift +#endif + +extension Reactive where Base: NSObject { + + /** + Specialization of generic `observe` method. + + This is a special overload because to observe values of some type (for example `Int`), first values of KVO type + need to be observed (`NSNumber`), and then converted to result type. + + For more information take a look at `observe` method. + */ + public func observe(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial], retainSelf: Bool = true) -> Observable { + return observe(E.KVOType.self, keyPath, options: options, retainSelf: retainSelf) + .map(E.init) + } +} + +#if !DISABLE_SWIZZLING && !os(Linux) + // KVO + extension Reactive where Base: NSObject { + /** + Specialization of generic `observeWeakly` method. + + For more information take a look at `observeWeakly` method. + */ + public func observeWeakly(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial]) -> Observable { + return observeWeakly(E.KVOType.self, keyPath, options: options) + .map(E.init) + } + } +#endif + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+RawRepresentable.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+RawRepresentable.swift new file mode 100644 index 0000000..897cdb3 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+RawRepresentable.swift @@ -0,0 +1,53 @@ +// +// NSObject+Rx+RawRepresentable.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 11/9/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#if !os(Linux) + +import Foundation +#if !RX_NO_MODULE + import RxSwift +#endif + +extension Reactive where Base: NSObject { + /** + Specialization of generic `observe` method. + + This specialization first observes `KVORepresentable` value and then converts it to `RawRepresentable` value. + + It is useful for observing bridged ObjC enum values. + + For more information take a look at `observe` method. + */ + public func observe(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial], retainSelf: Bool = true) -> Observable where E.RawValue: KVORepresentable { + return observe(E.RawValue.KVOType.self, keyPath, options: options, retainSelf: retainSelf) + .map(E.init) + } +} + +#if !DISABLE_SWIZZLING + + // observeWeakly + RawRepresentable + extension Reactive where Base: NSObject { + + /** + Specialization of generic `observeWeakly` method. + + This specialization first observes `KVORepresentable` value and then converts it to `RawRepresentable` value. + + It is useful for observing bridged ObjC enum values. + + For more information take a look at `observeWeakly` method. + */ + public func observeWeakly(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial]) -> Observable where E.RawValue: KVORepresentable { + return observeWeakly(E.RawValue.KVOType.self, keyPath, options: options) + .map(E.init) + } + } +#endif + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx.swift new file mode 100644 index 0000000..270d16c --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx.swift @@ -0,0 +1,532 @@ +// +// NSObject+Rx.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 2/21/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#if !os(Linux) + +import Foundation +#if !RX_NO_MODULE + import RxSwift + #if SWIFT_PACKAGE && !DISABLE_SWIZZLING && !os(Linux) + import RxCocoaRuntime + #endif +#endif + +#if !DISABLE_SWIZZLING && !os(Linux) +fileprivate var deallocatingSubjectTriggerContext: UInt8 = 0 +fileprivate var deallocatingSubjectContext: UInt8 = 0 +#endif +fileprivate var deallocatedSubjectTriggerContext: UInt8 = 0 +fileprivate var deallocatedSubjectContext: UInt8 = 0 + +#if !os(Linux) + +/** +KVO is a tricky mechanism. + +When observing child in a ownership hierarchy, usually retaining observing target is wanted behavior. +When observing parent in a ownership hierarchy, usually retaining target isn't wanter behavior. + +KVO with weak references is especially tricky. For it to work, some kind of swizzling is required. +That can be done by + * replacing object class dynamically (like KVO does) + * by swizzling `dealloc` method on all instances for a class. + * some third method ... + +Both approaches can fail in certain scenarios: + * problems arise when swizzlers return original object class (like KVO does when nobody is observing) + * Problems can arise because replacing dealloc method isn't atomic operation (get implementation, + set implementation). + +Second approach is chosen. It can fail in case there are multiple libraries dynamically trying +to replace dealloc method. In case that isn't the case, it should be ok. +*/ +extension Reactive where Base: NSObject { + + + /** + Observes values on `keyPath` starting from `self` with `options` and retains `self` if `retainSelf` is set. + + `observe` is just a simple and performant wrapper around KVO mechanism. + + * it can be used to observe paths starting from `self` or from ancestors in ownership graph (`retainSelf = false`) + * it can be used to observe paths starting from descendants in ownership graph (`retainSelf = true`) + * the paths have to consist only of `strong` properties, otherwise you are risking crashing the system by not unregistering KVO observer before dealloc. + + If support for weak properties is needed or observing arbitrary or unknown relationships in the + ownership tree, `observeWeakly` is the preferred option. + + - parameter keyPath: Key path of property names to observe. + - parameter options: KVO mechanism notification options. + - parameter retainSelf: Retains self during observation if set `true`. + - returns: Observable sequence of objects on `keyPath`. + */ + public func observe(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial], retainSelf: Bool = true) -> Observable { + return KVOObservable(object: base, keyPath: keyPath, options: options, retainTarget: retainSelf).asObservable() + } +} + +#endif + +#if !DISABLE_SWIZZLING && !os(Linux) +// KVO +extension Reactive where Base: NSObject { + /** + Observes values on `keyPath` starting from `self` with `options` and doesn't retain `self`. + + It can be used in all cases where `observe` can be used and additionally + + * because it won't retain observed target, it can be used to observe arbitrary object graph whose ownership relation is unknown + * it can be used to observe `weak` properties + + **Since it needs to intercept object deallocation process it needs to perform swizzling of `dealloc` method on observed object.** + + - parameter keyPath: Key path of property names to observe. + - parameter options: KVO mechanism notification options. + - returns: Observable sequence of objects on `keyPath`. + */ + public func observeWeakly(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial]) -> Observable { + return observeWeaklyKeyPathFor(base, keyPath: keyPath, options: options) + .map { n in + return n as? E + } + } +} +#endif + +// Dealloc +extension Reactive where Base: AnyObject { + + /** + Observable sequence of object deallocated events. + + After object is deallocated one `()` element will be produced and sequence will immediately complete. + + - returns: Observable sequence of object deallocated events. + */ + public var deallocated: Observable { + return synchronized { + if let deallocObservable = objc_getAssociatedObject(base, &deallocatedSubjectContext) as? DeallocObservable { + return deallocObservable._subject + } + + let deallocObservable = DeallocObservable() + + objc_setAssociatedObject(base, &deallocatedSubjectContext, deallocObservable, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + return deallocObservable._subject + } + } + +#if !DISABLE_SWIZZLING && !os(Linux) + + /** + Observable sequence of message arguments that completes when object is deallocated. + + Each element is produced before message is invoked on target object. `methodInvoked` + exists in case observing of invoked messages is needed. + + In case an error occurs sequence will fail with `RxCocoaObjCRuntimeError`. + + In case some argument is `nil`, instance of `NSNull()` will be sent. + + - returns: Observable sequence of object deallocating events. + */ + public func sentMessage(_ selector: Selector) -> Observable<[Any]> { + return synchronized { + // in case of dealloc selector replay subject behavior needs to be used + if selector == deallocSelector { + return deallocating.map { _ in [] } + } + + do { + let proxy: MessageSentProxy = try registerMessageInterceptor(selector) + return proxy.messageSent.asObservable() + } + catch let e { + return Observable.error(e) + } + } + } + + /** + Observable sequence of message arguments that completes when object is deallocated. + + Each element is produced after message is invoked on target object. `sentMessage` + exists in case interception of sent messages before they were invoked is needed. + + In case an error occurs sequence will fail with `RxCocoaObjCRuntimeError`. + + In case some argument is `nil`, instance of `NSNull()` will be sent. + + - returns: Observable sequence of object deallocating events. + */ + public func methodInvoked(_ selector: Selector) -> Observable<[Any]> { + return synchronized { + // in case of dealloc selector replay subject behavior needs to be used + if selector == deallocSelector { + return deallocated.map { _ in [] } + } + + + do { + let proxy: MessageSentProxy = try registerMessageInterceptor(selector) + return proxy.methodInvoked.asObservable() + } + catch let e { + return Observable.error(e) + } + } + } + + /** + Observable sequence of object deallocating events. + + When `dealloc` message is sent to `self` one `()` element will be produced and after object is deallocated sequence + will immediately complete. + + In case an error occurs sequence will fail with `RxCocoaObjCRuntimeError`. + + - returns: Observable sequence of object deallocating events. + */ + public var deallocating: Observable<()> { + return synchronized { + do { + let proxy: DeallocatingProxy = try registerMessageInterceptor(deallocSelector) + return proxy.messageSent.asObservable() + } + catch let e { + return Observable.error(e) + } + } + } + + fileprivate func registerMessageInterceptor(_ selector: Selector) throws -> T { + let rxSelector = RX_selector(selector) + let selectorReference = RX_reference_from_selector(rxSelector) + + let subject: T + if let existingSubject = objc_getAssociatedObject(base, selectorReference) as? T { + subject = existingSubject + } + else { + subject = T() + objc_setAssociatedObject( + base, + selectorReference, + subject, + .OBJC_ASSOCIATION_RETAIN_NONATOMIC + ) + } + + if subject.isActive { + return subject + } + + var error: NSError? + let targetImplementation = RX_ensure_observing(base, selector, &error) + if targetImplementation == nil { + throw error?.rxCocoaErrorForTarget(base) ?? RxCocoaError.unknown + } + + subject.targetImplementation = targetImplementation! + + return subject + } +#endif +} + +// MARK: Message interceptors + +#if !DISABLE_SWIZZLING && !os(Linux) + + fileprivate protocol MessageInterceptorSubject: class { + init() + + var isActive: Bool { + get + } + + var targetImplementation: IMP { get set } + } + + fileprivate final class DeallocatingProxy + : MessageInterceptorSubject + , RXDeallocatingObserver { + typealias E = () + + let messageSent = ReplaySubject<()>.create(bufferSize: 1) + + @objc var targetImplementation: IMP = RX_default_target_implementation() + + var isActive: Bool { + return targetImplementation != RX_default_target_implementation() + } + + init() { + } + + @objc func deallocating() -> Void { + messageSent.on(.next()) + } + + deinit { + messageSent.on(.completed) + } + } + + fileprivate final class MessageSentProxy + : MessageInterceptorSubject + , RXMessageSentObserver { + typealias E = [AnyObject] + + let messageSent = PublishSubject<[Any]>() + let methodInvoked = PublishSubject<[Any]>() + + @objc var targetImplementation: IMP = RX_default_target_implementation() + + var isActive: Bool { + return targetImplementation != RX_default_target_implementation() + } + + init() { + } + + @objc func messageSent(withArguments arguments: [Any]) -> Void { + messageSent.on(.next(arguments)) + } + + @objc func methodInvoked(withArguments arguments: [Any]) -> Void { + methodInvoked.on(.next(arguments)) + } + + deinit { + messageSent.on(.completed) + methodInvoked.on(.completed) + } + } + +#endif + + +fileprivate class DeallocObservable { + let _subject = ReplaySubject.create(bufferSize:1) + + init() { + } + + deinit { + _subject.on(.next(())) + _subject.on(.completed) + } +} + +// MARK: KVO + +#if !os(Linux) + +fileprivate protocol KVOObservableProtocol { + var target: AnyObject { get } + var keyPath: String { get } + var retainTarget: Bool { get } + var options: NSKeyValueObservingOptions { get } +} + +fileprivate class KVOObserver + : _RXKVOObserver + , Disposable { + typealias Callback = (Any?) -> Void + + var retainSelf: KVOObserver? = nil + + init(parent: KVOObservableProtocol, callback: @escaping Callback) { + #if TRACE_RESOURCES + _ = Resources.incrementTotal() + #endif + + super.init(target: parent.target, retainTarget: parent.retainTarget, keyPath: parent.keyPath, options: parent.options, callback: callback) + self.retainSelf = self + } + + override func dispose() { + super.dispose() + self.retainSelf = nil + } + + deinit { + #if TRACE_RESOURCES + _ = Resources.decrementTotal() + #endif + } +} + +fileprivate class KVOObservable + : ObservableType + , KVOObservableProtocol { + typealias E = Element? + + unowned var target: AnyObject + var strongTarget: AnyObject? + + var keyPath: String + var options: NSKeyValueObservingOptions + var retainTarget: Bool + + init(object: AnyObject, keyPath: String, options: NSKeyValueObservingOptions, retainTarget: Bool) { + self.target = object + self.keyPath = keyPath + self.options = options + self.retainTarget = retainTarget + if retainTarget { + self.strongTarget = object + } + } + + func subscribe(_ observer: O) -> Disposable where O.E == Element? { + let observer = KVOObserver(parent: self) { (value) in + if value as? NSNull != nil { + observer.on(.next(nil)) + return + } + observer.on(.next(value as? Element)) + } + + return Disposables.create(with: observer.dispose) + } + +} + +#endif + +#if !DISABLE_SWIZZLING && !os(Linux) + + fileprivate func observeWeaklyKeyPathFor(_ target: NSObject, keyPath: String, options: NSKeyValueObservingOptions) -> Observable { + let components = keyPath.components(separatedBy: ".").filter { $0 != "self" } + + let observable = observeWeaklyKeyPathFor(target, keyPathSections: components, options: options) + .finishWithNilWhenDealloc(target) + + if !options.intersection(.initial).isEmpty { + return observable + } + else { + return observable + .skip(1) + } + } + + // This should work correctly + // Identifiers can't contain `,`, so the only place where `,` can appear + // is as a delimiter. + // This means there is `W` as element in an array of property attributes. + fileprivate func isWeakProperty(_ properyRuntimeInfo: String) -> Bool { + return properyRuntimeInfo.range(of: ",W,") != nil + } + + fileprivate extension ObservableType where E == AnyObject? { + func finishWithNilWhenDealloc(_ target: NSObject) + -> Observable { + let deallocating = target.rx.deallocating + + return deallocating + .map { _ in + return Observable.just(nil) + } + .startWith(self.asObservable()) + .switchLatest() + } + } + + fileprivate func observeWeaklyKeyPathFor( + _ target: NSObject, + keyPathSections: [String], + options: NSKeyValueObservingOptions + ) -> Observable { + + weak var weakTarget: AnyObject? = target + + let propertyName = keyPathSections[0] + let remainingPaths = Array(keyPathSections[1.. + + // KVO recursion for value changes + return propertyObservable + .flatMapLatest { (nextTarget: AnyObject?) -> Observable in + if nextTarget == nil { + return Observable.just(nil) + } + let nextObject = nextTarget! as? NSObject + + let strongTarget: AnyObject? = weakTarget + + if nextObject == nil { + return Observable.error(RxCocoaError.invalidObjectOnKeyPath(object: nextTarget!, sourceObject: strongTarget ?? NSNull(), propertyName: propertyName)) + } + + // if target is alive, then send change + // if it's deallocated, don't send anything + if strongTarget == nil { + return Observable.empty() + } + + let nextElementsObservable = keyPathSections.count == 1 + ? Observable.just(nextTarget) + : observeWeaklyKeyPathFor(nextObject!, keyPathSections: remainingPaths, options: options) + + if isWeak { + return nextElementsObservable + .finishWithNilWhenDealloc(nextObject!) + } + else { + return nextElementsObservable + } + } + } +#endif + +// MARK Constants + +fileprivate let deallocSelector = NSSelectorFromString("dealloc") + +// MARK: AnyObject + Reactive + +extension Reactive where Base: AnyObject { + func synchronized( _ action: () -> T) -> T { + objc_sync_enter(self.base) + let result = action() + objc_sync_exit(self.base) + return result + } +} + +extension Reactive where Base: AnyObject { + /** + Helper to make sure that `Observable` returned from `createCachedObservable` is only created once. + This is important because there is only one `target` and `action` properties on `NSControl` or `UIBarButtonItem`. + */ + func lazyInstanceObservable(_ key: UnsafeRawPointer, createCachedObservable: () -> T) -> T { + if let value = objc_getAssociatedObject(base, key) { + return value as! T + } + + let observable = createCachedObservable() + + objc_setAssociatedObject(base, key, observable, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + + return observable + } +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSURLSession+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/URLSession+Rx.swift similarity index 59% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSURLSession+Rx.swift rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/URLSession+Rx.swift index 99bceaa..57d5737 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/Observables/NSURLSession+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Foundation/URLSession+Rx.swift @@ -1,5 +1,5 @@ // -// NSURLSession+Rx.swift +// URLSession+Rx.swift // RxCocoa // // Created by Krunoslav Zaher on 3/23/15. @@ -11,70 +11,58 @@ import Foundation import RxSwift #endif -/** -RxCocoa URL errors. -*/ +/// RxCocoa URL errors. public enum RxCocoaURLError - : ErrorType - , CustomDebugStringConvertible { - /** - Unknown error occurred. - */ - case Unknown - /** - Response is not NSHTTPURLResponse - */ - case NonHTTPResponse(response: NSURLResponse) - /** - Response is not successful. (not in `200 ..< 300` range) - */ - case HTTPRequestFailed(response: NSHTTPURLResponse, data: NSData?) - /** - Deserialization error. - */ - case DeserializationError(error: ErrorType) + : Swift.Error { + /// Unknown error occurred. + case unknown + /// Response is not NSHTTPURLResponse + case nonHTTPResponse(response: URLResponse) + /// Response is not successful. (not in `200 ..< 300` range) + case httpRequestFailed(response: HTTPURLResponse, data: Data?) + /// Deserialization error. + case deserializationError(error: Swift.Error) } -public extension RxCocoaURLError { - /** - A textual representation of `self`, suitable for debugging. - */ +extension RxCocoaURLError + : CustomDebugStringConvertible { + /// A textual representation of `self`, suitable for debugging. public var debugDescription: String { switch self { - case .Unknown: + case .unknown: return "Unknown error has occurred." - case let .NonHTTPResponse(response): + case let .nonHTTPResponse(response): return "Response is not NSHTTPURLResponse `\(response)`." - case let .HTTPRequestFailed(response, _): + case let .httpRequestFailed(response, _): return "HTTP request failed with `\(response.statusCode)`." - case let .DeserializationError(error): + case let .deserializationError(error): return "Error during deserialization of the response: \(error)" } } } -func escapeTerminalString(value: String) -> String { - return value.stringByReplacingOccurrencesOfString("\"", withString: "\\\"", options:[], range: nil) +fileprivate func escapeTerminalString(_ value: String) -> String { + return value.replacingOccurrences(of: "\"", with: "\\\"", options:[], range: nil) } -func convertURLRequestToCurlCommand(request: NSURLRequest) -> String { - let method = request.HTTPMethod ?? "GET" +fileprivate func convertURLRequestToCurlCommand(_ request: URLRequest) -> String { + let method = request.httpMethod ?? "GET" var returnValue = "curl -X \(method) " - if request.HTTPMethod == "POST" && request.HTTPBody != nil { - let maybeBody = NSString(data: request.HTTPBody!, encoding: NSUTF8StringEncoding) as? String + if let httpBody = request.httpBody, request.httpMethod == "POST" { + let maybeBody = String(data: httpBody, encoding: String.Encoding.utf8) if let body = maybeBody { returnValue += "-d \"\(escapeTerminalString(body))\" " } } for (key, value) in request.allHTTPHeaderFields ?? [:] { - let escapedKey = escapeTerminalString((key as String) ?? "") - let escapedValue = escapeTerminalString((value as String) ?? "") + let escapedKey = escapeTerminalString(key as String) + let escapedValue = escapeTerminalString(value as String) returnValue += "\n -H \"\(escapedKey): \(escapedValue)\" " } - let URLString = request.URL?.absoluteString ?? "" + let URLString = request.url?.absoluteString ?? "" returnValue += "\n\"\(escapeTerminalString(URLString))\"" @@ -83,10 +71,10 @@ func convertURLRequestToCurlCommand(request: NSURLRequest) -> String { return returnValue } -func convertResponseToString(data: NSData!, _ response: NSURLResponse!, _ error: NSError!, _ interval: NSTimeInterval) -> String { +fileprivate func convertResponseToString(_ data: Data!, _ response: URLResponse!, _ error: NSError!, _ interval: TimeInterval) -> String { let ms = Int(interval * 1000) - if let response = response as? NSHTTPURLResponse { + if let response = response as? HTTPURLResponse { if 200 ..< 300 ~= response.statusCode { return "Success (\(ms)ms): Status \(response.statusCode)" } @@ -105,7 +93,7 @@ func convertResponseToString(data: NSData!, _ response: NSURLResponse!, _ error: return "" } -extension NSURLSession { +extension Reactive where Base: URLSession { /** Observable sequence of responses for URL request. @@ -118,46 +106,46 @@ extension NSURLSession { - parameter request: URL request. - returns: Observable sequence of URL responses. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_response(request: NSURLRequest) -> Observable<(NSData, NSHTTPURLResponse)> { + public func response(request: URLRequest) -> Observable<(HTTPURLResponse, Data)> { return Observable.create { observer in // smart compiler should be able to optimize this out - var d: NSDate? + let d: Date? if Logging.URLRequests(request) { - d = NSDate() + d = Date() + } + else { + d = nil } - let task = self.dataTaskWithRequest(request) { (data, response, error) in + let task = self.base.dataTask(with: request) { (data, response, error) in if Logging.URLRequests(request) { - let interval = NSDate().timeIntervalSinceDate(d ?? NSDate()) + let interval = Date().timeIntervalSince(d ?? Date()) print(convertURLRequestToCurlCommand(request)) - print(convertResponseToString(data, response, error, interval)) + print(convertResponseToString(data, response, error as NSError!, interval)) } - guard let response = response, data = data else { - observer.on(.Error(error ?? RxCocoaURLError.Unknown)) + guard let response = response, let data = data else { + observer.on(.error(error ?? RxCocoaURLError.unknown)) return } - guard let httpResponse = response as? NSHTTPURLResponse else { - observer.on(.Error(RxCocoaURLError.NonHTTPResponse(response: response))) + guard let httpResponse = response as? HTTPURLResponse else { + observer.on(.error(RxCocoaURLError.nonHTTPResponse(response: response))) return } - observer.on(.Next(data, httpResponse)) - observer.on(.Completed) + observer.on(.next(httpResponse, data)) + observer.on(.completed) } let t = task t.resume() - return AnonymousDisposable { - task.cancel() - } + return Disposables.create(with: task.cancel) } } @@ -176,14 +164,13 @@ extension NSURLSession { - parameter request: URL request. - returns: Observable sequence of response data. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_data(request: NSURLRequest) -> Observable { - return rx_response(request).map { (data, response) -> NSData in + public func data(request: URLRequest) -> Observable { + return response(request: request).map { (response, data) -> Data in if 200 ..< 300 ~= response.statusCode { return data } else { - throw RxCocoaURLError.HTTPRequestFailed(response: response, data: data) + throw RxCocoaURLError.httpRequestFailed(response: response, data: data) } } } @@ -205,20 +192,19 @@ extension NSURLSession { - parameter request: URL request. - returns: Observable sequence of response JSON. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_JSON(request: NSURLRequest) -> Observable { - return rx_data(request).map { (data) -> AnyObject in + public func json(request: URLRequest, options: JSONSerialization.ReadingOptions = []) -> Observable { + return data(request: request).map { (data) -> Any in do { - return try NSJSONSerialization.JSONObjectWithData(data, options: []) + return try JSONSerialization.jsonObject(with: data, options: options) } catch let error { - throw RxCocoaURLError.DeserializationError(error: error) + throw RxCocoaURLError.deserializationError(error: error) } } } /** Observable sequence of response JSON for GET request with `URL`. - + Performing of request starts after observer is subscribed and not after invoking this method. **URL requests will be performed per subscribed observer.** @@ -230,11 +216,11 @@ extension NSURLSession { If there is an error during JSON deserialization observable sequence will fail with that error. - - parameter URL: URL of `NSURLRequest` request. + - parameter url: URL of `NSURLRequest` request. - returns: Observable sequence of response JSON. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func rx_JSON(URL: NSURL) -> Observable { - return rx_JSON(NSURLRequest(URL: URL)) + public func json(url: Foundation.URL) -> Observable { + return json(request: URLRequest(url: url)) } } + diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RX.m b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RX.m similarity index 85% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RX.m rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RX.m index 4c5ffe7..cffbfbc 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RX.m +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RX.m @@ -6,5 +6,5 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -#import "_RX.h" +#import "include/_RX.h" diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXDelegateProxy.m b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RXDelegateProxy.m similarity index 80% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXDelegateProxy.m rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RXDelegateProxy.m index 581fbab..d0333a0 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXDelegateProxy.m +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RXDelegateProxy.m @@ -6,11 +6,13 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -#import "_RXDelegateProxy.h" -#import "_RX.h" -#import "_RXObjCRuntime.h" +#import "include/_RXDelegateProxy.h" +#import "include/_RX.h" +#import "include/_RXObjCRuntime.h" -@interface _RXDelegateProxy () +@interface _RXDelegateProxy () { + id __weak __forwardToDelegate; +} @property (nonatomic, strong) id strongForwardDelegate; @@ -58,7 +60,7 @@ +(void)initialize { #define CLASS_HIERARCHY_MAX_DEPTH 100 NSInteger classHierarchyDepth = 0; - Class targetClass = self; + Class targetClass = NULL; for (classHierarchyDepth = 0, targetClass = self; classHierarchyDepth < CLASS_HIERARCHY_MAX_DEPTH && targetClass != nil; @@ -86,11 +88,11 @@ +(void)initialize { } } --(void)interceptedSelector:(SEL)selector withArguments:(NSArray *)arguments { - +-(id)_forwardToDelegate { + return __forwardToDelegate; } --(void)_setForwardToDelegate:(id)forwardToDelegate retainDelegate:(BOOL)retainDelegate { +-(void)_setForwardToDelegate:(id __nullable)forwardToDelegate retainDelegate:(BOOL)retainDelegate { __forwardToDelegate = forwardToDelegate; if (retainDelegate) { self.strongForwardDelegate = forwardToDelegate; @@ -119,14 +121,30 @@ -(BOOL)respondsToSelector:(SEL)aSelector { } -(void)forwardInvocation:(NSInvocation *)anInvocation { - if (RX_is_method_signature_void(anInvocation.methodSignature)) { - NSArray *arguments = RX_extract_arguments(anInvocation); - [self interceptedSelector:anInvocation.selector withArguments:arguments]; + BOOL isVoid = RX_is_method_signature_void(anInvocation.methodSignature); + NSArray *arguments = nil; + if (isVoid) { + arguments = RX_extract_arguments(anInvocation); + [self _sentMessage:anInvocation.selector withArguments:arguments]; } if (self._forwardToDelegate && [self._forwardToDelegate respondsToSelector:anInvocation.selector]) { [anInvocation invokeWithTarget:self._forwardToDelegate]; } + + if (isVoid) { + [self _methodInvoked:anInvocation.selector withArguments:arguments]; + } +} + +// abstract method +-(void)_sentMessage:(SEL)selector withArguments:(NSArray *)arguments { + +} + +// abstract method +-(void)_methodInvoked:(SEL)selector withArguments:(NSArray *)arguments { + } -(void)dealloc { diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXKVOObserver.m b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RXKVOObserver.m similarity index 93% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXKVOObserver.m rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RXKVOObserver.m index 965d189..fc8fb75 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXKVOObserver.m +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RXKVOObserver.m @@ -6,14 +6,14 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -#import "_RXKVOObserver.h" +#import "include/_RXKVOObserver.h" @interface _RXKVOObserver () @property (nonatomic, unsafe_unretained) id target; @property (nonatomic, strong ) id retainedTarget; @property (nonatomic, copy ) NSString *keyPath; -@property (nonatomic, copy ) KVOCallback callback; +@property (nonatomic, copy ) void (^callback)(id); @end diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXObjCRuntime.m b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RXObjCRuntime.m similarity index 88% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXObjCRuntime.m rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RXObjCRuntime.m index 7cba795..669fab4 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXObjCRuntime.m +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/_RXObjCRuntime.m @@ -12,8 +12,8 @@ #import #import -#import "_RX.h" -#import "_RXObjcRuntime.h" +#import "include/_RX.h" +#import "include/_RXObjCRuntime.h" #if !DISABLE_SWIZZLING @@ -212,12 +212,18 @@ static BOOL RX_forward_invocation(id __nonnull __unsafe_unretained self, NSInvoc if (messageSentObserver != nil) { NSArray *arguments = RX_extract_arguments(invocation); - [messageSentObserver messageSentWithParameters:arguments]; + [messageSentObserver messageSentWithArguments:arguments]; } if ([self respondsToSelector:originalSelector]) { invocation.selector = originalSelector; [invocation invokeWithTarget:self]; + + if (messageSentObserver != nil) { + NSArray *arguments = RX_extract_arguments(invocation); + [messageSentObserver methodInvokedWithArguments:arguments]; + } + return YES; } @@ -289,7 +295,7 @@ +(void)registerOptimizedObserver:(RXInterceptWithOptimizedObserver)registration that every action is properly locked. */ IMP __nullable RX_ensure_observing(id __nonnull target, SEL __nonnull selector, NSError ** __nonnull error) { - __block IMP __nonnull targetImplementation = nil; + __block IMP targetImplementation = nil; // Target is the second object that needs to be synchronized to TRY to make sure other swizzling framework // won't do something in parallel. // Even though this is too fine grained locking and more coarse grained locks should exist, this is just in case @@ -331,18 +337,24 @@ IMP __nonnull RX_default_target_implementation() { return methodSignature; \ } -#define DEALLOCATING_BODY(...) \ - id observer = objc_getAssociatedObject(self, rxSelector); \ - if (observer != nil && observer.targetImplementation == thisIMP) { \ - [observer messageSentWithParameters:@[]]; \ +#define DEALLOCATING_BODY(...) \ + id observer = objc_getAssociatedObject(self, rxSelector); \ + if (observer != nil && observer.targetImplementation == thisIMP) { \ + [observer deallocating]; \ } -#define OBSERVE_BODY(...) \ - id observer = objc_getAssociatedObject(self, rxSelector); \ - \ - if (observer != nil && observer.targetImplementation == thisIMP) { \ - [observer messageSentWithParameters:@[COMMA_DELIMITED_ARGUMENTS(__VA_ARGS__)]]; \ - } \ +#define OBSERVE_BODY(...) \ + id observer = objc_getAssociatedObject(self, rxSelector); \ + \ + if (observer != nil && observer.targetImplementation == thisIMP) { \ + [observer messageSentWithArguments:@[COMMA_DELIMITED_ARGUMENTS(__VA_ARGS__)]]; \ + } \ + + +#define OBSERVE_INVOKED_BODY(...) \ + if (observer != nil && observer.targetImplementation == thisIMP) { \ + [observer methodInvokedWithArguments:@[COMMA_DELIMITED_ARGUMENTS(__VA_ARGS__)]]; \ + } \ #define BUILD_ARG_WRAPPER(type) RX_ARG_ ## type //RX_ARG_ ## type @@ -379,35 +391,37 @@ +(return_value)RX_CAT2(RX_CAT2(example_, return_value), RX_FOR(_, SEPARATE_BY_SP #define BUILD_EXAMPLE_METHOD_SELECTOR(return_value, ...) \ RX_CAT2(RX_CAT2(example_, return_value), RX_FOR(_, SEPARATE_BY_SPACE, SELECTOR_PART, ## __VA_ARGS__)) -#define SWIZZLE_OBSERVE_METHOD(return_value, ...) \ - @interface RXObjCRuntime (GENERATE_METHOD_IDENTIFIER(return_value, ## __VA_ARGS__)) \ - @end \ - \ - @implementation RXObjCRuntime(GENERATE_METHOD_IDENTIFIER(return_value, ## __VA_ARGS__)) \ - BUILD_EXAMPLE_METHOD(return_value, ## __VA_ARGS__) \ - SWIZZLE_METHOD(return_value, GENERATE_OBSERVE_METHOD_DECLARATION(return_value, ## __VA_ARGS__), OBSERVE_BODY, ## __VA_ARGS__) \ - \ - +(void)load { \ - __unused SEL exampleSelector = @selector(BUILD_EXAMPLE_METHOD_SELECTOR(return_value, ## __VA_ARGS__)); \ - [self registerOptimizedObserver:^BOOL(RXObjCRuntime * __nonnull self, Class __nonnull class, \ - SEL __nonnull selector, NSError **__nonnull error) { \ - return [self GENERATE_METHOD_IDENTIFIER(return_value, ## __VA_ARGS__):class selector:selector error:error]; \ - } encodedAs:exampleSelector]; \ - } \ - \ - @end \ +#define SWIZZLE_OBSERVE_METHOD(return_value, ...) \ + @interface RXObjCRuntime (GENERATE_METHOD_IDENTIFIER(return_value, ## __VA_ARGS__)) \ + @end \ + \ + @implementation RXObjCRuntime(GENERATE_METHOD_IDENTIFIER(return_value, ## __VA_ARGS__)) \ + BUILD_EXAMPLE_METHOD(return_value, ## __VA_ARGS__) \ + SWIZZLE_METHOD(return_value, GENERATE_OBSERVE_METHOD_DECLARATION(return_value, ## __VA_ARGS__), OBSERVE_BODY, OBSERVE_INVOKED_BODY, ## __VA_ARGS__) \ + \ + +(void)load { \ + __unused SEL exampleSelector = @selector(BUILD_EXAMPLE_METHOD_SELECTOR(return_value, ## __VA_ARGS__)); \ + [self registerOptimizedObserver:^BOOL(RXObjCRuntime * __nonnull self, Class __nonnull class, \ + SEL __nonnull selector, NSError **__nonnull error) { \ + return [self GENERATE_METHOD_IDENTIFIER(return_value, ## __VA_ARGS__):class selector:selector error:error]; \ + } encodedAs:exampleSelector]; \ + } \ + \ + @end \ // infrastructure method +#define NO_BODY(...) + #define SWIZZLE_INFRASTRUCTURE_METHOD(return_value, method_name, parameters, method_selector, body, ...) \ SWIZZLE_METHOD(return_value, -(BOOL)method_name:(Class __nonnull)class parameters error:(NSError **__nonnull)error \ { \ - SEL selector = method_selector; , body, __VA_ARGS__) \ + SEL selector = method_selector; , body, NO_BODY, __VA_ARGS__) \ // common base -#define SWIZZLE_METHOD(return_value, method_prototype, body, ...) \ +#define SWIZZLE_METHOD(return_value, method_prototype, body, invoked_body, ...) \ method_prototype \ __unused SEL rxSelector = RX_selector(selector); \ IMP (^newImplementationGenerator)() = ^() { \ @@ -422,7 +436,10 @@ +(void)load { \ return_value (*msgSend)(struct objc_super *, SEL DECLARE_ARGUMENTS(__VA_ARGS__)) \ = (__typeof__(msgSend))objc_msgSendSuper; \ - return msgSend(&superInfo, selector ARGUMENTS(__VA_ARGS__)); \ + @try { \ + return msgSend(&superInfo, selector ARGUMENTS(__VA_ARGS__)); \ + } \ + @finally { invoked_body(__VA_ARGS__) } \ }; \ \ thisIMP = imp_implementationWithBlock(newImplementation); \ @@ -436,8 +453,10 @@ __block return_value (*originalImplementationTyped)(__unsafe_unretained id, SEL __block IMP thisIMP = nil; \ id implementationReplacement = ^return_value(__unsafe_unretained id self DECLARE_ARGUMENTS(__VA_ARGS__) ) { \ body(__VA_ARGS__) \ - \ - return originalImplementationTyped(self, selector ARGUMENTS(__VA_ARGS__)); \ + @try { \ + return originalImplementationTyped(self, selector ARGUMENTS(__VA_ARGS__)); \ + } \ + @finally { invoked_body(__VA_ARGS__) } \ }; \ \ thisIMP = imp_implementationWithBlock(implementationReplacement); \ @@ -596,28 +615,26 @@ +(void)registerOptimizedObserver:(RXInterceptWithOptimizedObserver)registration -(IMP __nullable)ensurePrepared:(id __nonnull)target forObserving:(SEL __nonnull)selector error:(NSError** __nonnull)error { Method instanceMethod = class_getInstanceMethod([target class], selector); if (instanceMethod == nil) { - *error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain - code:RXObjCRuntimeErrorSelectorNotImplemented - userInfo:nil]; - return nil; + RX_THROW_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain + code:RXObjCRuntimeErrorSelectorNotImplemented + userInfo:nil], nil); } if (selector == @selector(class) || selector == @selector(forwardingTargetForSelector:) || selector == @selector(methodSignatureForSelector:) || selector == @selector(respondsToSelector:)) { - *error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain - code:RXObjCRuntimeErrorObservingPerformanceSensitiveMessages - userInfo:nil]; - return nil; + RX_THROW_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain + code:RXObjCRuntimeErrorObservingPerformanceSensitiveMessages + userInfo:nil], nil); } // For `dealloc` message, original implementation will be swizzled. - // This is a special case because observing `dealloc` message is performed when `rx_observeWeakly` is used. + // This is a special case because observing `dealloc` message is performed when `observeWeakly` is used. // // Some toll free bridged classes don't handle `object_setClass` well and cause crashes. // - // To make `rx_deallocating` as robust as possible, original implementation will be replaced. + // To make `deallocating` as robust as possible, original implementation will be replaced. if (selector == deallocSelector) { Class __nonnull deallocSwizzingTarget = [target class]; IMP interceptorIMPForSelector = [self interceptorImplementationForSelector:selector forClass:deallocSwizzingTarget]; @@ -644,11 +661,9 @@ -(IMP __nullable)ensurePrepared:(id __nonnull)target forObserving:(SEL __nonnull RXInterceptWithOptimizedObserver optimizedIntercept = optimizedObserversByMethodEncoding[methodEncoding]; if (!RX_method_has_supported_return_type(instanceMethod)) { - *error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain - code:RXObjCRuntimeErrorObservingMessagesWithUnsupportedReturnType - userInfo:nil]; - - return nil; + RX_THROW_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain + code:RXObjCRuntimeErrorObservingMessagesWithUnsupportedReturnType + userInfo:nil], nil); } // optimized interception method @@ -686,12 +701,9 @@ -(IMP __nullable)ensurePrepared:(id __nonnull)target forObserving:(SEL __nonnull } } - - *error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain - code:RXObjCRuntimeErrorUnknown - userInfo:nil]; - - return nil; + RX_THROW_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain + code:RXObjCRuntimeErrorUnknown + userInfo:nil], nil); } -(Class __nullable)prepareTargetClassForObserving:(id __nonnull)target error:(NSError **__nonnull)error { @@ -711,19 +723,18 @@ -(Class __nullable)prepareTargetClassForObserving:(id __nonnull)target error:(NS BOOL isThisTollFreeFoundationClass = CFGetTypeID((CFTypeRef)target) != defaultTypeID; if (isThisTollFreeFoundationClass) { - *error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain - code:RXObjCRuntimeErrorCantInterceptCoreFoundationTollFreeBridgedObjects - userInfo:nil]; - return nil; + RX_THROW_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain + code:RXObjCRuntimeErrorCantInterceptCoreFoundationTollFreeBridgedObjects + userInfo:nil], nil); } /** If the object is reporting a different class then what it's real class, that means that there is probably already some interception mechanism in place or something weird is happening. - Most common case when this would happen is when using KVO (`rx_observe`) and `rx_sentMessage`. + Most common case when this would happen is when using KVO (`observe`) and `sentMessage`. - This error is easily resolved by just using `rx_sentMessage` observing before `rx_observe`. + This error is easily resolved by just using `sentMessage` observing before `observe`. The reason why other way around could create issues is because KVO will unregister it's interceptor class and restore original class. Unfortunately that will happen no matter was there another interceptor @@ -731,7 +742,7 @@ Most common case when this would happen is when using KVO (`rx_observe`) and `rx Failure scenario: * KVO sets class to be `__KVO__OriginalClass` (subclass of `OriginalClass`) - * `rx_sentMessage` sets object class to be `_RX_namespace___KVO__OriginalClass` (subclass of `__KVO__OriginalClass`) + * `sentMessage` sets object class to be `_RX_namespace___KVO__OriginalClass` (subclass of `__KVO__OriginalClass`) * then unobserving with KVO will restore class to be `OriginalClass` -> failure point The reason why changing order of observing works is because any interception method should return @@ -745,12 +756,11 @@ Most common case when this would happen is when using KVO (`rx_observe`) and `rx if ([target class] != object_getClass(target)) { BOOL isKVO = [target respondsToSelector:NSSelectorFromString(@"_isKVOA")]; - *error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain - code:RXObjCRuntimeErrorObjectMessagesAlreadyBeingIntercepted - userInfo:@{ - RXObjCRuntimeErrorIsKVOKey: @(isKVO) - }]; - return nil; + RX_THROW_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain + code:RXObjCRuntimeErrorObjectMessagesAlreadyBeingIntercepted + userInfo:@{ + RXObjCRuntimeErrorIsKVOKey : @(isKVO) + }], nil); } Class __nullable dynamicFakeSubclass = [self ensureHasDynamicFakeSubclass:wannaBeClass error:error]; @@ -761,11 +771,10 @@ Most common case when this would happen is when using KVO (`rx_observe`) and `rx Class previousClass = object_setClass(target, dynamicFakeSubclass); if (previousClass != wannaBeClass) { - *error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain - code:RXObjCRuntimeErrorThreadingCollisionWithOtherInterceptionMechanism - userInfo:nil]; THREADING_HAZARD(wannaBeClass); - return nil; + RX_THROW_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain + code:RXObjCRuntimeErrorThreadingCollisionWithOtherInterceptionMechanism + userInfo:nil], nil); } objc_setAssociatedObject(target, &RxSwizzlingTargetClassKey, dynamicFakeSubclass, OBJC_ASSOCIATION_RETAIN_NONATOMIC); @@ -801,7 +810,7 @@ -(BOOL)observeByForwardingMessages:(Class __nonnull)swizzlingImplementorClass ALWAYS(![self forwardingSelector:selector forClass:swizzlingImplementorClass], @"Already observing selector for class"); #if TRACE_RESOURCES - OSAtomicIncrement32(&numberOfForwardedMethods); + OSAtomicIncrement32Barrier(&numberOfForwardedMethods); #endif SEL rxSelector = RX_selector(selector); @@ -816,27 +825,23 @@ -(BOOL)observeByForwardingMessages:(Class __nonnull)swizzlingImplementorClass IMP implementation = method_getImplementation(instanceMethod); if (implementation == nil) { - *error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain - code:RXObjCRuntimeErrorSelectorNotImplemented - userInfo:nil]; - - return NO; + RX_THROW_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain + code:RXObjCRuntimeErrorSelectorNotImplemented + userInfo:nil], NO); } if (!class_addMethod(swizzlingImplementorClass, rxSelector, implementation, methodEncoding)) { - *error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain - code:RXObjCRuntimeErrorSavingOriginalForwardingMethodFailed - userInfo:nil]; - return NO; + RX_THROW_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain + code:RXObjCRuntimeErrorSavingOriginalForwardingMethodFailed + userInfo:nil], NO); } if (!class_addMethod(swizzlingImplementorClass, selector, _objc_msgForward, methodEncoding)) { if (implementation != method_setImplementation(instanceMethod, _objc_msgForward)) { - *error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain - code:RXObjCRuntimeErrorReplacingMethodWithForwardingImplementation - userInfo:nil]; THREADING_HAZARD(swizzlingImplementorClass); - return NO; + RX_THROW_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain + code:RXObjCRuntimeErrorReplacingMethodWithForwardingImplementation + userInfo:nil], NO); } } @@ -932,7 +937,7 @@ -(BOOL)ensureSwizzledSelector:(SEL __nonnull)selector } #if TRACE_RESOURCES - OSAtomicIncrement32(&numberOInterceptedMethods); + OSAtomicIncrement32Barrier(&numberOInterceptedMethods); #endif DLOG(@"Rx is swizzling `%@` for `%@`", NSStringFromSelector(selector), class); @@ -1018,4 +1023,4 @@ NSInteger RX_number_of_swizzled_methods() { #endif -#endif \ No newline at end of file +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/RxCocoaRuntime.h b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/RxCocoaRuntime.h new file mode 100644 index 0000000..8cf762e --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/RxCocoaRuntime.h @@ -0,0 +1,19 @@ +// +// RxCocoaRuntime.h +// RxCocoa +// +// Created by Krunoslav Zaher on 2/21/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#import +#import "_RX.h" +#import "_RXDelegateProxy.h" +#import "_RXKVOObserver.h" +#import "_RXObjCRuntime.h" + +//! Project version number for RxCocoa. +FOUNDATION_EXPORT double RxCocoaVersionNumber; + +//! Project version string for RxCocoa. +FOUNDATION_EXPORT const unsigned char RxCocoaVersionString[]; diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RX.h b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RX.h similarity index 90% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RX.h rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RX.h index 28d2de6..aae1777 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RX.h +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RX.h @@ -32,6 +32,12 @@ #define CLASS_VALUE(x) [NSValue valueWithNonretainedObject:(x)] #define IMP_VALUE(x) [NSValue valueWithPointer:(x)] +/** + Checks that the local `error` instance exists before assigning it's value by reference. + This macro exists to work around static analysis warnings — `NSError` is always assumed to be `nullable`, even though we explictly define the method parameter as `nonnull`. See http://www.openradar.me/21766176 for more details. + */ +#define RX_THROW_ERROR(errorValue, returnValue) if (error != nil) { *error = (errorValue); } return (returnValue); + // Inspired by http://p99.gforge.inria.fr // https://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC26 @@ -130,4 +136,4 @@ // rx cat -#define _RX_CAT2(_1, _2) _1 ## _2 \ No newline at end of file +#define _RX_CAT2(_1, _2) _1 ## _2 diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RXDelegateProxy.h b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RXDelegateProxy.h new file mode 100644 index 0000000..523e7ae --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RXDelegateProxy.h @@ -0,0 +1,26 @@ +// +// _RXDelegateProxy.h +// RxCocoa +// +// Created by Krunoslav Zaher on 7/4/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface _RXDelegateProxy : NSObject + +@property (nonatomic, weak, readonly) id _forwardToDelegate; + +-(void)_setForwardToDelegate:(id __nullable)forwardToDelegate retainDelegate:(BOOL)retainDelegate; + +-(BOOL)hasWiredImplementationForSelector:(SEL)selector; + +-(void)_sentMessage:(SEL)selector withArguments:(NSArray*)arguments; +-(void)_methodInvoked:(SEL)selector withArguments:(NSArray*)arguments; + +@end + +NS_ASSUME_NONNULL_END diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXKVOObserver.h b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RXKVOObserver.h similarity index 89% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXKVOObserver.h rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RXKVOObserver.h index ec9afd5..adcfd0a 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXKVOObserver.h +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RXKVOObserver.h @@ -14,8 +14,6 @@ ################################################################################ */ -typedef void (^KVOCallback)(id); - // Exists because if written in Swift, reading unowned is disabled during dealloc process @interface _RXKVOObserver : NSObject @@ -23,7 +21,7 @@ typedef void (^KVOCallback)(id); retainTarget:(BOOL)retainTarget keyPath:(NSString*)keyPath options:(NSKeyValueObservingOptions)options - callback:(KVOCallback)callback; + callback:(void (^)(id))callback; -(void)dispose; diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXObjCRuntime.h b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RXObjCRuntime.h similarity index 69% rename from RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXObjCRuntime.h rename to RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RXObjCRuntime.h index 17d8bf0..ca0d025 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Common/_RXObjCRuntime.h +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/Runtime/include/_RXObjCRuntime.h @@ -37,14 +37,10 @@ */ extern BOOL RXAbortOnThreadingHazard; -/** - Error domain for RXObjCRuntime. - */ +/// Error domain for RXObjCRuntime. extern NSString * __nonnull const RXObjCRuntimeErrorDomain; -/** - `userInfo` key with additional information is interceptor probably KVO. - */ +/// `userInfo` key with additional information is interceptor probably KVO. extern NSString * __nonnull const RXObjCRuntimeErrorIsKVOKey; typedef NS_ENUM(NSInteger, RXObjCRuntimeError) { @@ -59,54 +55,48 @@ typedef NS_ENUM(NSInteger, RXObjCRuntimeError) { RXObjCRuntimeErrorObservingMessagesWithUnsupportedReturnType = 9, }; -/** - Transforms normal selector into a selector with RX prefix. - */ +/// Transforms normal selector into a selector with RX prefix. SEL _Nonnull RX_selector(SEL _Nonnull selector); -/** - Transforms selector into a unique pointer (because of Swift conversion rules) - */ +/// Transforms selector into a unique pointer (because of Swift conversion rules) void * __nonnull RX_reference_from_selector(SEL __nonnull selector); -/** - Protocol that interception observers must implement. - */ +/// Protocol that interception observers must implement. @protocol RXMessageSentObserver -/** - In case the same selector is being intercepted for a pair of base/sub classes, - this property will differentiate between interceptors that need to fire. - */ +/// In case the same selector is being intercepted for a pair of base/sub classes, +/// this property will differentiate between interceptors that need to fire. @property (nonatomic, assign, readonly) IMP __nonnull targetImplementation; --(void)messageSentWithParameters:(NSArray* __nonnull)parameters; +-(void)messageSentWithArguments:(NSArray* __nonnull)arguments; +-(void)methodInvokedWithArguments:(NSArray* __nonnull)arguments; @end -/** - Ensures interceptor is installed on target object. - */ +/// Protocol that deallocating observer must implement. +@protocol RXDeallocatingObserver + +/// In case the same selector is being intercepted for a pair of base/sub classes, +/// this property will differentiate between interceptors that need to fire. +@property (nonatomic, assign, readonly) IMP __nonnull targetImplementation; + +-(void)deallocating; + +@end + +/// Ensures interceptor is installed on target object. IMP __nullable RX_ensure_observing(id __nonnull target, SEL __nonnull selector, NSError *__nullable * __nonnull error); -/** - Extracts arguments for `invocation`. - */ +/// Extracts arguments for `invocation`. NSArray * __nonnull RX_extract_arguments(NSInvocation * __nonnull invocation); -/** - Returns `YES` in case method has `void` return type. - */ +/// Returns `YES` in case method has `void` return type. BOOL RX_is_method_with_description_void(struct objc_method_description method); -/** - Returns `YES` in case methodSignature has `void` return type. - */ +/// Returns `YES` in case methodSignature has `void` return type. BOOL RX_is_method_signature_void(NSMethodSignature * __nonnull methodSignature); -/** - Default value for `RXInterceptionObserver.targetImplementation`. - */ +/// Default value for `RXInterceptionObserver.targetImplementation`. IMP __nonnull RX_default_target_implementation(); -#endif \ No newline at end of file +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/RxCocoa.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/RxCocoa.swift new file mode 100644 index 0000000..e4a646c --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/RxCocoa.swift @@ -0,0 +1,148 @@ +// +// RxCocoa.swift +// RxCocoa +// +// Created by Krunoslav Zaher on 2/21/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation +#if !RX_NO_MODULE +import RxSwift +#endif +#if os(iOS) + import UIKit +#endif + +/// RxCocoa errors. +public enum RxCocoaError + : Swift.Error + , CustomDebugStringConvertible { + /// Unknown error has occurred. + case unknown + /// Invalid operation was attempted. + case invalidOperation(object: Any) + /// Items are not yet bound to user interface but have been requested. + case itemsNotYetBound(object: Any) + /// Invalid KVO Path. + case invalidPropertyName(object: Any, propertyName: String) + /// Invalid object on key path. + case invalidObjectOnKeyPath(object: Any, sourceObject: AnyObject, propertyName: String) + /// Error during swizzling. + case errorDuringSwizzling + /// Casting error. + case castingError(object: Any, targetType: Any.Type) +} + + +// MARK: Debug descriptions + +extension RxCocoaError { + /// A textual representation of `self`, suitable for debugging. + public var debugDescription: String { + switch self { + case .unknown: + return "Unknown error occurred." + case let .invalidOperation(object): + return "Invalid operation was attempted on `\(object)`." + case let .itemsNotYetBound(object): + return "Data source is set, but items are not yet bound to user interface for `\(object)`." + case let .invalidPropertyName(object, propertyName): + return "Object `\(object)` dosn't have a property named `\(propertyName)`." + case let .invalidObjectOnKeyPath(object, sourceObject, propertyName): + return "Unobservable object `\(object)` was observed as `\(propertyName)` of `\(sourceObject)`." + case .errorDuringSwizzling: + return "Error during swizzling." + case .castingError(let object, let targetType): + return "Error casting `\(object)` to `\(targetType)`" + } + } +} + + + +// MARK: Error binding policies + +func bindingErrorToInterface(_ error: Swift.Error) { + let error = "Binding error to UI: \(error)" +#if DEBUG + rxFatalError(error) +#else + print(error) +#endif +} + +// MARK: Abstract methods + +func rxAbstractMethodWithMessage(_ message: String) -> Swift.Never { + rxFatalError(message) +} + +func rxAbstractMethod() -> Swift.Never { + rxFatalError("Abstract method") +} + +// MARK: casts or fatal error + +// workaround for Swift compiler bug, cheers compiler team :) +func castOptionalOrFatalError(_ value: Any?) -> T? { + if value == nil { + return nil + } + let v: T = castOrFatalError(value) + return v +} + +func castOrThrow(_ resultType: T.Type, _ object: Any) throws -> T { + guard let returnValue = object as? T else { + throw RxCocoaError.castingError(object: object, targetType: resultType) + } + + return returnValue +} + +func castOptionalOrThrow(_ resultType: T.Type, _ object: AnyObject) throws -> T? { + if NSNull().isEqual(object) { + return nil + } + + guard let returnValue = object as? T else { + throw RxCocoaError.castingError(object: object, targetType: resultType) + } + + return returnValue +} + +func castOrFatalError(_ value: AnyObject!, message: String) -> T { + let maybeResult: T? = value as? T + guard let result = maybeResult else { + rxFatalError(message) + } + + return result +} + +func castOrFatalError(_ value: Any!) -> T { + let maybeResult: T? = value as? T + guard let result = maybeResult else { + rxFatalError("Failure converting from \(value) to \(T.self)") + } + + return result +} + +// MARK: Error messages + +let dataSourceNotSet = "DataSource not set" +let delegateNotSet = "Delegate not set" + +// MARK: Shared with RxSwift + +#if !RX_NO_MODULE + +func rxFatalError(_ lastMessage: String) -> Never { + // The temptation to comment this line is great, but please don't, it's for your own good. The choice is yours. + fatalError(lastMessage) +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift index 2ff9e09..ab83497 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift @@ -19,37 +19,38 @@ class _RxCollectionViewReactiveArrayDataSource : NSObject , UICollectionViewDataSource { - func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { + @objc(numberOfSectionsInCollectionView:) + func numberOfSections(in: UICollectionView) -> Int { return 1 } - func _collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + func _collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 0 } - func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return _collectionView(collectionView, numberOfItemsInSection: section) } - func _collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { + fileprivate func _collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { rxAbstractMethod() } - - func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - return _collectionView(collectionView, cellForItemAtIndexPath: indexPath) + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + return _collectionView(collectionView, cellForItemAt: indexPath) } } -class RxCollectionViewReactiveArrayDataSourceSequenceWrapper - : RxCollectionViewReactiveArrayDataSource +class RxCollectionViewReactiveArrayDataSourceSequenceWrapper + : RxCollectionViewReactiveArrayDataSource , RxCollectionViewDataSourceType { typealias Element = S - override init(cellFactory: CellFactory) { + override init(cellFactory: @escaping CellFactory) { super.init(cellFactory: cellFactory) } - func collectionView(collectionView: UICollectionView, observedEvent: Event) { + func collectionView(_ collectionView: UICollectionView, observedEvent: Event) { UIBindingObserver(UIElement: self) { collectionViewDataSource, sectionModels in let sections = Array(sectionModels) collectionViewDataSource.collectionView(collectionView, observedElements: sections) @@ -67,37 +68,37 @@ class RxCollectionViewReactiveArrayDataSource var itemModels: [Element]? = nil - func modelAtIndex(index: Int) -> Element? { + func modelAtIndex(_ index: Int) -> Element? { return itemModels?[index] } - func modelAtIndexPath(indexPath: NSIndexPath) throws -> Any { + func model(at indexPath: IndexPath) throws -> Any { precondition(indexPath.section == 0) guard let item = itemModels?[indexPath.item] else { - throw RxCocoaError.ItemsNotYetBound(object: self) + throw RxCocoaError.itemsNotYetBound(object: self) } return item } var cellFactory: CellFactory - init(cellFactory: CellFactory) { + init(cellFactory: @escaping CellFactory) { self.cellFactory = cellFactory } // data source - override func _collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + override func _collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return itemModels?.count ?? 0 } - override func _collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { + override func _collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { return cellFactory(collectionView, indexPath.item, itemModels![indexPath.item]) } // reactive - func collectionView(collectionView: UICollectionView, observedElements: [Element]) { + func collectionView(_ collectionView: UICollectionView, observedElements: [Element]) { self.itemModels = observedElements collectionView.reloadData() diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift index e3e80de..ec63f41 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift @@ -19,38 +19,38 @@ class _RxTableViewReactiveArrayDataSource : NSObject , UITableViewDataSource { - func numberOfSectionsInTableView(tableView: UITableView) -> Int { + func numberOfSections(in tableView: UITableView) -> Int { return 1 } - func _tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + func _tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 0 } - func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return _tableView(tableView, numberOfRowsInSection: section) } - func _tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + fileprivate func _tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { rxAbstractMethod() } - - func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - return _tableView(tableView, cellForRowAtIndexPath: indexPath) + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return _tableView(tableView, cellForRowAt: indexPath) } } -class RxTableViewReactiveArrayDataSourceSequenceWrapper - : RxTableViewReactiveArrayDataSource +class RxTableViewReactiveArrayDataSourceSequenceWrapper + : RxTableViewReactiveArrayDataSource , RxTableViewDataSourceType { typealias Element = S - override init(cellFactory: CellFactory) { + override init(cellFactory: @escaping CellFactory) { super.init(cellFactory: cellFactory) } - func tableView(tableView: UITableView, observedEvent: Event) { + func tableView(_ tableView: UITableView, observedEvent: Event) { UIBindingObserver(UIElement: self) { tableViewDataSource, sectionModels in let sections = Array(sectionModels) tableViewDataSource.tableView(tableView, observedElements: sections) @@ -66,35 +66,35 @@ class RxTableViewReactiveArrayDataSource var itemModels: [Element]? = nil - func modelAtIndex(index: Int) -> Element? { + func modelAtIndex(_ index: Int) -> Element? { return itemModels?[index] } - func modelAtIndexPath(indexPath: NSIndexPath) throws -> Any { + func model(at indexPath: IndexPath) throws -> Any { precondition(indexPath.section == 0) guard let item = itemModels?[indexPath.item] else { - throw RxCocoaError.ItemsNotYetBound(object: self) + throw RxCocoaError.itemsNotYetBound(object: self) } return item } let cellFactory: CellFactory - init(cellFactory: CellFactory) { + init(cellFactory: @escaping CellFactory) { self.cellFactory = cellFactory } - override func _tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + override func _tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return itemModels?.count ?? 0 } - override func _tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + override func _tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { return cellFactory(tableView, indexPath.item, itemModels![indexPath.row]) } // reactive - func tableView(tableView: UITableView, observedElements: [Element]) { + func tableView(_ tableView: UITableView, observedElements: [Element]) { self.itemModels = observedElements tableView.reloadData() diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift index ecbe6e9..d3776b7 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift @@ -7,6 +7,10 @@ // import Foundation +#if os(iOS) || os(tvOS) import UIKit -public typealias ItemMovedEvent = (sourceIndex: NSIndexPath, destinationIndex: NSIndexPath) \ No newline at end of file +public typealias ItemMovedEvent = (sourceIndex: IndexPath, destinationIndex: IndexPath) +public typealias WillDisplayCellEvent = (cell: UITableViewCell, indexPath: IndexPath) +public typealias DidEndDisplayingCellEvent = (cell: UITableViewCell, indexPath: IndexPath) +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/NSTextStorage+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/NSTextStorage+Rx.swift index b2c933b..8fa1b3a 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/NSTextStorage+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/NSTextStorage+Rx.swift @@ -1,6 +1,6 @@ // // NSTextStorage+Rx.swift -// Rx +// RxCocoa // // Created by Segii Shulga on 12/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -14,23 +14,19 @@ import Foundation #endif import UIKit -extension NSTextStorage { +extension Reactive where Base: NSTextStorage { - /** - Reactive wrapper for `delegate`. - - For more information take a look at `DelegateProxyType` protocol documentation. - */ - public var rx_delegate:DelegateProxy { - return proxyForObject(RxTextStorageDelegateProxy.self, self) + /// Reactive wrapper for `delegate`. + /// + /// For more information take a look at `DelegateProxyType` protocol documentation. + public var delegate:DelegateProxy { + return RxTextStorageDelegateProxy.proxyForObject(base) } - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didProcessEditingRangeChangeInLength: Observable<(editedMask:NSTextStorageEditActions, editedRange:NSRange, delta:Int)> { - return rx_delegate - .observe(#selector(NSTextStorageDelegate.textStorage(_:didProcessEditing:range:changeInLength:))) + /// Reactive wrapper for `delegate` message. + public var didProcessEditingRangeChangeInLength: Observable<(editedMask:NSTextStorageEditActions, editedRange:NSRange, delta:Int)> { + return delegate + .methodInvoked(#selector(NSTextStorageDelegate.textStorage(_:didProcessEditing:range:changeInLength:))) .map { a in let editedMask = NSTextStorageEditActions(rawValue: try castOrThrow(UInt.self, a[1]) ) let editedRange = try castOrThrow(NSValue.self, a[2]).rangeValue diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift index 8ff42f6..59312d2 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift @@ -14,23 +14,17 @@ import UIKit import RxSwift #endif -/** -Marks data source as `UICollectionView` reactive data source enabling it to be used with one of the `bindTo` methods. -*/ +/// Marks data source as `UICollectionView` reactive data source enabling it to be used with one of the `bindTo` methods. public protocol RxCollectionViewDataSourceType /*: UICollectionViewDataSource*/ { - /** - Type of elements that can be bound to collection view. - */ + /// Type of elements that can be bound to collection view. associatedtype Element - /** - New observable sequence event observed. - - - parameter collectionView: Bound collection view. - - parameter observedEvent: Event - */ - func collectionView(collectionView: UICollectionView, observedEvent: Event) -> Void + /// New observable sequence event observed. + /// + /// - parameter collectionView: Bound collection view. + /// - parameter observedEvent: Event + func collectionView(_ collectionView: UICollectionView, observedEvent: Event) -> Void } #endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift index e68d896..8f1e5a8 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift @@ -14,23 +14,17 @@ import UIKit import RxSwift #endif -/** -Marks data source as `UITableView` reactive data source enabling it to be used with one of the `bindTo` methods. -*/ +/// Marks data source as `UITableView` reactive data source enabling it to be used with one of the `bindTo` methods. public protocol RxTableViewDataSourceType /*: UITableViewDataSource*/ { - /** - Type of elements that can be bound to table view. - */ + /// Type of elements that can be bound to table view. associatedtype Element - /** - New observable sequence event observed. - - - parameter tableView: Bound table view. - - parameter observedEvent: Event - */ - func tableView(tableView: UITableView, observedEvent: Event) -> Void + /// New observable sequence event observed. + /// + /// - parameter tableView: Bound table view. + /// - parameter observedEvent: Event + func tableView(_ tableView: UITableView, observedEvent: Event) -> Void } #endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift index eaa3f2b..c17c061 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift @@ -19,99 +19,90 @@ let collectionViewDataSourceNotSet = CollectionViewDataSourceNotSet() class CollectionViewDataSourceNotSet : NSObject , UICollectionViewDataSource { - func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - rxAbstractMethodWithMessage(dataSourceNotSet) + + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return 0 } // The cell that is returned must be retrieved from a call to -dequeueReusableCellWithReuseIdentifier:forIndexPath: - func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { rxAbstractMethodWithMessage(dataSourceNotSet) } } -/** - For more information take a look at `DelegateProxyType`. - */ +/// For more information take a look at `DelegateProxyType`. public class RxCollectionViewDataSourceProxy : DelegateProxy , UICollectionViewDataSource , DelegateProxyType { - /** - Typed parent object. - */ + /// Typed parent object. public weak private(set) var collectionView: UICollectionView? - - private weak var _requiredMethodsDataSource: UICollectionViewDataSource? = collectionViewDataSourceNotSet - /** - Initializes `RxCollectionViewDataSourceProxy` + private weak var _requiredMethodsDataSource: UICollectionViewDataSource? = collectionViewDataSourceNotSet - - parameter parentObject: Parent object for delegate proxy. - */ + /// Initializes `RxCollectionViewDataSourceProxy` + /// + /// - parameter parentObject: Parent object for delegate proxy. public required init(parentObject: AnyObject) { - self.collectionView = (parentObject as! UICollectionView) + self.collectionView = castOrFatalError(parentObject) super.init(parentObject: parentObject) } // MARK: delegate - /** - Required delegate method implementation. - */ - public func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return (_requiredMethodsDataSource ?? collectionViewDataSourceNotSet).collectionView(collectionView, numberOfItemsInSection: section) ?? 0 + /// Required delegate method implementation. + public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return (_requiredMethodsDataSource ?? collectionViewDataSourceNotSet).collectionView(collectionView, numberOfItemsInSection: section) } - /** - Required delegate method implementation. - */ - public func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - return (_requiredMethodsDataSource ?? collectionViewDataSourceNotSet).collectionView(collectionView, cellForItemAtIndexPath: indexPath) + /// Required delegate method implementation. + public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + return (_requiredMethodsDataSource ?? collectionViewDataSourceNotSet).collectionView(collectionView, cellForItemAt: indexPath) } // MARK: proxy - /** - For more information take a look at `DelegateProxyType`. - */ - public override class func createProxyForObject(object: AnyObject) -> AnyObject { - let collectionView = (object as! UICollectionView) - - return castOrFatalError(collectionView.rx_createDataSourceProxy()) + /// For more information take a look at `DelegateProxyType`. + public override class func createProxyForObject(_ object: AnyObject) -> AnyObject { + let collectionView: UICollectionView = castOrFatalError(object) + return collectionView.createRxDataSourceProxy() } - /** - For more information take a look at `DelegateProxyType`. - */ - public override class func delegateAssociatedObjectTag() -> UnsafePointer { + /// For more information take a look at `DelegateProxyType`. + public override class func delegateAssociatedObjectTag() -> UnsafeRawPointer { return _pointer(&dataSourceAssociatedTag) } - /** - For more information take a look at `DelegateProxyType`. - */ - public class func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) { + /// For more information take a look at `DelegateProxyType`. + public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { let collectionView: UICollectionView = castOrFatalError(object) collectionView.dataSource = castOptionalOrFatalError(delegate) } - /** - For more information take a look at `DelegateProxyType`. - */ - public class func currentDelegateFor(object: AnyObject) -> AnyObject? { + /// For more information take a look at `DelegateProxyType`. + public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { let collectionView: UICollectionView = castOrFatalError(object) return collectionView.dataSource } - /** - For more information take a look at `DelegateProxyType`. - */ - public override func setForwardToDelegate(forwardToDelegate: AnyObject?, retainDelegate: Bool) { + /// For more information take a look at `DelegateProxyType`. + public override func setForwardToDelegate(_ forwardToDelegate: AnyObject?, retainDelegate: Bool) { let requiredMethodsDataSource: UICollectionViewDataSource? = castOptionalOrFatalError(forwardToDelegate) _requiredMethodsDataSource = requiredMethodsDataSource ?? collectionViewDataSourceNotSet super.setForwardToDelegate(forwardToDelegate, retainDelegate: retainDelegate) + self.refreshCollectionViewDataSource() + } + + private func refreshCollectionViewDataSource() { + if self.collectionView?.dataSource === self { + self.collectionView?.dataSource = nil + if _requiredMethodsDataSource != nil && _requiredMethodsDataSource !== collectionViewDataSourceNotSet { + self.collectionView?.dataSource = self + } + } } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift index b2c5933..4aa18d1 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift @@ -14,26 +14,20 @@ import UIKit import RxSwift #endif -/** - For more information take a look at `DelegateProxyType`. - */ +/// For more information take a look at `DelegateProxyType`. public class RxCollectionViewDelegateProxy : RxScrollViewDelegateProxy , UICollectionViewDelegate , UICollectionViewDelegateFlowLayout { - /** - Typed parent object. - */ + /// Typed parent object. public weak private(set) var collectionView: UICollectionView? - /** - Initializes `RxCollectionViewDelegateProxy` - - - parameter parentObject: Parent object for delegate proxy. - */ + /// Initializes `RxCollectionViewDelegateProxy` + /// + /// - parameter parentObject: Parent object for delegate proxy. public required init(parentObject: AnyObject) { - self.collectionView = (parentObject as! UICollectionView) + self.collectionView = castOrFatalError(parentObject) super.init(parentObject: parentObject) } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxImagePickerDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxImagePickerDelegateProxy.swift deleted file mode 100644 index 21397b9..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxImagePickerDelegateProxy.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// RxImagePickerDelegateProxy.swift -// Rx -// -// Created by Segii Shulga on 1/4/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -#if os(iOS) - - import Foundation -#if !RX_NO_MODULE - import RxSwift -#endif - import UIKit - -public class RxImagePickerDelegateProxy - : DelegateProxy - , DelegateProxyType - , UIImagePickerControllerDelegate - , UINavigationControllerDelegate { - - /** - For more information take a look at `DelegateProxyType`. - */ - public class func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) { - let imagePickerController: UIImagePickerController = castOrFatalError(object) - imagePickerController.delegate = castOptionalOrFatalError(delegate) - } - - /** - For more information take a look at `DelegateProxyType`. - */ - public class func currentDelegateFor(object: AnyObject) -> AnyObject? { - let imagePickerController: UIImagePickerController = castOrFatalError(object) - return imagePickerController.delegate - } - -} - -#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDelegateProxy.swift new file mode 100644 index 0000000..0ac5161 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDelegateProxy.swift @@ -0,0 +1,34 @@ +// +// RxPickerViewDelegateProxy.swift +// RxCocoa +// +// Created by Segii Shulga on 5/12/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) + + import Foundation +#if !RX_NO_MODULE + import RxSwift +#endif +import UIKit + +public class RxPickerViewDelegateProxy + : DelegateProxy + , DelegateProxyType + , UIPickerViewDelegate { + + /// For more information take a look at `DelegateProxyType`. + public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { + let pickerView: UIPickerView = castOrFatalError(object) + pickerView.delegate = castOptionalOrFatalError(delegate) + } + + /// For more information take a look at `DelegateProxyType`. + public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { + let pickerView: UIPickerView = castOrFatalError(object) + return pickerView.delegate + } +} +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift index 7dc4b51..e33baa5 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift @@ -14,86 +14,90 @@ import RxSwift #endif import UIKit -/** - For more information take a look at `DelegateProxyType`. -*/ +/// For more information take a look at `DelegateProxyType`. public class RxScrollViewDelegateProxy : DelegateProxy , UIScrollViewDelegate , DelegateProxyType { - private var _contentOffsetSubject: ReplaySubject? - - /** - Typed parent object. - */ - public weak private(set) var scrollView: UIScrollView? - - /** - Optimized version used for observing content offset changes. - */ - internal var contentOffsetSubject: Observable { - if _contentOffsetSubject == nil { - let replaySubject = ReplaySubject.create(bufferSize: 1) - _contentOffsetSubject = replaySubject - replaySubject.on(.Next(self.scrollView?.contentOffset ?? CGPointZero)) + fileprivate var _contentOffsetBehaviorSubject: BehaviorSubject? + fileprivate var _contentOffsetPublishSubject: PublishSubject<()>? + + /// Typed parent object. + public weak fileprivate(set) var scrollView: UIScrollView? + + /// Optimized version used for observing content offset changes. + internal var contentOffsetBehaviorSubject: BehaviorSubject { + if let subject = _contentOffsetBehaviorSubject { + return subject } - - return _contentOffsetSubject! + + let subject = BehaviorSubject(value: self.scrollView?.contentOffset ?? CGPoint.zero) + _contentOffsetBehaviorSubject = subject + + return subject } - /** - Initializes `RxScrollViewDelegateProxy` + /// Optimized version used for observing content offset changes. + internal var contentOffsetPublishSubject: PublishSubject<()> { + if let subject = _contentOffsetPublishSubject { + return subject + } + + let subject = PublishSubject<()>() + _contentOffsetPublishSubject = subject - - parameter parentObject: Parent object for delegate proxy. - */ + return subject + } + + /// Initializes `RxScrollViewDelegateProxy` + /// + /// - parameter parentObject: Parent object for delegate proxy. public required init(parentObject: AnyObject) { - self.scrollView = (parentObject as! UIScrollView) + self.scrollView = castOrFatalError(parentObject) super.init(parentObject: parentObject) } // MARK: delegate methods - /** - For more information take a look at `DelegateProxyType`. - */ - public func scrollViewDidScroll(scrollView: UIScrollView) { - if let contentOffset = _contentOffsetSubject { - contentOffset.on(.Next(scrollView.contentOffset)) + /// For more information take a look at `DelegateProxyType`. + public func scrollViewDidScroll(_ scrollView: UIScrollView) { + if let subject = _contentOffsetBehaviorSubject { + subject.on(.next(scrollView.contentOffset)) + } + if let subject = _contentOffsetPublishSubject { + subject.on(.next()) } self._forwardToDelegate?.scrollViewDidScroll?(scrollView) } // MARK: delegate proxy - /** - For more information take a look at `DelegateProxyType`. - */ - public override class func createProxyForObject(object: AnyObject) -> AnyObject { - let scrollView = (object as! UIScrollView) - - return castOrFatalError(scrollView.rx_createDelegateProxy()) + /// For more information take a look at `DelegateProxyType`. + public override class func createProxyForObject(_ object: AnyObject) -> AnyObject { + let scrollView: UIScrollView = castOrFatalError(object) + return scrollView.createRxDelegateProxy() } - /** - For more information take a look at `DelegateProxyType`. - */ - public class func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) { + /// For more information take a look at `DelegateProxyType`. + public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { let scrollView: UIScrollView = castOrFatalError(object) scrollView.delegate = castOptionalOrFatalError(delegate) } - /** - For more information take a look at `DelegateProxyType`. - */ - public class func currentDelegateFor(object: AnyObject) -> AnyObject? { + /// For more information take a look at `DelegateProxyType`. + public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { let scrollView: UIScrollView = castOrFatalError(object) return scrollView.delegate } deinit { - if let contentOffset = _contentOffsetSubject { - contentOffset.on(.Completed) + if let subject = _contentOffsetBehaviorSubject { + subject.on(.completed) + } + + if let subject = _contentOffsetPublishSubject { + subject.on(.completed) } } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift index 749c1ea..d76f5ba 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift @@ -14,26 +14,20 @@ import UIKit import RxSwift #endif -/** - For more information take a look at `DelegateProxyType`. - */ +/// For more information take a look at `DelegateProxyType`. public class RxSearchBarDelegateProxy : DelegateProxy , UISearchBarDelegate , DelegateProxyType { - /** - For more information take a look at `DelegateProxyType`. - */ - public class func currentDelegateFor(object: AnyObject) -> AnyObject? { + /// For more information take a look at `DelegateProxyType`. + public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { let searchBar: UISearchBar = castOrFatalError(object) return searchBar.delegate } - /** - For more information take a look at `DelegateProxyType`. - */ - public class func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) { + /// For more information take a look at `DelegateProxyType`. + public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { let searchBar: UISearchBar = castOrFatalError(object) searchBar.delegate = castOptionalOrFatalError(delegate) } @@ -41,13 +35,10 @@ public class RxSearchBarDelegateProxy // MARK: Delegate proxy methods #if os(iOS) - /** - For more information take a look at `DelegateProxyType`. - */ - public override class func createProxyForObject(object: AnyObject) -> AnyObject { - let searchBar = (object as! UISearchBar) - - return castOrFatalError(searchBar.rx_createDelegateProxy()) + /// For more information take a look at `DelegateProxyType`. + public override class func createProxyForObject(_ object: AnyObject) -> AnyObject { + let searchBar: UISearchBar = castOrFatalError(object) + return searchBar.createRxDelegateProxy() } #endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchControllerDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchControllerDelegateProxy.swift index 05b11bc..3a2242d 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchControllerDelegateProxy.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchControllerDelegateProxy.swift @@ -1,6 +1,6 @@ // // RxSearchControllerDelegateProxy.swift -// Rx +// RxCocoa // // Created by Segii Shulga on 3/17/16. // Copyright © 2016 Krunoslav Zaher. All rights reserved. @@ -14,26 +14,21 @@ #endif import UIKit -/** - For more information take a look at `DelegateProxyType`. - */ +/// For more information take a look at `DelegateProxyType`. +@available(iOS 8.0, *) public class RxSearchControllerDelegateProxy : DelegateProxy , DelegateProxyType , UISearchControllerDelegate { - /** - For more information take a look at `DelegateProxyType`. - */ - public class func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) { + /// For more information take a look at `DelegateProxyType`. + public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { let searchController: UISearchController = castOrFatalError(object) searchController.delegate = castOptionalOrFatalError(delegate) } - /** - For more information take a look at `DelegateProxyType`. - */ - public class func currentDelegateFor(object: AnyObject) -> AnyObject? { + /// For more information take a look at `DelegateProxyType`. + public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { let searchController: UISearchController = castOrFatalError(object) return searchController.delegate } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarControllerDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarControllerDelegateProxy.swift new file mode 100644 index 0000000..c93830f --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarControllerDelegateProxy.swift @@ -0,0 +1,42 @@ +// +// RxTabBarControllerDelegateProxy.swift +// RxCocoa +// +// Created by Yusuke Kita on 2016/12/07. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) || os(tvOS) +import Foundation +import UIKit + +#if !RX_NO_MODULE +import RxSwift +#endif + +/// For more information take a look at `DelegateProxyType`. +public class RxTabBarControllerDelegateProxy + : DelegateProxy + , UITabBarControllerDelegate + , DelegateProxyType { + + /// For more information take a look at `DelegateProxyType`. + public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { + let tabBarController: UITabBarController = castOrFatalError(object) + return tabBarController.delegate + } + + /// For more information take a look at `DelegateProxyType`. + public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { + let tabBarController: UITabBarController = castOrFatalError(object) + tabBarController.delegate = castOptionalOrFatalError(delegate) + } + + /// For more information take a look at `DelegateProxyType`. + public override class func createProxyForObject(_ object: AnyObject) -> AnyObject { + let tabBarController: UITabBarController = castOrFatalError(object) + return tabBarController.createRxDelegateProxy() + } +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarDelegateProxy.swift new file mode 100644 index 0000000..93ae8ec --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarDelegateProxy.swift @@ -0,0 +1,43 @@ +// +// RxTabBarDelegateProxy.swift +// RxCocoa +// +// Created by Jesse Farless on 5/14/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) || os(tvOS) +import Foundation +import UIKit + +#if !RX_NO_MODULE +import RxSwift +#endif + +/// For more information take a look at `DelegateProxyType`. +public class RxTabBarDelegateProxy + : DelegateProxy + , UITabBarDelegate + , DelegateProxyType { + + /// For more information take a look at `DelegateProxyType`. + public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { + let tabBar: UITabBar = castOrFatalError(object) + return tabBar.delegate + } + + /// For more information take a look at `DelegateProxyType`. + public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { + let tabBar: UITabBar = castOrFatalError(object) + tabBar.delegate = castOptionalOrFatalError(delegate) + } + + /// For more information take a look at `DelegateProxyType`. + public override class func createProxyForObject(_ object: AnyObject) -> AnyObject { + let tabBar: UITabBar = castOrFatalError(object) + return tabBar.createRxDelegateProxy() + } + +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift index 30d4011..d2c44f9 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift @@ -19,108 +19,181 @@ let tableViewDataSourceNotSet = TableViewDataSourceNotSet() class TableViewDataSourceNotSet : NSObject , UITableViewDataSource { - func numberOfSectionsInTableView(tableView: UITableView) -> Int { - rxAbstractMethodWithMessage(dataSourceNotSet) - } - - func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - rxAbstractMethodWithMessage(dataSourceNotSet) + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 0 } - func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { rxAbstractMethodWithMessage(dataSourceNotSet) } } -/** - For more information take a look at `DelegateProxyType`. - */ +/// For more information take a look at `DelegateProxyType`. public class RxTableViewDataSourceProxy : DelegateProxy , UITableViewDataSource , DelegateProxyType { - /** - Typed parent object. - */ - public weak private(set) var tableView: UITableView? + /// Typed parent object. + public weak fileprivate(set) var tableView: UITableView? + + // issue https://github.com/ReactiveX/RxSwift/issues/907 + private var _numberOfObservers = 0 + private var _commitForRowAtSequenceSentMessage: CachedCommitForRowAt? = nil + private var _commitForRowAtSequenceMethodInvoked: CachedCommitForRowAt? = nil + + fileprivate class Counter { + var hasObservers: Bool = false + } - private weak var _requiredMethodsDataSource: UITableViewDataSource? = tableViewDataSourceNotSet + fileprivate class CachedCommitForRowAt { + let sequence: Observable<[Any]> + let counter: Counter + + var hasObservers: Bool { + return counter.hasObservers + } + + init(sequence: Observable<[Any]>, counter: Counter) { + self.sequence = sequence + self.counter = counter + } + + static func createFor(commitForRowAt: Observable<[Any]>, proxy: RxTableViewDataSourceProxy) -> CachedCommitForRowAt { + let counter = Counter() + + let commitForRowAtSequence = commitForRowAt.do(onSubscribe: { [weak proxy] in + counter.hasObservers = true + proxy?.refreshTableViewDataSource() + }, onDispose: { [weak proxy] in + counter.hasObservers = false + proxy?.refreshTableViewDataSource() + }) + .subscribeOn(MainScheduler()) + .share() + + return CachedCommitForRowAt(sequence: commitForRowAtSequence, counter: counter) + } + } - /** - Initializes `RxTableViewDataSourceProxy` + fileprivate weak var _requiredMethodsDataSource: UITableViewDataSource? = tableViewDataSourceNotSet - - parameter parentObject: Parent object for delegate proxy. - */ + /// Initializes `RxTableViewDataSourceProxy` + /// + /// - parameter parentObject: Parent object for delegate proxy. public required init(parentObject: AnyObject) { - self.tableView = (parentObject as! UITableView) + self.tableView = castOrFatalError(parentObject) super.init(parentObject: parentObject) } // MARK: delegate - /** - Required delegate method implementation. - */ - public func numberOfSectionsInTableView(tableView: UITableView) -> Int { - return (_requiredMethodsDataSource ?? tableViewDataSourceNotSet).numberOfSectionsInTableView?(tableView) ?? 1 - } - - /** - Required delegate method implementation. - */ - public func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + /// Required delegate method implementation. + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return (_requiredMethodsDataSource ?? tableViewDataSourceNotSet).tableView(tableView, numberOfRowsInSection: section) } - /** - Required delegate method implementation. - */ - public func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - return (_requiredMethodsDataSource ?? tableViewDataSourceNotSet).tableView(tableView, cellForRowAtIndexPath: indexPath) + /// Required delegate method implementation. + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return (_requiredMethodsDataSource ?? tableViewDataSourceNotSet).tableView(tableView, cellForRowAt: indexPath) } // MARK: proxy - /** - For more information take a look at `DelegateProxyType`. - */ - public override class func createProxyForObject(object: AnyObject) -> AnyObject { - let tableView = (object as! UITableView) - - return castOrFatalError(tableView.rx_createDataSourceProxy()) + /// For more information take a look at `DelegateProxyType`. + public override class func createProxyForObject(_ object: AnyObject) -> AnyObject { + let tableView: UITableView = castOrFatalError(object) + return tableView.createRxDataSourceProxy() } - /** - For more information take a look at `DelegateProxyType`. - */ - public override class func delegateAssociatedObjectTag() -> UnsafePointer { + /// For more information take a look at `DelegateProxyType`. + public override class func delegateAssociatedObjectTag() -> UnsafeRawPointer { return _pointer(&dataSourceAssociatedTag) } - /** - For more information take a look at `DelegateProxyType`. - */ - public class func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) { + /// For more information take a look at `DelegateProxyType`. + public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { let tableView: UITableView = castOrFatalError(object) tableView.dataSource = castOptionalOrFatalError(delegate) } - /** - For more information take a look at `DelegateProxyType`. - */ - public class func currentDelegateFor(object: AnyObject) -> AnyObject? { + /// For more information take a look at `DelegateProxyType`. + public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { let tableView: UITableView = castOrFatalError(object) return tableView.dataSource } - /** - For more information take a look at `DelegateProxyType`. - */ - public override func setForwardToDelegate(forwardToDelegate: AnyObject?, retainDelegate: Bool) { + /// For more information take a look at `DelegateProxyType`. + public override func setForwardToDelegate(_ forwardToDelegate: AnyObject?, retainDelegate: Bool) { let requiredMethodsDataSource: UITableViewDataSource? = castOptionalOrFatalError(forwardToDelegate) _requiredMethodsDataSource = requiredMethodsDataSource ?? tableViewDataSourceNotSet super.setForwardToDelegate(forwardToDelegate, retainDelegate: retainDelegate) + refreshTableViewDataSource() + } + + override open func methodInvoked(_ selector: Selector) -> Observable<[Any]> { + MainScheduler.ensureExecutingOnScheduler() + + // This is special behavior for commit:forRowAt: + // If proxy data source responds to this selector then table view will show + // swipe to delete option even when nobody is observing. + // https://github.com/ReactiveX/RxSwift/issues/907 + if selector == #selector(UITableViewDataSource.tableView(_:commit:forRowAt:)) { + guard let commitForRowAtSequenceMethodInvoked = _commitForRowAtSequenceMethodInvoked else { + let commitForRowAtSequenceMethodInvoked = CachedCommitForRowAt.createFor(commitForRowAt: super.methodInvoked(selector), proxy: self) + _commitForRowAtSequenceMethodInvoked = commitForRowAtSequenceMethodInvoked + return commitForRowAtSequenceMethodInvoked.sequence + } + + return commitForRowAtSequenceMethodInvoked.sequence + } + + return super.methodInvoked(selector) + } + + override open func sentMessage(_ selector: Selector) -> Observable<[Any]> { + MainScheduler.ensureExecutingOnScheduler() + + // This is special behavior for commit:forRowAt: + // If proxy data source responds to this selector then table view will show + // swipe to delete option even when nobody is observing. + // https://github.com/ReactiveX/RxSwift/issues/907 + if selector == #selector(UITableViewDataSource.tableView(_:commit:forRowAt:)) { + guard let commitForRowAtSequenceSentMessage = _commitForRowAtSequenceSentMessage else { + let commitForRowAtSequenceSentMessage = CachedCommitForRowAt.createFor(commitForRowAt: super.sentMessage(selector), proxy: self) + _commitForRowAtSequenceSentMessage = commitForRowAtSequenceSentMessage + return commitForRowAtSequenceSentMessage.sequence + } + + return commitForRowAtSequenceSentMessage.sequence + } + + return super.sentMessage(selector) + } + + // https://github.com/ReactiveX/RxSwift/issues/907 + private func refreshTableViewDataSource() { + if self.tableView?.dataSource === self { + self.tableView?.dataSource = nil + if _requiredMethodsDataSource != nil && _requiredMethodsDataSource !== tableViewDataSourceNotSet { + self.tableView?.dataSource = self + } + } + } + + override open func responds(to aSelector: Selector!) -> Bool { + // https://github.com/ReactiveX/RxSwift/issues/907 + let commitForRowAtSelector = #selector(UITableViewDataSource.tableView(_:commit:forRowAt:)) + if aSelector == commitForRowAtSelector { + // without `as? UITableViewDataSource` `responds(to:)` fails, 🍻 compiler team + let forwardDelegateResponds = (self.forwardToDelegate() as? UITableViewDataSource)?.responds(to: commitForRowAtSelector) + return (_commitForRowAtSequenceSentMessage?.hasObservers ?? false) + || (_commitForRowAtSequenceMethodInvoked?.hasObservers ?? false) + || (forwardDelegateResponds ?? false) + } + + return super.responds(to: aSelector) } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift index 243f585..a20d8c5 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift @@ -14,28 +14,23 @@ import UIKit import RxSwift #endif -/** - For more information take a look at `DelegateProxyType`. -*/ +/// For more information take a look at `DelegateProxyType`. public class RxTableViewDelegateProxy : RxScrollViewDelegateProxy , UITableViewDelegate { - /** - Typed parent object. - */ + /// Typed parent object. public weak private(set) var tableView: UITableView? - /** - Initializes `RxTableViewDelegateProxy` - - - parameter parentObject: Parent object for delegate proxy. - */ + /// Initializes `RxTableViewDelegateProxy` + /// + /// - parameter parentObject: Parent object for delegate proxy. public required init(parentObject: AnyObject) { - self.tableView = (parentObject as! UITableView) + self.tableView = castOrFatalError(parentObject) super.init(parentObject: parentObject) } + } #endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift index 074b2d9..dd9f46c 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift @@ -1,6 +1,6 @@ // // RxTextStorageDelegateProxy.swift -// Rx +// RxCocoa // // Created by Segii Shulga on 12/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -20,18 +20,14 @@ public class RxTextStorageDelegateProxy , NSTextStorageDelegate { - /** - For more information take a look at `DelegateProxyType`. - */ - public class func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) { + /// For more information take a look at `DelegateProxyType`. + public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { let textStorage: NSTextStorage = castOrFatalError(object) textStorage.delegate = castOptionalOrFatalError(delegate) } - /** - For more information take a look at `DelegateProxyType`. - */ - public class func currentDelegateFor(object: AnyObject) -> AnyObject? { + /// For more information take a look at `DelegateProxyType`. + public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { let textStorage: NSTextStorage = castOrFatalError(object) return textStorage.delegate } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextViewDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextViewDelegateProxy.swift index 6b0a5bc..2239a31 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextViewDelegateProxy.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextViewDelegateProxy.swift @@ -14,41 +14,33 @@ import UIKit import RxSwift #endif -/** - For more information take a look at `DelegateProxyType`. -*/ +/// For more information take a look at `DelegateProxyType`. public class RxTextViewDelegateProxy : RxScrollViewDelegateProxy , UITextViewDelegate { - /** - Typed parent object. - */ + /// Typed parent object. public weak private(set) var textView: UITextView? - /** - Initializes `RxTextViewDelegateProxy` - - - parameter parentObject: Parent object for delegate proxy. - */ + /// Initializes `RxTextViewDelegateProxy` + /// + /// - parameter parentObject: Parent object for delegate proxy. public required init(parentObject: AnyObject) { - self.textView = (parentObject as! UITextView) + self.textView = castOrFatalError(parentObject) super.init(parentObject: parentObject) } // MARK: delegate methods - /** - For more information take a look at `DelegateProxyType`. - */ - @objc public func textView(textView: UITextView, shouldChangeTextInRange range: NSRange, replacementText text: String) -> Bool { + /// For more information take a look at `DelegateProxyType`. + @objc public func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { /** We've had some issues with observing text changes. This is here just in case we need the same hack in future and that we wouldn't need to change the public interface. */ let forwardToDelegate = self.forwardToDelegate() as? UITextViewDelegate return forwardToDelegate?.textView?(textView, - shouldChangeTextInRange: range, + shouldChangeTextIn: range, replacementText: text) ?? true } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxWebViewDelegateProxy.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxWebViewDelegateProxy.swift new file mode 100644 index 0000000..fa2b7b4 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxWebViewDelegateProxy.swift @@ -0,0 +1,40 @@ +// +// RxWebViewDelegateProxy.swift +// RxCocoa +// +// Created by Andrew Breckenridge on 9/26/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) +import UIKit + +#if !RX_NO_MODULE +import RxSwift +#endif + +public class RxWebViewDelegateProxy + : DelegateProxy + , DelegateProxyType + , UIWebViewDelegate { + + /** + For more information take a look at `DelegateProxyType`. + */ + public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) { + let webView: UIWebView = castOrFatalError(object) + webView.delegate = castOptionalOrFatalError(delegate) + } + + /** + For more information take a look at `DelegateProxyType`. + */ + public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? { + let webView: UIWebView = castOrFatalError(object) + return webView.delegate + } + + +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIActivityIndicatorView+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIActivityIndicatorView+Rx.swift index f1a7696..03f0168 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIActivityIndicatorView+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIActivityIndicatorView+Rx.swift @@ -1,6 +1,6 @@ // // UIActivityIndicatorView+Rx.swift -// Rx +// RxCocoa // // Created by Ivan Persidskiy on 02/12/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -13,19 +13,17 @@ import UIKit import RxSwift #endif -extension UIActivityIndicatorView { +extension Reactive where Base: UIActivityIndicatorView { - /** - Bindable sink for `startAnimating()`, `stopAnimating()` methods. - */ - public var rx_animating: AnyObserver { - return UIBindingObserver(UIElement: self) { activityIndicator, active in + /// Bindable sink for `startAnimating()`, `stopAnimating()` methods. + public var isAnimating: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { activityIndicator, active in if active { - self.startAnimating() + activityIndicator.startAnimating() } else { - self.stopAnimating() + activityIndicator.stopAnimating() } - }.asObserver() + } } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIAlertAction+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIAlertAction+Rx.swift new file mode 100644 index 0000000..1fba38f --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIAlertAction+Rx.swift @@ -0,0 +1,29 @@ +// +// UIAlertAction+Rx.swift +// RxCocoa +// +// Created by Andrew Breckenridge on 5/7/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) || os(tvOS) + +import Foundation +import UIKit + +#if !RX_NO_MODULE +import RxSwift +#endif + +extension Reactive where Base: UIAlertAction { + + /// Bindable sink for `enabled` property. + public var isEnabled: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { alertAction, value in + alertAction.isEnabled = value + } + } + +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIApplication+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIApplication+Rx.swift index 1bf270d..6ac12a4 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIApplication+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIApplication+Rx.swift @@ -1,6 +1,6 @@ // // UIApplication+Rx.swift -// RxExample +// RxCocoa // // Created by Mads Bøgeskov on 18/01/16. // Copyright © 2016 Krunoslav Zaher. All rights reserved. @@ -15,15 +15,13 @@ import Foundation import RxSwift #endif - extension UIApplication { + extension Reactive where Base: UIApplication { - /** - Bindable sink for `networkActivityIndicatorVisible`. - */ - public var rx_networkActivityIndicatorVisible: AnyObserver { - return UIBindingObserver(UIElement: self) { application, active in - application.networkActivityIndicatorVisible = active - }.asObserver() + /// Bindable sink for `networkActivityIndicatorVisible`. + public var isNetworkActivityIndicatorVisible: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { application, active in + application.isNetworkActivityIndicatorVisible = active + } } } #endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIBarButtonItem+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIBarButtonItem+Rx.swift index 7391d42..c10c3cf 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIBarButtonItem+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIBarButtonItem+Rx.swift @@ -13,35 +13,40 @@ import UIKit import RxSwift #endif -var rx_tap_key: UInt8 = 0 +fileprivate var rx_tap_key: UInt8 = 0 -extension UIBarButtonItem { +extension Reactive where Base: UIBarButtonItem { + + /// Bindable sink for `enabled` property. + public var isEnabled: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { UIElement, value in + UIElement.isEnabled = value + } + } /** - Bindable sink for `enabled` property. + Bindable sink for `title` property. */ - public var rx_enabled: AnyObserver { - return UIBindingObserver(UIElement: self) { UIElement, value in - UIElement.enabled = value - }.asObserver() + public var title: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { UIElement, value in + UIElement.title = value + } } - /** - Reactive wrapper for target action pattern on `self`. - */ - public var rx_tap: ControlEvent { - let source = rx_lazyInstanceObservable(&rx_tap_key) { () -> Observable in - Observable.create { [weak self] observer in - guard let control = self else { - observer.on(.Completed) - return NopDisposable.instance + /// Reactive wrapper for target action pattern on `self`. + public var tap: ControlEvent { + let source = lazyInstanceObservable(&rx_tap_key) { () -> Observable in + Observable.create { [weak control = self.base] observer in + guard let control = control else { + observer.on(.completed) + return Disposables.create() } let target = BarButtonItemTarget(barButtonItem: control) { - observer.on(.Next()) + observer.on(.next()) } return target } - .takeUntil(self.rx_deallocated) + .takeUntil(self.deallocated) .share() } @@ -57,7 +62,7 @@ class BarButtonItemTarget: RxTarget { weak var barButtonItem: UIBarButtonItem? var callback: Callback! - init(barButtonItem: UIBarButtonItem, callback: () -> Void) { + init(barButtonItem: UIBarButtonItem, callback: @escaping () -> Void) { self.barButtonItem = barButtonItem self.callback = callback super.init() @@ -77,7 +82,7 @@ class BarButtonItemTarget: RxTarget { callback = nil } - func action(sender: AnyObject) { + func action(_ sender: AnyObject) { callback() } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIButton+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIButton+Rx.swift index 7b7f8c1..76e3166 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIButton+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIButton+Rx.swift @@ -14,15 +14,14 @@ import RxSwift #endif import UIKit -extension UIButton { +extension Reactive where Base: UIButton { /** Reactive wrapper for `TouchUpInside` control event. */ - public var rx_tap: ControlEvent { - return rx_controlEvent(.TouchUpInside) + public var tap: ControlEvent { + return controlEvent(.touchUpInside) } - } #endif @@ -35,14 +34,33 @@ import Foundation #endif import UIKit -extension UIButton { +extension Reactive where Base: UIButton { - /** - Reactive wrapper for `PrimaryActionTriggered` control event. - */ - public var rx_primaryAction: ControlEvent { - return rx_controlEvent(.PrimaryActionTriggered) + /// Reactive wrapper for `PrimaryActionTriggered` control event. + public var primaryAction: ControlEvent { + return controlEvent(.primaryActionTriggered) } + } #endif + +#if os(iOS) || os(tvOS) + + import Foundation +#if !RX_NO_MODULE + import RxSwift +#endif + import UIKit + +extension Reactive where Base: UIButton { + + /// Reactive wrapper for `setTitle(_:controlState:)` + public func title(for controlState: UIControlState = []) -> UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { (button, title) -> () in + button.setTitle(title, for: controlState) + } + } + +} +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift index 1f52db3..55980e5 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UICollectionView+Rx.swift @@ -16,22 +16,39 @@ import UIKit // Items -extension UICollectionView { - +extension Reactive where Base: UICollectionView { + /** Binds sequences of elements to collection view items. - parameter source: Observable sequence of items. - parameter cellFactory: Transform between sequence elements and view cells. - returns: Disposable object that can be used to unbind. + + Example + + let items = Observable.just([ + 1, + 2, + 3 + ]) + + items + .bindTo(collectionView.rx.items) { (collectionView, row, element) in + let indexPath = IndexPath(row: row, section: 0) + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath) as! NumberCell + cell.value?.text = "\(element) @ \(row)" + return cell + } + .addDisposableTo(disposeBag) */ - public func rx_itemsWithCellFactory - (source: O) - -> (cellFactory: (UICollectionView, Int, S.Generator.Element) -> UICollectionViewCell) - -> Disposable { + public func items + (_ source: O) + -> (_ cellFactory: @escaping (UICollectionView, Int, S.Iterator.Element) -> UICollectionViewCell) + -> Disposable where O.E == S { return { cellFactory in let dataSource = RxCollectionViewReactiveArrayDataSourceSequenceWrapper(cellFactory: cellFactory) - return self.rx_itemsWithDataSource(dataSource)(source: source) + return self.items(dataSource: dataSource)(source) } } @@ -44,25 +61,40 @@ extension UICollectionView { - parameter configureCell: Transform between sequence elements and view cells. - parameter cellType: Type of table view cell. - returns: Disposable object that can be used to unbind. + + Example + + let items = Observable.just([ + 1, + 2, + 3 + ]) + + items + .bindTo(collectionView.rx.items(cellIdentifier: "Cell", cellType: NumberCell.self)) { (row, element, cell) in + cell.value?.text = "\(element) @ \(row)" + } + .addDisposableTo(disposeBag) */ - public func rx_itemsWithCellIdentifier + public func items (cellIdentifier: String, cellType: Cell.Type = Cell.self) - -> (source: O) - -> (configureCell: (Int, S.Generator.Element, Cell) -> Void) - -> Disposable { + -> (_ source: O) + -> (_ configureCell: @escaping (Int, S.Iterator.Element, Cell) -> Void) + -> Disposable where O.E == S { return { source in return { configureCell in let dataSource = RxCollectionViewReactiveArrayDataSourceSequenceWrapper { (cv, i, item) in - let indexPath = NSIndexPath(forItem: i, inSection: 0) - let cell = cv.dequeueReusableCellWithReuseIdentifier(cellIdentifier, forIndexPath: indexPath) as! Cell + let indexPath = IndexPath(item: i, section: 0) + let cell = cv.dequeueReusableCell(withReuseIdentifier: cellIdentifier, for: indexPath) as! Cell configureCell(i, item, cell) return cell } - return self.rx_itemsWithDataSource(dataSource)(source: source) + return self.items(dataSource: dataSource)(source) } } } + /** Binds sequences of elements to collection view items using a custom reactive data used to perform the transformation. @@ -70,14 +102,57 @@ extension UICollectionView { - parameter dataSource: Data source used to transform elements to view cells. - parameter source: Observable sequence of items. - returns: Disposable object that can be used to unbind. + + Example + + let dataSource = RxCollectionViewSectionedReloadDataSource>() + + let items = Observable.just([ + SectionModel(model: "First section", items: [ + 1.0, + 2.0, + 3.0 + ]), + SectionModel(model: "Second section", items: [ + 1.0, + 2.0, + 3.0 + ]), + SectionModel(model: "Third section", items: [ + 1.0, + 2.0, + 3.0 + ]) + ]) + + dataSource.configureCell = { (dataSource, cv, indexPath, element) in + let cell = cv.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath) as! NumberCell + cell.value?.text = "\(element) @ row \(indexPath.row)" + return cell + } + + items + .bindTo(collectionView.rx.items(dataSource: dataSource)) + .addDisposableTo(disposeBag) */ - public func rx_itemsWithDataSource, S: SequenceType, O: ObservableType where DataSource.Element == S, O.E == S> + public func items< + DataSource: RxCollectionViewDataSourceType & UICollectionViewDataSource, + O: ObservableType> (dataSource: DataSource) - -> (source: O) - -> Disposable { + -> (_ source: O) + -> Disposable where DataSource.Element == O.E + { return { source in - return source.subscribeProxyDataSourceForObject(self, dataSource: dataSource, retainDataSource: false) { [weak self] (_: RxCollectionViewDataSourceProxy, event) -> Void in - guard let collectionView = self else { + // This is called for sideeffects only, and to make sure delegate proxy is in place when + // data source is being bound. + // This is needed because theoretically the data source subscription itself might + // call `self.rx.delegate`. If that happens, it might cause weird side effects since + // setting data source will set delegate, and UICollectionView might get into a weird state. + // Therefore it's better to set delegate proxy first, just to be sure. + _ = self.delegate + // Strong reference is needed because data source is in use until result subscription is disposed + return source.subscribeProxyDataSource(ofObject: self.base, dataSource: dataSource, retainDataSource: true) { [weak collectionView = self.base] (_: RxCollectionViewDataSourceProxy, event) -> Void in + guard let collectionView = collectionView else { return } dataSource.collectionView(collectionView, observedEvent: event) @@ -88,124 +163,110 @@ extension UICollectionView { extension UICollectionView { - /** - Factory method that enables subclasses to implement their own `rx_delegate`. - - - returns: Instance of delegate proxy that wraps `delegate`. - */ - public override func rx_createDelegateProxy() -> RxScrollViewDelegateProxy { + /// Factory method that enables subclasses to implement their own `delegate`. + /// + /// - returns: Instance of delegate proxy that wraps `delegate`. + public override func createRxDelegateProxy() -> RxScrollViewDelegateProxy { return RxCollectionViewDelegateProxy(parentObject: self) } - /** - Factory method that enables subclasses to implement their own `rx_dataSource`. - - - returns: Instance of delegate proxy that wraps `dataSource`. - */ - public func rx_createDataSourceProxy() -> RxCollectionViewDataSourceProxy { + /// Factory method that enables subclasses to implement their own `rx.dataSource`. + /// + /// - returns: Instance of delegate proxy that wraps `dataSource`. + public func createRxDataSourceProxy() -> RxCollectionViewDataSourceProxy { return RxCollectionViewDataSourceProxy(parentObject: self) } - - /** - Reactive wrapper for `dataSource`. - - For more information take a look at `DelegateProxyType` protocol documentation. - */ - public var rx_dataSource: DelegateProxy { - return proxyForObject(RxCollectionViewDataSourceProxy.self, self) + +} + +extension Reactive where Base: UICollectionView { + + /// Reactive wrapper for `dataSource`. + /// + /// For more information take a look at `DelegateProxyType` protocol documentation. + public var dataSource: DelegateProxy { + return RxCollectionViewDataSourceProxy.proxyForObject(base) } - /** - Installs data source as forwarding delegate on `rx_dataSource`. - - It enables using normal delegate mechanism with reactive delegate mechanism. - - - parameter dataSource: Data source object. - - returns: Disposable object that can be used to unbind the data source. - */ - public func rx_setDataSource(dataSource: UICollectionViewDataSource) + /// Installs data source as forwarding delegate on `rx.dataSource`. + /// Data source won't be retained. + /// + /// It enables using normal delegate mechanism with reactive delegate mechanism. + /// + /// - parameter dataSource: Data source object. + /// - returns: Disposable object that can be used to unbind the data source. + public func setDataSource(_ dataSource: UICollectionViewDataSource) -> Disposable { - let proxy = proxyForObject(RxCollectionViewDataSourceProxy.self, self) - return installDelegate(proxy, delegate: dataSource, retainDelegate: false, onProxyForObject: self) + return RxCollectionViewDataSourceProxy.installForwardDelegate(dataSource, retainDelegate: false, onProxyForObject: self.base) } - /** - Reactive wrapper for `delegate` message `collectionView:didSelectItemAtIndexPath:`. - */ - public var rx_itemSelected: ControlEvent { - let source = rx_delegate.observe(#selector(UICollectionViewDelegate.collectionView(_:didSelectItemAtIndexPath:))) + /// Reactive wrapper for `delegate` message `collectionView:didSelectItemAtIndexPath:`. + public var itemSelected: ControlEvent { + let source = delegate.methodInvoked(#selector(UICollectionViewDelegate.collectionView(_:didSelectItemAt:))) .map { a in - return a[1] as! NSIndexPath + return a[1] as! IndexPath } return ControlEvent(events: source) } - /** - Reactive wrapper for `delegate` message `collectionView:didSelectItemAtIndexPath:`. - */ - public var rx_itemDeselected: ControlEvent { - let source = rx_delegate.observe(#selector(UICollectionViewDelegate.collectionView(_:didDeselectItemAtIndexPath:))) + /// Reactive wrapper for `delegate` message `collectionView:didSelectItemAtIndexPath:`. + public var itemDeselected: ControlEvent { + let source = delegate.methodInvoked(#selector(UICollectionViewDelegate.collectionView(_:didDeselectItemAt:))) .map { a in - return a[1] as! NSIndexPath + return a[1] as! IndexPath } return ControlEvent(events: source) } - /** - Reactive wrapper for `delegate` message `collectionView:didSelectItemAtIndexPath:`. - - It can be only used when one of the `rx_itemsWith*` methods is used to bind observable sequence, - or any other data source conforming to `SectionedViewDataSourceType` protocol. - - ``` - collectionView.rx_modelSelected(MyModel.self) - .map { ... - ``` - */ - public func rx_modelSelected(modelType: T.Type) -> ControlEvent { - let source: Observable = rx_itemSelected.flatMap { [weak self] indexPath -> Observable in - guard let view = self else { + /// Reactive wrapper for `delegate` message `collectionView:didSelectItemAtIndexPath:`. + /// + /// It can be only used when one of the `rx.itemsWith*` methods is used to bind observable sequence, + /// or any other data source conforming to `SectionedViewDataSourceType` protocol. + /// + /// ``` + /// collectionView.rx.modelSelected(MyModel.self) + /// .map { ... + /// ``` + public func modelSelected(_ modelType: T.Type) -> ControlEvent { + let source: Observable = itemSelected.flatMap { [weak view = self.base as UICollectionView] indexPath -> Observable in + guard let view = view else { return Observable.empty() } - return Observable.just(try view.rx_modelAtIndexPath(indexPath)) + return Observable.just(try view.rx.model(at: indexPath)) } return ControlEvent(events: source) } - /** - Reactive wrapper for `delegate` message `collectionView:didSelectItemAtIndexPath:`. - - It can be only used when one of the `rx_itemsWith*` methods is used to bind observable sequence, - or any other data source conforming to `SectionedViewDataSourceType` protocol. - - ``` - collectionView.rx_modelDeselected(MyModel.self) - .map { ... - ``` - */ - public func rx_modelDeselected(modelType: T.Type) -> ControlEvent { - let source: Observable = rx_itemDeselected.flatMap { [weak self] indexPath -> Observable in - guard let view = self else { + /// Reactive wrapper for `delegate` message `collectionView:didSelectItemAtIndexPath:`. + /// + /// It can be only used when one of the `rx.itemsWith*` methods is used to bind observable sequence, + /// or any other data source conforming to `SectionedViewDataSourceType` protocol. + /// + /// ``` + /// collectionView.rx.modelDeselected(MyModel.self) + /// .map { ... + /// ``` + public func modelDeselected(_ modelType: T.Type) -> ControlEvent { + let source: Observable = itemDeselected.flatMap { [weak view = self.base as UICollectionView] indexPath -> Observable in + guard let view = view else { return Observable.empty() } - return Observable.just(try view.rx_modelAtIndexPath(indexPath)) + return Observable.just(try view.rx.model(at: indexPath)) } return ControlEvent(events: source) } - /** - Syncronous helper method for retrieving a model at indexPath through a reactive data source - */ - public func rx_modelAtIndexPath(indexPath: NSIndexPath) throws -> T { - let dataSource: SectionedViewDataSourceType = castOrFatalError(self.rx_dataSource.forwardToDelegate(), message: "This method only works in case one of the `rx_itemsWith*` methods was used.") + /// Syncronous helper method for retrieving a model at indexPath through a reactive data source + public func model(at indexPath: IndexPath) throws -> T { + let dataSource: SectionedViewDataSourceType = castOrFatalError(self.dataSource.forwardToDelegate(), message: "This method only works in case one of the `rx.itemsWith*` methods was used.") - let element = try dataSource.modelAtIndexPath(indexPath) + let element = try dataSource.model(at: indexPath) return element as! T } @@ -214,19 +275,17 @@ extension UICollectionView { #if os(tvOS) -extension UICollectionView { +extension Reactive where Base: UICollectionView { - /** - Reactive wrapper for `delegate` message `collectionView:didUpdateFocusInContext:withAnimationCoordinator:`. - */ - public var rx_didUpdateFocusInContextWithAnimationCoordinator: ControlEvent<(context: UIFocusUpdateContext, animationCoordinator: UIFocusAnimationCoordinator)> { - - let source = rx_delegate.observe(#selector(UICollectionViewDelegate.collectionView(_:didUpdateFocusInContext:withAnimationCoordinator:))) + /// Reactive wrapper for `delegate` message `collectionView:didUpdateFocusInContext:withAnimationCoordinator:`. + public var didUpdateFocusInContextWithAnimationCoordinator: ControlEvent<(context: UIFocusUpdateContext, animationCoordinator: UIFocusAnimationCoordinator)> { + + let source = delegate.methodInvoked(#selector(UICollectionViewDelegate.collectionView(_:didUpdateFocusIn:with:))) .map { a -> (context: UIFocusUpdateContext, animationCoordinator: UIFocusAnimationCoordinator) in let context = a[1] as! UIFocusUpdateContext let animationCoordinator = a[2] as! UIFocusAnimationCoordinator return (context: context, animationCoordinator: animationCoordinator) - } + } return ControlEvent(events: source) } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIControl+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIControl+Rx.swift index d8409db..0e6bf41 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIControl+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIControl+Rx.swift @@ -14,78 +14,87 @@ import RxSwift #endif import UIKit -extension UIControl { +extension Reactive where Base: UIControl { - /** - Bindable sink for `enabled` property. - */ - public var rx_enabled: AnyObserver { - return UIBindingObserver(UIElement: self) { control, value in - control.enabled = value - }.asObserver() + /// Bindable sink for `enabled` property. + public var isEnabled: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { control, value in + control.isEnabled = value + } } - /** - Bindable sink for `selected` property. - */ - public var rx_selected: AnyObserver { - return UIBindingObserver(UIElement: self) { control, selected in - control.selected = selected - }.asObserver() + /// Bindable sink for `selected` property. + public var isSelected: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { control, selected in + control.isSelected = selected + } } - /** - Reactive wrapper for target action pattern. - - - parameter controlEvents: Filter for observed event types. - */ - public func rx_controlEvent(controlEvents: UIControlEvents) -> ControlEvent { - let source: Observable = Observable.create { [weak self] observer in + /// Reactive wrapper for target action pattern. + /// + /// - parameter controlEvents: Filter for observed event types. + public func controlEvent(_ controlEvents: UIControlEvents) -> ControlEvent { + let source: Observable = Observable.create { [weak control = self.base] observer in MainScheduler.ensureExecutingOnScheduler() - guard let control = self else { - observer.on(.Completed) - return NopDisposable.instance + guard let control = control else { + observer.on(.completed) + return Disposables.create() } let controlTarget = ControlTarget(control: control, controlEvents: controlEvents) { control in - observer.on(.Next()) + observer.on(.next()) } - return AnonymousDisposable { - controlTarget.dispose() - } - }.takeUntil(rx_deallocated) - + return Disposables.create(with: controlTarget.dispose) + }.takeUntil(deallocated) + return ControlEvent(events: source) } - /** - You might be wondering why the ugly `as!` casts etc, well, for some reason if - Swift compiler knows C is UIControl type and optimizations are turned on, it will crash. - */ - static func rx_value(control: C, getter: (C) -> T, setter: (C, T) -> Void) -> ControlProperty { + /// This is internal convenience method + /// https://github.com/ReactiveX/RxSwift/issues/681 + /// In case similar behavior is externally needed, one can use the following snippet + /// + /// ```swift + /// extension UIControl { + /// static func valuePublic(_ control: ControlType, getter: @escaping (ControlType) -> T, setter: @escaping (ControlType, T) -> ()) -> ControlProperty { + /// let values: Observable = Observable.deferred { [weak control] in + /// guard let existingSelf = control else { + /// return Observable.empty() + /// } + /// + /// return (existingSelf as UIControl).rx.controlEvent([.allEditingEvents, .valueChanged]) + /// .flatMap { _ in + /// return control.map { Observable.just(getter($0)) } ?? Observable.empty() + /// } + /// .startWith(getter(existingSelf)) + /// } + /// return ControlProperty(values: values, valueSink: UIBindingObserver(UIElement: control) { control, value in + /// setter(control, value) + /// }) + /// } + ///} + ///``` + static func value(_ control: C, getter: @escaping (C) -> T, setter: @escaping (C, T) -> Void) -> ControlProperty { let source: Observable = Observable.create { [weak weakControl = control] observer in guard let control = weakControl else { - observer.on(.Completed) - return NopDisposable.instance + observer.on(.completed) + return Disposables.create() } - observer.on(.Next(getter(control))) + observer.on(.next(getter(control))) - let controlTarget = ControlTarget(control: control as! UIControl, controlEvents: [.AllEditingEvents, .ValueChanged]) { _ in + let controlTarget = ControlTarget(control: control, controlEvents: [.allEditingEvents, .valueChanged]) { _ in if let control = weakControl { - observer.on(.Next(getter(control))) + observer.on(.next(getter(control))) } } - return AnonymousDisposable { - controlTarget.dispose() - } + return Disposables.create(with: controlTarget.dispose) } - .distinctUntilChanged() - .takeUntil((control as! NSObject).rx_deallocated) + .takeUntil((control as NSObject).rx.deallocated) let bindingObserver = UIBindingObserver(UIElement: control, binding: setter) diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIDatePicker+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIDatePicker+Rx.swift index a09c9c6..adb2323 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIDatePicker+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIDatePicker+Rx.swift @@ -14,14 +14,16 @@ import RxSwift #endif import UIKit -extension UIDatePicker { +extension Reactive where Base: UIDatePicker { + /// Reactive wrapper for `date` property. + public var date: ControlProperty { + return value + } - /** - Reactive wrapper for `date` property. - */ - public var rx_date: ControlProperty { - return UIControl.rx_value( - self, + /// Reactive wrapper for `date` property. + public var value: ControlProperty { + return UIControl.rx.value( + self.base, getter: { datePicker in datePicker.date }, setter: { datePicker, value in diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIGestureRecognizer+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIGestureRecognizer+Rx.swift index 65e6e24..076aa65 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIGestureRecognizer+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIGestureRecognizer+Rx.swift @@ -1,6 +1,6 @@ // // UIGestureRecognizer+Rx.swift -// Touches +// RxCocoa // // Created by Carlos García on 10/6/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -15,30 +15,30 @@ import RxSwift // This should be only used from `MainScheduler` -class GestureTarget: RxTarget { - typealias Callback = (UIGestureRecognizer) -> Void +class GestureTarget: RxTarget { + typealias Callback = (Recognizer) -> Void let selector = #selector(ControlTarget.eventHandler(_:)) - weak var gestureRecognizer: UIGestureRecognizer? + weak var gestureRecognizer: Recognizer? var callback: Callback? - init(_ gestureRecognizer: UIGestureRecognizer, callback: Callback) { + init(_ gestureRecognizer: Recognizer, callback: @escaping Callback) { self.gestureRecognizer = gestureRecognizer self.callback = callback super.init() gestureRecognizer.addTarget(self, action: selector) - - let method = self.methodForSelector(selector) + + let method = self.method(for: selector) if method == nil { fatalError("Can't find method") } } - func eventHandler(sender: UIGestureRecognizer!) { - if let callback = self.callback, gestureRecognizer = self.gestureRecognizer { + func eventHandler(_ sender: UIGestureRecognizer!) { + if let callback = self.callback, let gestureRecognizer = self.gestureRecognizer { callback(gestureRecognizer) } } @@ -51,27 +51,25 @@ class GestureTarget: RxTarget { } } -extension UIGestureRecognizer { +extension Reactive where Base: UIGestureRecognizer { - /** - Reactive wrapper for gesture recognizer events. - */ - public var rx_event: ControlEvent { - let source: Observable = Observable.create { [weak self] observer in + /// Reactive wrapper for gesture recognizer events. + public var event: ControlEvent { + let source: Observable = Observable.create { [weak control = self.base] observer in MainScheduler.ensureExecutingOnScheduler() - guard let control = self else { - observer.on(.Completed) - return NopDisposable.instance + guard let control = control else { + observer.on(.completed) + return Disposables.create() } let observer = GestureTarget(control) { control in - observer.on(.Next(control)) + observer.on(.next(control)) } return observer - }.takeUntil(rx_deallocated) + }.takeUntil(deallocated) return ControlEvent(events: source) } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIImagePickerController+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIImagePickerController+Rx.swift deleted file mode 100644 index 8e23935..0000000 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIImagePickerController+Rx.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// UIImagePickerController+Rx.swift -// Rx -// -// Created by Segii Shulga on 1/4/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -#if os(iOS) - import Foundation - -#if !RX_NO_MODULE - import RxSwift -#endif - import UIKit - - extension UIImagePickerController { - - /** - Reactive wrapper for `delegate`. - - For more information take a look at `DelegateProxyType` protocol documentation. - */ - public var rx_delegate: DelegateProxy { - return proxyForObject(RxImagePickerDelegateProxy.self, self) - } - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didFinishPickingMediaWithInfo: Observable<[String : AnyObject]> { - return rx_delegate - .observe(#selector(UIImagePickerControllerDelegate.imagePickerController(_:didFinishPickingMediaWithInfo:))) - .map({ (a) in - return try castOrThrow(Dictionary.self, a[1]) - }) - } - - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didCancel: Observable<()> { - return rx_delegate - .observe(#selector(UIImagePickerControllerDelegate.imagePickerControllerDidCancel(_:))) - .map {_ in () } - } - - } - -#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIImageView+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIImageView+Rx.swift index 6d0caf0..7dc7178 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIImageView+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIImageView+Rx.swift @@ -14,38 +14,33 @@ import RxSwift #endif import UIKit -extension UIImageView { +extension Reactive where Base: UIImageView { - /** - Bindable sink for `image` property. - */ - public var rx_image: AnyObserver { - return self.rx_imageAnimated(nil) + /// Bindable sink for `image` property. + public var image: UIBindingObserver { + return image(transitionType: nil) } - /** - Bindable sink for `image` property. - - - parameter transitionType: Optional transition type while setting the image (kCATransitionFade, kCATransitionMoveIn, ...) - */ - public func rx_imageAnimated(transitionType: String?) -> AnyObserver { - return UIBindingObserver(UIElement: self) { imageView, image in + /// Bindable sink for `image` property. + + /// - parameter transitionType: Optional transition type while setting the image (kCATransitionFade, kCATransitionMoveIn, ...) + public func image(transitionType: String? = nil) -> UIBindingObserver { + return UIBindingObserver(UIElement: base) { imageView, image in if let transitionType = transitionType { if image != nil { let transition = CATransition() transition.duration = 0.25 transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) transition.type = transitionType - imageView.layer.addAnimation(transition, forKey: kCATransition) + imageView.layer.add(transition, forKey: kCATransition) } } else { imageView.layer.removeAllAnimations() } imageView.image = image - }.asObserver() + } } - } #endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UILabel+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UILabel+Rx.swift index 7e5822f..2bfc235 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UILabel+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UILabel+Rx.swift @@ -14,24 +14,20 @@ import RxSwift #endif import UIKit -extension UILabel { +extension Reactive where Base: UILabel { - /** - Bindable sink for `text` property. - */ - public var rx_text: AnyObserver { - return UIBindingObserver(UIElement: self) { label, text in + /// Bindable sink for `text` property. + public var text: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { label, text in label.text = text - }.asObserver() + } } - /** - Bindable sink for `attributedText` property. - */ - public var rx_attributedText: AnyObserver { - return UIBindingObserver(UIElement: self) { label, text in + /// Bindable sink for `attributedText` property. + public var attributedText: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { label, text in label.attributedText = text - }.asObserver() + } } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UINavigationItem+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UINavigationItem+Rx.swift new file mode 100644 index 0000000..ddd9756 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UINavigationItem+Rx.swift @@ -0,0 +1,28 @@ +// +// UINavigationItem+Rx.swift +// RxCocoa +// +// Created by kumapo on 2016/05/09. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) || os(tvOS) + +import Foundation +import UIKit +#if !RX_NO_MODULE +import RxSwift +#endif + +extension Reactive where Base: UINavigationItem { + + /// Bindable sink for `title` property. + public var title: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { navigationItem, text in + navigationItem.title = text + } + } + +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIPageControl+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIPageControl+Rx.swift new file mode 100644 index 0000000..b633945 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIPageControl+Rx.swift @@ -0,0 +1,27 @@ +// +// UIPageControl+Rx.swift +// RxCocoa +// +// Created by Francesco Puntillo on 14/04/2016. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) || os(tvOS) + +import Foundation +#if !RX_NO_MODULE +import RxSwift +#endif +import UIKit + +extension Reactive where Base: UIPageControl { + + /// Bindable sink for `currentPage` property. + public var currentPage: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { controller, page in + controller.currentPage = page + } + } +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIPickerView+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIPickerView+Rx.swift new file mode 100644 index 0000000..b40cdd7 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIPickerView+Rx.swift @@ -0,0 +1,35 @@ +// +// UIPickerView+Rx.swift +// RxCocoa +// +// Created by Segii Shulga on 5/12/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) + + import Foundation +#if !RX_NO_MODULE + import RxSwift +#endif + import UIKit + +extension Reactive where Base: UIPickerView { + + /// Reactive wrapper for `delegate`. + /// For more information take a look at `DelegateProxyType` protocol documentation. + public var delegate: DelegateProxy { + return RxPickerViewDelegateProxy.proxyForObject(base) + } + + public var itemSelected: ControlEvent<(Int, Int)> { + let source = delegate + .methodInvoked(#selector(UIPickerViewDelegate.pickerView(_:didSelectRow:inComponent:))) + .map { + return (try castOrThrow(Int.self, $0[1]), try castOrThrow(Int.self, $0[2])) + } + return ControlEvent(events: source) + } +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIProgressView+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIProgressView+Rx.swift index 3b59dd7..6573c0d 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIProgressView+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIProgressView+Rx.swift @@ -1,6 +1,6 @@ // // UIProgressView+Rx.swift -// Rx +// RxCocoa // // Created by Samuel Bae on 2/27/16. // Copyright © 2016 Krunoslav Zaher. All rights reserved. @@ -14,17 +14,15 @@ import RxSwift #endif import UIKit -extension UIProgressView { +extension Reactive where Base: UIProgressView { - /** - Bindable sink for `progress` property - */ - public var rx_progress: AnyObserver { - return UIBindingObserver(UIElement: self) { progressView, progress in + /// Bindable sink for `progress` property + public var progress: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { progressView, progress in progressView.progress = progress - }.asObserver() + } } } -#endif \ No newline at end of file +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIRefreshControl+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIRefreshControl+Rx.swift index 4c106d2..9a38cb9 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIRefreshControl+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIRefreshControl+Rx.swift @@ -13,19 +13,23 @@ import UIKit import RxSwift #endif -extension UIRefreshControl { +extension Reactive where Base: UIRefreshControl { - /** - Bindable sink for `beginRefreshing()`, `endRefreshing()` methods. - */ - public var rx_refreshing: AnyObserver { - return UIBindingObserver(UIElement: self) { refreshControl, refresh in + /// Bindable sink for `beginRefreshing()`, `endRefreshing()` methods. + @available(*, deprecated, renamed: "isRefreshing") + public var refreshing: UIBindingObserver { + return self.isRefreshing + } + + /// Bindable sink for `beginRefreshing()`, `endRefreshing()` methods. + public var isRefreshing: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { refreshControl, refresh in if refresh { refreshControl.beginRefreshing() } else { refreshControl.endRefreshing() } - }.asObserver() + } } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift index 2aaf8e4..ca0d2c5 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIScrollView+Rx.swift @@ -16,49 +16,85 @@ import UIKit extension UIScrollView { - /** - Factory method that enables subclasses to implement their own `rx_delegate`. - - - returns: Instance of delegate proxy that wraps `delegate`. - */ - public func rx_createDelegateProxy() -> RxScrollViewDelegateProxy { + /// Factory method that enables subclasses to implement their own `delegate`. + /// + /// - returns: Instance of delegate proxy that wraps `delegate`. + public func createRxDelegateProxy() -> RxScrollViewDelegateProxy { return RxScrollViewDelegateProxy(parentObject: self) } - /** - Reactive wrapper for `delegate`. - - For more information take a look at `DelegateProxyType` protocol documentation. - */ - public var rx_delegate: DelegateProxy { - return proxyForObject(RxScrollViewDelegateProxy.self, self) +} + +extension Reactive where Base: UIScrollView { + + /// Reactive wrapper for `delegate`. + /// + /// For more information take a look at `DelegateProxyType` protocol documentation. + public var delegate: DelegateProxy { + return RxScrollViewDelegateProxy.proxyForObject(base) } - /** - Reactive wrapper for `contentOffset`. - */ - public var rx_contentOffset: ControlProperty { - let proxy = proxyForObject(RxScrollViewDelegateProxy.self, self) + /// Reactive wrapper for `contentOffset`. + public var contentOffset: ControlProperty { + let proxy = RxScrollViewDelegateProxy.proxyForObject(base) - let bindingObserver = UIBindingObserver(UIElement: self) { scrollView, contentOffset in + let bindingObserver = UIBindingObserver(UIElement: self.base) { scrollView, contentOffset in scrollView.contentOffset = contentOffset } - return ControlProperty(values: proxy.contentOffsetSubject, valueSink: bindingObserver) + return ControlProperty(values: proxy.contentOffsetBehaviorSubject, valueSink: bindingObserver) } - - /** - Installs delegate as forwarding delegate on `rx_delegate`. - - It enables using normal delegate mechanism with reactive delegate mechanism. - - - parameter delegate: Delegate object. - - returns: Disposable object that can be used to unbind the delegate. - */ - public func rx_setDelegate(delegate: UIScrollViewDelegate) + + /// Bindable sink for `scrollEnabled` property. + public var isScrollEnabled: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { scrollView, scrollEnabled in + scrollView.isScrollEnabled = scrollEnabled + } + } + + /// Reactive wrapper for delegate method `scrollViewDidScroll` + public var didScroll: ControlEvent { + let source = RxScrollViewDelegateProxy.proxyForObject(base).contentOffsetPublishSubject + return ControlEvent(events: source) + } + + /// Reactive wrapper for delegate method `scrollViewDidEndDecelerating` + public var didEndDecelerating: ControlEvent { + let source = delegate.methodInvoked(#selector(UIScrollViewDelegate.scrollViewDidEndDecelerating(_:))).map { _ in } + return ControlEvent(events: source) + } + + /// Reactive wrapper for delegate method `scrollViewDidEndDragging(_:willDecelerate:)` + public var didEndDragging: ControlEvent { + let source = delegate.methodInvoked(#selector(UIScrollViewDelegate.scrollViewDidEndDragging(_:willDecelerate:))).map { value -> Bool in + return try castOrThrow(Bool.self, value[1]) + } + return ControlEvent(events: source) + } + + /// Reactive wrapper for delegate method `scrollViewDidZoom` + public var didZoom: ControlEvent { + let source = delegate.methodInvoked(#selector(UIScrollViewDelegate.scrollViewDidZoom)).map { _ in } + return ControlEvent(events: source) + } + + + /// Reactive wrapper for delegate method `scrollViewDidScrollToTop` + public var didScrollToTop: ControlEvent { + let source = delegate.methodInvoked(#selector(UIScrollViewDelegate.scrollViewDidScrollToTop(_:))).map { _ in } + return ControlEvent(events: source) + } + + /// Installs delegate as forwarding delegate on `delegate`. + /// Delegate won't be retained. + /// + /// It enables using normal delegate mechanism with reactive delegate mechanism. + /// + /// - parameter delegate: Delegate object. + /// - returns: Disposable object that can be used to unbind the delegate. + public func setDelegate(_ delegate: UIScrollViewDelegate) -> Disposable { - let proxy = proxyForObject(RxScrollViewDelegateProxy.self, self) - return installDelegate(proxy, delegate: delegate, retainDelegate: false, onProxyForObject: self) + return RxScrollViewDelegateProxy.installForwardDelegate(delegate, retainDelegate: false, onProxyForObject: self.base) } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISearchBar+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISearchBar+Rx.swift index 73413dc..a430a10 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISearchBar+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISearchBar+Rx.swift @@ -15,65 +15,64 @@ import RxSwift import UIKit - -extension UISearchBar { - #if os(iOS) - /** - Factory method that enables subclasses to implement their own `rx_delegate`. - - - returns: Instance of delegate proxy that wraps `delegate`. - */ - public func rx_createDelegateProxy() -> RxSearchBarDelegateProxy { - return RxSearchBarDelegateProxy(parentObject: self) + extension UISearchBar { + /// Factory method that enables subclasses to implement their own `delegate`. + /// + /// - returns: Instance of delegate proxy that wraps `delegate`. + public func createRxDelegateProxy() -> RxSearchBarDelegateProxy { + return RxSearchBarDelegateProxy(parentObject: self) + } + } #endif - - /** - Reactive wrapper for `delegate`. - - For more information take a look at `DelegateProxyType` protocol documentation. - */ - public var rx_delegate: DelegateProxy { - return proxyForObject(RxSearchBarDelegateProxy.self, self) + +extension Reactive where Base: UISearchBar { + + /// Reactive wrapper for `delegate`. + /// + /// For more information take a look at `DelegateProxyType` protocol documentation. + public var delegate: DelegateProxy { + return RxSearchBarDelegateProxy.proxyForObject(base) + } + + /// Reactive wrapper for `text` property. + public var text: ControlProperty { + return value } - /** - Reactive wrapper for `text` property. - */ - public var rx_text: ControlProperty { - let source: Observable = Observable.deferred { [weak self] () -> Observable in - let text = self?.text ?? "" + /// Reactive wrapper for `text` property. + public var value: ControlProperty { + let source: Observable = Observable.deferred { [weak searchBar = self.base as UISearchBar] () -> Observable in + let text = searchBar?.text - return (self?.rx_delegate.observe(#selector(UISearchBarDelegate.searchBar(_:textDidChange:))) ?? Observable.empty()) + return (searchBar?.rx.delegate.methodInvoked(#selector(UISearchBarDelegate.searchBar(_:textDidChange:))) ?? Observable.empty()) .map { a in - return a[1] as? String ?? "" + return a[1] as? String } .startWith(text) } - let bindingObserver = UIBindingObserver(UIElement: self) { (searchBar, text: String) in + let bindingObserver = UIBindingObserver(UIElement: self.base) { (searchBar, text: String?) in searchBar.text = text } return ControlProperty(values: source, valueSink: bindingObserver) } - /** - Reactive wrapper for `selectedScopeButtonIndex` property. - */ - public var rx_selectedScopeButtonIndex: ControlProperty { - let source: Observable = Observable.deferred { [weak self] () -> Observable in - let index = self?.selectedScopeButtonIndex ?? 0 + /// Reactive wrapper for `selectedScopeButtonIndex` property. + public var selectedScopeButtonIndex: ControlProperty { + let source: Observable = Observable.deferred { [weak source = self.base as UISearchBar] () -> Observable in + let index = source?.selectedScopeButtonIndex ?? 0 - return (self?.rx_delegate.observe(#selector(UISearchBarDelegate.searchBar(_:selectedScopeButtonIndexDidChange:))) ?? Observable.empty()) + return (source?.rx.delegate.methodInvoked(#selector(UISearchBarDelegate.searchBar(_:selectedScopeButtonIndexDidChange:))) ?? Observable.empty()) .map { a in return try castOrThrow(Int.self, a[1]) } .startWith(index) } - let bindingObserver = UIBindingObserver(UIElement: self) { (searchBar, index: Int) in + let bindingObserver = UIBindingObserver(UIElement: self.base) { (searchBar, index: Int) in searchBar.selectedScopeButtonIndex = index } @@ -81,28 +80,61 @@ extension UISearchBar { } #if os(iOS) - /** - Reactive wrapper for delegate method `searchBarCancelButtonClicked`. - */ - public var rx_cancelButtonClicked: ControlEvent { - let source: Observable = rx_delegate.observe(#selector(UISearchBarDelegate.searchBarCancelButtonClicked(_:))) + /// Reactive wrapper for delegate method `searchBarCancelButtonClicked`. + public var cancelButtonClicked: ControlEvent { + let source: Observable = self.delegate.methodInvoked(#selector(UISearchBarDelegate.searchBarCancelButtonClicked(_:))) .map { _ in return () } return ControlEvent(events: source) } + + /// Reactive wrapper for delegate method `searchBarBookmarkButtonClicked`. + public var bookmarkButtonClicked: ControlEvent { + let source: Observable = self.delegate.methodInvoked(#selector(UISearchBarDelegate.searchBarBookmarkButtonClicked(_:))) + .map { _ in + return () + } + return ControlEvent(events: source) + } + + /// Reactive wrapper for delegate method `searchBarResultsListButtonClicked`. + public var resultsListButtonClicked: ControlEvent { + let source: Observable = self.delegate.methodInvoked(#selector(UISearchBarDelegate.searchBarResultsListButtonClicked(_:))) + .map { _ in + return () + } + return ControlEvent(events: source) + } #endif - - /** - Reactive wrapper for delegate method `searchBarSearchButtonClicked`. - */ - public var rx_searchButtonClicked: ControlEvent { - let source: Observable = rx_delegate.observe(#selector(UISearchBarDelegate.searchBarSearchButtonClicked(_:))) + + /// Reactive wrapper for delegate method `searchBarSearchButtonClicked`. + public var searchButtonClicked: ControlEvent { + let source: Observable = self.delegate.methodInvoked(#selector(UISearchBarDelegate.searchBarSearchButtonClicked(_:))) .map { _ in return () } return ControlEvent(events: source) } + + /// Reactive wrapper for delegate method `searchBarTextDidBeginEditing`. + public var textDidBeginEditing: ControlEvent { + let source: Observable = self.delegate.methodInvoked(#selector(UISearchBarDelegate.searchBarTextDidBeginEditing(_:))) + .map { _ in + return () + } + return ControlEvent(events: source) + } + + /// Reactive wrapper for delegate method `searchBarTextDidEndEditing`. + public var textDidEndEditing: ControlEvent { + let source: Observable = self.delegate.methodInvoked(#selector(UISearchBarDelegate.searchBarTextDidEndEditing(_:))) + .map { _ in + return () + } + return ControlEvent(events: source) + } + } #endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISearchController+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISearchController+Rx.swift index af47a86..650e75f 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISearchController+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISearchController+Rx.swift @@ -1,6 +1,6 @@ // // UISearchController+Rx.swift -// Rx +// RxCocoa // // Created by Segii Shulga on 3/17/16. // Copyright © 2016 Krunoslav Zaher. All rights reserved. @@ -16,52 +16,46 @@ import Foundation #endif import UIKit -extension UISearchController { - /** - Reactive wrapper for `delegate`. - For more information take a look at `DelegateProxyType` protocol documentation. - */ - public var rx_delegate: DelegateProxy { - return proxyForObject(RxSearchControllerDelegateProxy.self, self) +@available(iOS 8.0, *) +extension Reactive where Base: UISearchController { + /// Reactive wrapper for `delegate`. + /// For more information take a look at `DelegateProxyType` protocol documentation. + public var delegate: DelegateProxy { + return RxSearchControllerDelegateProxy.proxyForObject(base) } - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didDismiss: Observable { - return rx_delegate - .observe(#selector(UISearchControllerDelegate.didDismissSearchController(_:))) + + /// Reactive wrapper for `delegate` message. + public var didDismiss: Observable { + return delegate + .methodInvoked( #selector(UISearchControllerDelegate.didDismissSearchController(_:))) .map {_ in} } - /** - Reactive wrapper for `delegate` message. - */ - public var rx_didPresent: Observable { - return rx_delegate - .observe(#selector(UISearchControllerDelegate.didPresentSearchController(_:))) + + /// Reactive wrapper for `delegate` message. + public var didPresent: Observable { + return delegate + .methodInvoked(#selector(UISearchControllerDelegate.didPresentSearchController(_:))) .map {_ in} } - /** - Reactive wrapper for `delegate` message. - */ - public var rx_present: Observable { - return rx_delegate - .observe(#selector(UISearchControllerDelegate.presentSearchController(_:))) + + /// Reactive wrapper for `delegate` message. + public var present: Observable { + return delegate + .methodInvoked( #selector(UISearchControllerDelegate.presentSearchController(_:))) .map {_ in} } - /** - Reactive wrapper for `delegate` message. - */ - public var rx_willDismiss: Observable { - return rx_delegate - .observe(#selector(UISearchControllerDelegate.willDismissSearchController(_:))) + + /// Reactive wrapper for `delegate` message. + public var willDismiss: Observable { + return delegate + .methodInvoked(#selector(UISearchControllerDelegate.willDismissSearchController(_:))) .map {_ in} } - /** - Reactive wrapper for `delegate` message. - */ - public var rx_willPresent: Observable { - return rx_delegate - .observe(#selector(UISearchControllerDelegate.willPresentSearchController(_:))) + + /// Reactive wrapper for `delegate` message. + public var willPresent: Observable { + return delegate + .methodInvoked( #selector(UISearchControllerDelegate.willPresentSearchController(_:))) .map {_ in} } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISegmentedControl+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISegmentedControl+Rx.swift index be46f4a..410b86d 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISegmentedControl+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISegmentedControl+Rx.swift @@ -14,14 +14,16 @@ import RxSwift #endif -extension UISegmentedControl { +extension Reactive where Base: UISegmentedControl { + /// Reactive wrapper for `selectedSegmentIndex` property. + public var selectedSegmentIndex: ControlProperty { + return value + } - /** - Reactive wrapper for `selectedSegmentIndex` property. - */ - public var rx_value: ControlProperty { - return UIControl.rx_value( - self, + /// Reactive wrapper for `selectedSegmentIndex` property. + public var value: ControlProperty { + return UIControl.rx.value( + self.base, getter: { segmentedControl in segmentedControl.selectedSegmentIndex }, setter: { segmentedControl, value in diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISlider+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISlider+Rx.swift index 2c02bd0..c20be96 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISlider+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISlider+Rx.swift @@ -14,14 +14,12 @@ import RxSwift #endif import UIKit -extension UISlider { +extension Reactive where Base: UISlider { - /** - Reactive wrapper for `value` property. - */ - public var rx_value: ControlProperty { - return UIControl.rx_value( - self, + /// Reactive wrapper for `value` property. + public var value: ControlProperty { + return UIControl.rx.value( + self.base, getter: { slider in slider.value }, setter: { slider, value in diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIStepper+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIStepper+Rx.swift index 9dc40c5..4bff4a6 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIStepper+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIStepper+Rx.swift @@ -14,14 +14,12 @@ import UIKit import RxSwift #endif -extension UIStepper { +extension Reactive where Base: UIStepper { - /** - Reactive wrapper for `value` property. - */ - public var rx_value: ControlProperty { - return UIControl.rx_value( - self, + /// Reactive wrapper for `value` property. + public var value: ControlProperty { + return UIControl.rx.value( + self.base, getter: { stepper in stepper.value }, setter: { stepper, value in diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISwitch+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISwitch+Rx.swift index bfc5b11..239abbb 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISwitch+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UISwitch+Rx.swift @@ -14,18 +14,27 @@ import RxSwift #endif -extension UISwitch { +extension Reactive where Base: UISwitch { + + /// Reactive wrapper for `isOn` property. + public var isOn: ControlProperty { + return value + } /** - Reactive wrapper for `on` property. + Reactive wrapper for `isOn` property. + + **⚠️ Versions prior to iOS 10.2 were leaking `UIButton`s, so on those versions + underlying observable sequence won't complete when nothing holds a strong reference + to UISwitch.⚠️** */ - public var rx_value: ControlProperty { - return UIControl.rx_value( - self, + public var value: ControlProperty { + return UIControl.rx.value( + self.base, getter: { uiSwitch in - uiSwitch.on + uiSwitch.isOn }, setter: { uiSwitch, value in - uiSwitch.on = value + uiSwitch.isOn = value } ) } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBar+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBar+Rx.swift new file mode 100644 index 0000000..f5a5e71 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBar+Rx.swift @@ -0,0 +1,105 @@ +// +// UITabBar+Rx.swift +// RxCocoa +// +// Created by Jesse Farless on 5/13/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) || os(tvOS) +import Foundation +import UIKit + +#if !RX_NO_MODULE +import RxSwift +#endif + +/** + iOS only + */ +#if os(iOS) +extension Reactive where Base: UITabBar { + + /// Reactive wrapper for `delegate` message `tabBar:willBeginCustomizingItems:`. + public var willBeginCustomizing: ControlEvent<[UITabBarItem]> { + + let source = delegate.methodInvoked(#selector(UITabBarDelegate.tabBar(_:willBeginCustomizing:))) + .map { a in + return try castOrThrow([UITabBarItem].self, a[1]) + } + + return ControlEvent(events: source) + } + + /// Reactive wrapper for `delegate` message `tabBar:didBeginCustomizingItems:`. + public var didBeginCustomizing: ControlEvent<[UITabBarItem]> { + let source = delegate.methodInvoked(#selector(UITabBarDelegate.tabBar(_:didBeginCustomizing:))) + .map { a in + return try castOrThrow([UITabBarItem].self, a[1]) + } + + return ControlEvent(events: source) + } + + /// Reactive wrapper for `delegate` message `tabBar:willEndCustomizingItems:changed:`. + public var willEndCustomizing: ControlEvent<([UITabBarItem], Bool)> { + let source = delegate.methodInvoked(#selector(UITabBarDelegate.tabBar(_:willEndCustomizing:changed:))) + .map { (a: [Any]) -> (([UITabBarItem], Bool)) in + let items = try castOrThrow([UITabBarItem].self, a[1]) + let changed = try castOrThrow(Bool.self, a[2]) + return (items, changed) + } + + return ControlEvent(events: source) + } + + /// Reactive wrapper for `delegate` message `tabBar:didEndCustomizingItems:changed:`. + public var didEndCustomizing: ControlEvent<([UITabBarItem], Bool)> { + let source = delegate.methodInvoked(#selector(UITabBarDelegate.tabBar(_:didEndCustomizing:changed:))) + .map { (a: [Any]) -> (([UITabBarItem], Bool)) in + let items = try castOrThrow([UITabBarItem].self, a[1]) + let changed = try castOrThrow(Bool.self, a[2]) + return (items, changed) + } + + return ControlEvent(events: source) + } + +} +#endif + +/** + iOS and tvOS + */ +extension UITabBar { + + /// Factory method that enables subclasses to implement their own `delegate`. + /// + /// - returns: Instance of delegate proxy that wraps `delegate`. + public func createRxDelegateProxy() -> RxTabBarDelegateProxy { + return RxTabBarDelegateProxy(parentObject: self) + } + +} + +extension Reactive where Base: UITabBar { + /// Reactive wrapper for `delegate`. + /// + /// For more information take a look at `DelegateProxyType` protocol documentation. + public var delegate: DelegateProxy { + return RxTabBarDelegateProxy.proxyForObject(base) + } + + /// Reactive wrapper for `delegate` message `tabBar:didSelectItem:`. + public var didSelectItem: ControlEvent { + let source = delegate.methodInvoked(#selector(UITabBarDelegate.tabBar(_:didSelect:))) + .map { a in + return try castOrThrow(UITabBarItem.self, a[1]) + } + + return ControlEvent(events: source) + } + +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBarController+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBarController+Rx.swift new file mode 100644 index 0000000..6eb8176 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBarController+Rx.swift @@ -0,0 +1,92 @@ +// +// UITabBarController+Rx.swift +// RxCocoa +// +// Created by Yusuke Kita on 2016/12/07. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) || os(tvOS) +import Foundation +import UIKit + +#if !RX_NO_MODULE +import RxSwift +#endif + +/** + iOS only + */ +#if os(iOS) +extension Reactive where Base: UITabBarController { + + /// Reactive wrapper for `delegate` message `tabBarController:willBeginCustomizing:`. + public var willBeginCustomizing: ControlEvent<[UIViewController]> { + let source = delegate.methodInvoked(#selector(UITabBarControllerDelegate.tabBarController(_:willBeginCustomizing:))) + .map { a in + return try castOrThrow([UIViewController].self, a[1]) + } + + return ControlEvent(events: source) + } + + /// Reactive wrapper for `delegate` message `tabBarController:willEndCustomizing:changed:`. + public var willEndCustomizing: ControlEvent<(viewControllers: [UIViewController], changed: Bool)> { + let source = delegate.methodInvoked(#selector(UITabBarControllerDelegate.tabBarController(_:willEndCustomizing:changed:))) + .map { (a: [Any]) -> (viewControllers: [UIViewController], changed: Bool) in + let viewControllers = try castOrThrow([UIViewController].self, a[1]) + let changed = try castOrThrow(Bool.self, a[2]) + return (viewControllers, changed) + } + + return ControlEvent(events: source) + } + + /// Reactive wrapper for `delegate` message `tabBarController:didEndCustomizing:changed:`. + public var didEndCustomizing: ControlEvent<(viewControllers: [UIViewController], changed: Bool)> { + let source = delegate.methodInvoked(#selector(UITabBarControllerDelegate.tabBarController(_:didEndCustomizing:changed:))) + .map { (a: [Any]) -> (viewControllers: [UIViewController], changed: Bool) in + let viewControllers = try castOrThrow([UIViewController].self, a[1]) + let changed = try castOrThrow(Bool.self, a[2]) + return (viewControllers, changed) + } + + return ControlEvent(events: source) + } +} +#endif + +/** + iOS and tvOS + */ +extension UITabBarController { + + /// Factory method that enables subclasses to implement their own `delegate`. + /// + /// - returns: Instance of delegate proxy that wraps `delegate`. + public func createRxDelegateProxy() -> RxTabBarControllerDelegateProxy { + return RxTabBarControllerDelegateProxy(parentObject: self) + } + +} + +extension Reactive where Base: UITabBarController { + /// Reactive wrapper for `delegate`. + /// + /// For more information take a look at `DelegateProxyType` protocol documentation. + public var delegate: DelegateProxy { + return RxTabBarControllerDelegateProxy.proxyForObject(base) + } + + /// Reactive wrapper for `delegate` message `tabBarController:didSelect:`. + public var didSelect: ControlEvent { + let source = delegate.methodInvoked(#selector(UITabBarControllerDelegate.tabBarController(_:didSelect:))) + .map { a in + return try castOrThrow(UIViewController.self, a[1]) + } + + return ControlEvent(events: source) + } +} + +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBarItem+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBarItem+Rx.swift index 2d07cde..6c15173 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBarItem+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITabBarItem+Rx.swift @@ -1,6 +1,6 @@ // // UITabBarItem+Rx.swift -// Rx +// RxCocoa // // Created by Mateusz Derks on 04/03/16. // Copyright © 2016 Krunoslav Zaher. All rights reserved. @@ -14,15 +14,13 @@ import RxSwift #endif -extension UITabBarItem { +extension Reactive where Base: UITabBarItem { - /** - Bindable sink for `badgeValue` property. - */ - public var rx_badgeValue: AnyObserver { - return UIBindingObserver(UIElement: self) { tabBarItem, badgeValue in + /// Bindable sink for `badgeValue` property. + public var badgeValue: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { tabBarItem, badgeValue in tabBarItem.badgeValue = badgeValue - }.asObserver() + } } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift index 5066140..315cb6e 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITableView+Rx.swift @@ -16,24 +16,41 @@ import UIKit // Items -extension UITableView { - +extension Reactive where Base: UITableView { + /** Binds sequences of elements to table view rows. - parameter source: Observable sequence of items. - parameter cellFactory: Transform between sequence elements and view cells. - returns: Disposable object that can be used to unbind. - */ - public func rx_itemsWithCellFactory - (source: O) - -> (cellFactory: (UITableView, Int, S.Generator.Element) -> UITableViewCell) - -> Disposable { - return { cellFactory in - let dataSource = RxTableViewReactiveArrayDataSourceSequenceWrapper(cellFactory: cellFactory) - - return self.rx_itemsWithDataSource(dataSource)(source: source) - } + + Example: + + let items = Observable.just([ + "First Item", + "Second Item", + "Third Item" + ]) + + items + .bindTo(tableView.rx.items) { (tableView, row, element) in + let cell = tableView.dequeueReusableCell(withIdentifier: "Cell")! + cell.textLabel?.text = "\(element) @ row \(row)" + return cell + } + .addDisposableTo(disposeBag) + + */ + public func items + (_ source: O) + -> (_ cellFactory: @escaping (UITableView, Int, S.Iterator.Element) -> UITableViewCell) + -> Disposable + where O.E == S { + return { cellFactory in + let dataSource = RxTableViewReactiveArrayDataSourceSequenceWrapper(cellFactory: cellFactory) + return self.items(dataSource: dataSource)(source) + } } /** @@ -44,89 +61,155 @@ extension UITableView { - parameter configureCell: Transform between sequence elements and view cells. - parameter cellType: Type of table view cell. - returns: Disposable object that can be used to unbind. + + Example: + + let items = Observable.just([ + "First Item", + "Second Item", + "Third Item" + ]) + + items + .bindTo(tableView.rx.items(cellIdentifier: "Cell", cellType: UITableViewCell.self)) { (row, element, cell) in + cell.textLabel?.text = "\(element) @ row \(row)" + } + .addDisposableTo(disposeBag) */ - public func rx_itemsWithCellIdentifier + public func items (cellIdentifier: String, cellType: Cell.Type = Cell.self) - -> (source: O) - -> (configureCell: (Int, S.Generator.Element, Cell) -> Void) - -> Disposable { + -> (_ source: O) + -> (_ configureCell: @escaping (Int, S.Iterator.Element, Cell) -> Void) + -> Disposable + where O.E == S { return { source in return { configureCell in let dataSource = RxTableViewReactiveArrayDataSourceSequenceWrapper { (tv, i, item) in - let indexPath = NSIndexPath(forItem: i, inSection: 0) - let cell = tv.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath) as! Cell + let indexPath = IndexPath(item: i, section: 0) + let cell = tv.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as! Cell configureCell(i, item, cell) return cell } - return self.rx_itemsWithDataSource(dataSource)(source: source) + return self.items(dataSource: dataSource)(source) } } } - + + /** Binds sequences of elements to table view rows using a custom reactive data used to perform the transformation. + This method will retain the data source for as long as the subscription isn't disposed (result `Disposable` + being disposed). + In case `source` observable sequence terminates sucessfully, the data source will present latest element + until the subscription isn't disposed. - parameter dataSource: Data source used to transform elements to view cells. - parameter source: Observable sequence of items. - returns: Disposable object that can be used to unbind. + + Example + + let dataSource = RxTableViewSectionedReloadDataSource>() + + let items = Observable.just([ + SectionModel(model: "First section", items: [ + 1.0, + 2.0, + 3.0 + ]), + SectionModel(model: "Second section", items: [ + 1.0, + 2.0, + 3.0 + ]), + SectionModel(model: "Third section", items: [ + 1.0, + 2.0, + 3.0 + ]) + ]) + + dataSource.configureCell = { (dataSource, tv, indexPath, element) in + let cell = tv.dequeueReusableCell(withIdentifier: "Cell")! + cell.textLabel?.text = "\(element) @ row \(indexPath.row)" + return cell + } + + items + .bindTo(tableView.rx.items(dataSource: dataSource)) + .addDisposableTo(disposeBag) */ - public func rx_itemsWithDataSource, S: SequenceType, O: ObservableType where DataSource.Element == S, O.E == S> + public func items< + DataSource: RxTableViewDataSourceType & UITableViewDataSource, + O: ObservableType> (dataSource: DataSource) - -> (source: O) - -> Disposable { + -> (_ source: O) + -> Disposable + where DataSource.Element == O.E { return { source in - return source.subscribeProxyDataSourceForObject(self, dataSource: dataSource, retainDataSource: false) { [weak self] (_: RxTableViewDataSourceProxy, event) -> Void in - guard let tableView = self else { + // This is called for sideeffects only, and to make sure delegate proxy is in place when + // data source is being bound. + // This is needed because theoretically the data source subscription itself might + // call `self.rx.delegate`. If that happens, it might cause weird side effects since + // setting data source will set delegate, and UITableView might get into a weird state. + // Therefore it's better to set delegate proxy first, just to be sure. + _ = self.delegate + // Strong reference is needed because data source is in use until result subscription is disposed + return source.subscribeProxyDataSource(ofObject: self.base, dataSource: dataSource, retainDataSource: true) { [weak tableView = self.base] (_: RxTableViewDataSourceProxy, event) -> Void in + guard let tableView = tableView else { return } dataSource.tableView(tableView, observedEvent: event) } } } + } extension UITableView { /** - Factory method that enables subclasses to implement their own `rx_delegate`. + Factory method that enables subclasses to implement their own `delegate`. - returns: Instance of delegate proxy that wraps `delegate`. */ - public override func rx_createDelegateProxy() -> RxScrollViewDelegateProxy { + public override func createRxDelegateProxy() -> RxScrollViewDelegateProxy { return RxTableViewDelegateProxy(parentObject: self) } /** - Factory method that enables subclasses to implement their own `rx_dataSource`. + Factory method that enables subclasses to implement their own `rx.dataSource`. - returns: Instance of delegate proxy that wraps `dataSource`. */ - public func rx_createDataSourceProxy() -> RxTableViewDataSourceProxy { + public func createRxDataSourceProxy() -> RxTableViewDataSourceProxy { return RxTableViewDataSourceProxy(parentObject: self) } - + +} + +extension Reactive where Base: UITableView { /** Reactive wrapper for `dataSource`. For more information take a look at `DelegateProxyType` protocol documentation. */ - public var rx_dataSource: DelegateProxy { - return proxyForObject(RxTableViewDataSourceProxy.self, self) + public var dataSource: DelegateProxy { + return RxTableViewDataSourceProxy.proxyForObject(base) } /** - Installs data source as forwarding delegate on `rx_dataSource`. + Installs data source as forwarding delegate on `rx.dataSource`. + Data source won't be retained. It enables using normal delegate mechanism with reactive delegate mechanism. - + - parameter dataSource: Data source object. - returns: Disposable object that can be used to unbind the data source. */ - public func rx_setDataSource(dataSource: UITableViewDataSource) + public func setDataSource(_ dataSource: UITableViewDataSource) -> Disposable { - let proxy = proxyForObject(RxTableViewDataSourceProxy.self, self) - - return installDelegate(proxy, delegate: dataSource, retainDelegate: false, onProxyForObject: self) + return RxTableViewDataSourceProxy.installForwardDelegate(dataSource, retainDelegate: false, onProxyForObject: self.base) } // events @@ -134,10 +217,10 @@ extension UITableView { /** Reactive wrapper for `delegate` message `tableView:didSelectRowAtIndexPath:`. */ - public var rx_itemSelected: ControlEvent { - let source = rx_delegate.observe(#selector(UITableViewDelegate.tableView(_:didSelectRowAtIndexPath:))) + public var itemSelected: ControlEvent { + let source = self.delegate.methodInvoked(#selector(UITableViewDelegate.tableView(_:didSelectRowAt:))) .map { a in - return a[1] as! NSIndexPath + return try castOrThrow(IndexPath.self, a[1]) } return ControlEvent(events: source) @@ -146,10 +229,10 @@ extension UITableView { /** Reactive wrapper for `delegate` message `tableView:didDeselectRowAtIndexPath:`. */ - public var rx_itemDeselected: ControlEvent { - let source = rx_delegate.observe(#selector(UITableViewDelegate.tableView(_:didDeselectRowAtIndexPath:))) + public var itemDeselected: ControlEvent { + let source = self.delegate.methodInvoked(#selector(UITableViewDelegate.tableView(_:didDeselectRowAt:))) .map { a in - return a[1] as! NSIndexPath + return try castOrThrow(IndexPath.self, a[1]) } return ControlEvent(events: source) @@ -158,10 +241,10 @@ extension UITableView { /** Reactive wrapper for `delegate` message `tableView:accessoryButtonTappedForRowWithIndexPath:`. */ - public var rx_itemAccessoryButtonTapped: ControlEvent { - let source: Observable = rx_delegate.observe(#selector(UITableViewDelegate.tableView(_:accessoryButtonTappedForRowWithIndexPath:))) + public var itemAccessoryButtonTapped: ControlEvent { + let source: Observable = self.delegate.methodInvoked(#selector(UITableViewDelegate.tableView(_:accessoryButtonTappedForRowWith:))) .map { a in - return a[1] as! NSIndexPath + return try castOrThrow(IndexPath.self, a[1]) } return ControlEvent(events: source) @@ -170,13 +253,13 @@ extension UITableView { /** Reactive wrapper for `delegate` message `tableView:commitEditingStyle:forRowAtIndexPath:`. */ - public var rx_itemInserted: ControlEvent { - let source = rx_dataSource.observe(#selector(UITableViewDataSource.tableView(_:commitEditingStyle:forRowAtIndexPath:))) + public var itemInserted: ControlEvent { + let source = self.dataSource.methodInvoked(#selector(UITableViewDataSource.tableView(_:commit:forRowAt:))) .filter { a in - return UITableViewCellEditingStyle(rawValue: (a[1] as! NSNumber).integerValue) == .Insert + return UITableViewCellEditingStyle(rawValue: (try castOrThrow(NSNumber.self, a[1])).intValue) == .insert } .map { a in - return (a[2] as! NSIndexPath) + return (try castOrThrow(IndexPath.self, a[2])) } return ControlEvent(events: source) @@ -185,13 +268,13 @@ extension UITableView { /** Reactive wrapper for `delegate` message `tableView:commitEditingStyle:forRowAtIndexPath:`. */ - public var rx_itemDeleted: ControlEvent { - let source = rx_dataSource.observe(#selector(UITableViewDataSource.tableView(_:commitEditingStyle:forRowAtIndexPath:))) + public var itemDeleted: ControlEvent { + let source = self.dataSource.methodInvoked(#selector(UITableViewDataSource.tableView(_:commit:forRowAt:))) .filter { a in - return UITableViewCellEditingStyle(rawValue: (a[1] as! NSNumber).integerValue) == .Delete + return UITableViewCellEditingStyle(rawValue: (try castOrThrow(NSNumber.self, a[1])).intValue) == .delete } .map { a in - return (a[2] as! NSIndexPath) + return try castOrThrow(IndexPath.self, a[2]) } return ControlEvent(events: source) @@ -200,33 +283,57 @@ extension UITableView { /** Reactive wrapper for `delegate` message `tableView:moveRowAtIndexPath:toIndexPath:`. */ - public var rx_itemMoved: ControlEvent { - let source: Observable = rx_dataSource.observe(#selector(UITableViewDataSource.tableView(_:moveRowAtIndexPath:toIndexPath:))) + public var itemMoved: ControlEvent { + let source: Observable = self.dataSource.methodInvoked(#selector(UITableViewDataSource.tableView(_:moveRowAt:to:))) .map { a in - return ((a[1] as! NSIndexPath), (a[2] as! NSIndexPath)) + return (try castOrThrow(IndexPath.self, a[1]), try castOrThrow(IndexPath.self, a[2])) } return ControlEvent(events: source) } - + + /** + Reactive wrapper for `delegate` message `tableView:willDisplayCell:forRowAtIndexPath:`. + */ + public var willDisplayCell: ControlEvent { + let source: Observable = self.delegate.methodInvoked(#selector(UITableViewDelegate.tableView(_:willDisplay:forRowAt:))) + .map { a in + return (try castOrThrow(UITableViewCell.self, a[1]), try castOrThrow(IndexPath.self, a[2])) + } + + return ControlEvent(events: source) + } + + /** + Reactive wrapper for `delegate` message `tableView:didEndDisplayingCell:forRowAtIndexPath:`. + */ + public var didEndDisplayingCell: ControlEvent { + let source: Observable = self.delegate.methodInvoked(#selector(UITableViewDelegate.tableView(_:didEndDisplaying:forRowAt:))) + .map { a in + return (try castOrThrow(UITableViewCell.self, a[1]), try castOrThrow(IndexPath.self, a[2])) + } + + return ControlEvent(events: source) + } + /** Reactive wrapper for `delegate` message `tableView:didSelectRowAtIndexPath:`. - It can be only used when one of the `rx_itemsWith*` methods is used to bind observable sequence, + It can be only used when one of the `rx.itemsWith*` methods is used to bind observable sequence, or any other data source conforming to `SectionedViewDataSourceType` protocol. ``` - tableView.rx_modelSelected(MyModel.self) + tableView.rx.modelSelected(MyModel.self) .map { ... ``` */ - public func rx_modelSelected(modelType: T.Type) -> ControlEvent { - let source: Observable = rx_itemSelected.flatMap { [weak self] indexPath -> Observable in - guard let view = self else { + public func modelSelected(_ modelType: T.Type) -> ControlEvent { + let source: Observable = self.itemSelected.flatMap { [weak view = self.base as UITableView] indexPath -> Observable in + guard let view = view else { return Observable.empty() } - return Observable.just(try view.rx_modelAtIndexPath(indexPath)) + return Observable.just(try view.rx.model(at: indexPath)) } return ControlEvent(events: source) @@ -235,21 +342,21 @@ extension UITableView { /** Reactive wrapper for `delegate` message `tableView:didDeselectRowAtIndexPath:`. - It can be only used when one of the `rx_itemsWith*` methods is used to bind observable sequence, + It can be only used when one of the `rx.itemsWith*` methods is used to bind observable sequence, or any other data source conforming to `SectionedViewDataSourceType` protocol. ``` - tableView.rx_modelDeselected(MyModel.self) + tableView.rx.modelDeselected(MyModel.self) .map { ... ``` */ - public func rx_modelDeselected(modelType: T.Type) -> ControlEvent { - let source: Observable = rx_itemDeselected.flatMap { [weak self] indexPath -> Observable in - guard let view = self else { + public func modelDeselected(_ modelType: T.Type) -> ControlEvent { + let source: Observable = self.itemDeselected.flatMap { [weak view = self.base as UITableView] indexPath -> Observable in + guard let view = view else { return Observable.empty() } - return Observable.just(try view.rx_modelAtIndexPath(indexPath)) + return Observable.just(try view.rx.model(at: indexPath)) } return ControlEvent(events: source) @@ -258,10 +365,10 @@ extension UITableView { /** Synchronous helper method for retrieving a model at indexPath through a reactive data source. */ - public func rx_modelAtIndexPath(indexPath: NSIndexPath) throws -> T { - let dataSource: SectionedViewDataSourceType = castOrFatalError(self.rx_dataSource.forwardToDelegate(), message: "This method only works in case one of the `rx_items*` methods was used.") + public func model(at indexPath: IndexPath) throws -> T { + let dataSource: SectionedViewDataSourceType = castOrFatalError(self.dataSource.forwardToDelegate(), message: "This method only works in case one of the `rx.items*` methods was used.") - let element = try dataSource.modelAtIndexPath(indexPath) + let element = try dataSource.model(at: indexPath) return castOrFatalError(element) } @@ -271,17 +378,17 @@ extension UITableView { #if os(tvOS) - extension UITableView { + extension Reactive where Base: UITableView { /** Reactive wrapper for `delegate` message `tableView:didUpdateFocusInContext:withAnimationCoordinator:`. */ - public var rx_didUpdateFocusInContextWithAnimationCoordinator: ControlEvent<(context: UIFocusUpdateContext, animationCoordinator: UIFocusAnimationCoordinator)> { + public var didUpdateFocusInContextWithAnimationCoordinator: ControlEvent<(context: UIFocusUpdateContext, animationCoordinator: UIFocusAnimationCoordinator)> { - let source = rx_delegate.observe(#selector(UITableViewDelegate.tableView(_:didUpdateFocusInContext:withAnimationCoordinator:))) + let source = delegate.methodInvoked(#selector(UITableViewDelegate.tableView(_:didUpdateFocusIn:with:))) .map { a -> (context: UIFocusUpdateContext, animationCoordinator: UIFocusAnimationCoordinator) in let context = a[1] as! UIFocusUpdateContext - let animationCoordinator = a[2] as! UIFocusAnimationCoordinator + let animationCoordinator = try castOrThrow(UIFocusAnimationCoordinator.self, a[2]) return (context: context, animationCoordinator: animationCoordinator) } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITextField+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITextField+Rx.swift index 35f888f..e96ae6b 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITextField+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITextField+Rx.swift @@ -14,18 +14,25 @@ import RxSwift #endif import UIKit -extension UITextField { +extension Reactive where Base: UITextField { + /// Reactive wrapper for `text` property. + public var text: ControlProperty { + return value + } - /** - Reactive wrapper for `text` property. - */ - public var rx_text: ControlProperty { - return UIControl.rx_value( - self, + /// Reactive wrapper for `text` property. + public var value: ControlProperty { + return UIControl.rx.value( + base, getter: { textField in - textField.text ?? "" + textField.text }, setter: { textField, value in - textField.text = value + // This check is important because setting text value always clears control state + // including marked text selection which is imporant for proper input + // when IME input method is used. + if textField.text != value { + textField.text = value + } } ) } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITextView+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITextView+Rx.swift index 06389f3..c4ad8cf 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITextView+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UITextView+Rx.swift @@ -18,48 +18,87 @@ import RxSwift extension UITextView { - /** - Factory method that enables subclasses to implement their own `rx_delegate`. - - - returns: Instance of delegate proxy that wraps `delegate`. - */ - public override func rx_createDelegateProxy() -> RxScrollViewDelegateProxy { + /// Factory method that enables subclasses to implement their own `delegate`. + /// + /// - returns: Instance of delegate proxy that wraps `delegate`. + public override func createRxDelegateProxy() -> RxScrollViewDelegateProxy { return RxTextViewDelegateProxy(parentObject: self) } +} + +extension Reactive where Base: UITextView { + /// Reactive wrapper for `text` property + public var text: ControlProperty { + return value + } - /** - Reactive wrapper for `text` property. - */ - public var rx_text: ControlProperty { - let source: Observable = Observable.deferred { [weak self] in - let text = self?.text ?? "" + /// Reactive wrapper for `text` property. + public var value: ControlProperty { + let source: Observable = Observable.deferred { [weak textView = self.base] in + let text = textView?.text - let textChanged = self?.textStorage + let textChanged = textView?.textStorage // This project uses text storage notifications because // that's the only way to catch autocorrect changes // in all cases. Other suggestions are welcome. - .rx_didProcessEditingRangeChangeInLength + .rx.didProcessEditingRangeChangeInLength // This observe on is here because text storage // will emit event while process is not completely done, // so rebinding a value will cause an exception to be thrown. .observeOn(MainScheduler.asyncInstance) .map { _ in - return self?.textStorage.string ?? "" + return textView?.textStorage.string } ?? Observable.empty() return textChanged .startWith(text) - .distinctUntilChanged() } - let bindingObserver = UIBindingObserver(UIElement: self) { (textView, text: String) in - textView.text = text + let bindingObserver = UIBindingObserver(UIElement: self.base) { (textView, text: String?) in + // This check is important because setting text value always clears control state + // including marked text selection which is imporant for proper input + // when IME input method is used. + if textView.text != text { + textView.text = text + } } return ControlProperty(values: source, valueSink: bindingObserver) } - + + /// Reactive wrapper for `delegate` message. + public var didBeginEditing: ControlEvent<()> { + return ControlEvent<()>(events: self.delegate.methodInvoked(#selector(UITextViewDelegate.textViewDidBeginEditing(_:))) + .map { a in + return () + }) + } + + /// Reactive wrapper for `delegate` message. + public var didEndEditing: ControlEvent<()> { + return ControlEvent<()>(events: self.delegate.methodInvoked(#selector(UITextViewDelegate.textViewDidEndEditing(_:))) + .map { a in + return () + }) + } + + /// Reactive wrapper for `delegate` message. + public var didChange: ControlEvent<()> { + return ControlEvent<()>(events: self.delegate.methodInvoked(#selector(UITextViewDelegate.textViewDidChange(_:))) + .map { a in + return () + }) + } + + /// Reactive wrapper for `delegate` message. + public var didChangeSelection: ControlEvent<()> { + return ControlEvent<()>(events: self.delegate.methodInvoked(#selector(UITextViewDelegate.textViewDidChangeSelection(_:))) + .map { a in + return () + }) + } + } #endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIView+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIView+Rx.swift index ea0ee82..f071d74 100644 --- a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIView+Rx.swift +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIView+Rx.swift @@ -1,6 +1,6 @@ // // UIView+Rx.swift -// Rx +// RxCocoa // // Created by Krunoslav Zaher on 12/6/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -14,23 +14,19 @@ import UIKit import RxSwift #endif -extension UIView { - /** - Bindable sink for `hidden` property. - */ - public var rx_hidden: AnyObserver { - return UIBindingObserver(UIElement: self) { view, hidden in - view.hidden = hidden - }.asObserver() +extension Reactive where Base: UIView { + /// Bindable sink for `hidden` property. + public var isHidden: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { view, hidden in + view.isHidden = hidden + } } - /** - Bindable sink for `alpha` property. - */ - public var rx_alpha: AnyObserver { - return UIBindingObserver(UIElement: self) { view, alpha in + /// Bindable sink for `alpha` property. + public var alpha: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { view, alpha in view.alpha = alpha - }.asObserver() + } } } diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIViewController+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIViewController+Rx.swift new file mode 100644 index 0000000..351549d --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIViewController+Rx.swift @@ -0,0 +1,28 @@ +// +// UIViewController+Rx.swift +// RxCocoa +// +// Created by Kyle Fuller on 27/05/2016. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +#if os(iOS) + import UIKit + +#if !RX_NO_MODULE + import RxSwift +#endif + + extension Reactive where Base: UIViewController { + + /// Bindable sink for `title`. + public var title: UIBindingObserver { + return UIBindingObserver(UIElement: self.base) { viewController, title in + viewController.title = title + } + } + + } +#endif diff --git a/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIWebView+Rx.swift b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIWebView+Rx.swift new file mode 100644 index 0000000..78a0b67 --- /dev/null +++ b/RxTableViewDemo/Pods/RxCocoa/RxCocoa/iOS/UIWebView+Rx.swift @@ -0,0 +1,55 @@ +// +// UIWebView+Rx.swift +// RxCocoa +// +// Created by Andrew Breckenridge on 8/30/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +#if os(iOS) + +import Foundation +import UIKit + +#if !RX_NO_MODULE +import RxSwift +#endif + +extension Reactive where Base: UIWebView { + + /** + Reactive wrapper for `delegate`. + For more information take a look at `DelegateProxyType` protocol documentation. + */ + public var delegate: DelegateProxy { + return RxWebViewDelegateProxy.proxyForObject(base) + } + /** + Reactive wrapper for `delegate` message. + */ + public var didStartLoad: Observable { + return delegate + .methodInvoked(#selector(UIWebViewDelegate.webViewDidStartLoad(_:))) + .map {_ in} + } + /** + Reactive wrapper for `delegate` message. + */ + public var didFinishLoad: Observable { + return delegate + .methodInvoked(#selector(UIWebViewDelegate.webViewDidFinishLoad(_:))) + .map {_ in} + } + /** + Reactive wrapper for `delegate` message. + */ + public var didFailLoad: Observable { + return delegate + .methodInvoked(#selector(UIWebViewDelegate.webView(_:didFailLoadWithError:))) + .map { a in + return try castOrThrow(Error.self, a[1]) + } + } +} + +#endif diff --git a/RxTableViewDemo/Pods/RxDataSources/README.md b/RxTableViewDemo/Pods/RxDataSources/README.md index ed119c1..8b5136c 100644 --- a/RxTableViewDemo/Pods/RxDataSources/README.md +++ b/RxTableViewDemo/Pods/RxDataSources/README.md @@ -1,42 +1,136 @@ +[![Travis CI](https://travis-ci.org/RxSwiftCommunity/RxDataSources.svg?branch=master)](https://travis-ci.org/RxSwiftCommunity/RxDataSources) + Table and Collection view data sources ====================================== -## Why +## Features + +- [x] **O(N)** algorithm for calculating differences + - the algorithm has the assumption that all sections and items are unique so there is no ambiguity + - in case there is ambiguity, fallbacks automagically on non animated refresh +- [x] it applies additional heuristics to send the least number of commands to sectioned view + - even though the running time is linear, preferred number of sent commands is usually a lot less then linear + - it is preferred (and possible) to cap the number of changes to some small number, and in case the number of changes grows towards linear, just do normal reload +- [x] Supports **extending your item and section structures** + - just extend your item with `IdentifiableType` and `Equatable`, and your section with `AnimatableSectionModelType` +- [x] Supports all combinations of two level hierarchical animations for **both sections and items** + - Section animations: Insert, Delete, Move + - Item animations: Insert, Delete, Move, Reload (if old value is not equal to new value) +- [x] Configurable animation types for `Insert`, `Reload` and `Delete` (Automatic, Fade, ...) +- [x] Example app +- [x] Randomized stress tests (example app) +- [x] Supports editing out of the box (example app) +- [x] Works with `UITableView` and `UICollectionView` +## Why Writing table and collection view data sources is tedious. There is a large number of delegate methods that need to be implemented for the simplest case possible. -The problem is even bigger when table view or collection view needs to display animated updates. +RxSwift helps alleviate some of the burden with a simple data binding mechanism: +1) Turn your data into an Observable sequence +2) Bind the data to the tableView/collectionView using one of: + - `rx.items(dataSource:protocol)` + - `rx.items(cellIdentifier:String)` + - `rx.items(cellIdentifier:String:Cell.Type:_:)` + - `rx.items(_:_:)` + +```swift +let data = Observable<[String]>.just(["first element", "second element", "third element"]) + +data.bindTo(tableView.rx.items(cellIdentifier: "Cell")) { index, model, cell in + cell.textLabel?.text = model +} +.addDisposableTo(disposeBag) +``` + +This works well with simple data sets but does not handle cases where you need to bind complex data sets with multiples sections, or when you need to perform animations when adding/modifying/deleting items. -This project makes it super easy to just write +These are precisely the use cases that RxDataSources helps solve. + +With RxDataSources, it is super easy to just write ```swift -dataSequence - .bindTo(tableView.rx_itemsWithDataSource(dataSource)) +let dataSource = RxTableViewSectionedReloadDataSource>() +Observable.just([SectionModel(model: "title", items: [1, 2, 3])]) + .bindTo(tableView.rx.items(dataSource: dataSource)) .addDisposableTo(disposeBag) ``` +![RxDataSources example app](https://raw.githubusercontent.com/kzaher/rxswiftcontent/rxdatasources/RxDataSources.gif) + +## How +Given the following custom data structure: +```swift +struct CustomData { + var anInt: Int + var aString: String + var aCGPoint: CGPoint +} +``` + +1) Start by defining your sections with a struct that conforms to the `SectionModelType` protocol: + - define the `Item` typealias: equal to the type of items that the section will contain + - declare an `items` property: of type array of `Item` -where data source is defined as +```swift +struct SectionOfCustomData { + var header: String + var items: [Item] +} +extension SectionOfCustomData: SectionModelType { + typealias Item = CustomData + + init(original: SectionOfCustomData, items: [Item]) { + self = original + self.items = items + } +} +``` +2) Create a dataSource object and pass it your `SectionOfCustomData` type: +```swift +let dataSource = RxTableViewSectionedReloadDataSource() ``` -let dataSource = RxTableViewSectionedReloadDataSource() -dataSource.cellFactory = { (tv, ip, i) in - let cell = tv.dequeueReusableCellWithIdentifier("Cell") ?? UITableViewCell(style:.Default, reuseIdentifier: "Cell") - cell.textLabel!.text = "\(i)" - return cell + +3) Customize closures on the dataSource as needed: +- `configureCell` (required) +- `titleForHeaderInSection` +- `titleForFooterInSection` +- etc + +```swift +dataSource.configureCell = { ds, tv, ip, item in + let cell = tv.dequeueReusableCell(withIdentifier: "Cell", for: ip) + cell.textLabel?.text = "Item \(item.anInt): \(item.aString) - \(item.aCGPoint.x):\(item.aCGPoint.y)" + return cell +} +dataSource.titleForHeaderInSection = { ds, index in + return ds.sectionModels[index].header } ``` -### Animated table and collection view updates +4) Define the actual data as an Observable sequence of CustomData objects and bind it to the tableView +```swift +let sections = [ + SectionOfCustomData(header: "First section", items: [CustomData(anInt: 0, aString: "zero", aCGPoint: CGPoint.zero), CustomData(anInt: 1, aString: "one", aCGPoint: CGPoint(x: 1, y: 1)) ]), + SectionOfCustomData(header: "Second section", items: [CustomData(anInt: 2, aString: "two", aCGPoint: CGPoint(x: 2, y: 2)), CustomData(anInt: 3, aString: "three", aCGPoint: CGPoint(x: 3, y: 3)) ]) +] + +Observable.just(sections) + .bindTo(tableView.rx.items(dataSource: dataSource)) + .addDisposableTo(disposeBag) +``` + -**For the animated data sources to be able to detect identity and changes of objects, your section needs to conform to `AnimatableSectionModelType` or you can just use `AnimatableSectionModel`. Demonstration how to use them and implement `AnimatableSectionModelType` is contained inside the Example app.** +### Animations +To implement animations with RxDataSources, the same steps are required as with non-animated data, execept: +- SectionOfCustomData needs to conform to `AnimatableSectionModelType` +- dataSource needs to be an instance of `RxTableViewSectionedAnimatedDataSource` or `RxCollectionViewSectionedAnimatedDataSource` -In case you want to use animated data sources, just replace -`let dataSource = RxTableViewSectionedReloadDataSource()` with
`let dataSource = RxTableViewSectionedAnimatedDataSource()` +## Requirements -and +Xcode 8.0 GM (8A218a) -` .bindTo(tableView.rx_itemsWithDataSource(dataSource))` with
`.bindTo(tableView.rx_itemsAnimatedWithDataSource(dataSource)) ` +For Swift 2.3 version please use versions `0.1 ... 0.9` ## Installation @@ -46,12 +140,12 @@ and Podfile ``` -pod 'RxDataSources', '~> 0.4' +pod 'RxDataSources', '~> 1.0' ``` ### Carthage Cartfile ``` -github "RxSwiftCommunity/RxDataSources" +github "RxSwiftCommunity/RxDataSources" ~> 1.0 ``` diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxCollectionViewSectionedAnimatedDataSource.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxCollectionViewSectionedAnimatedDataSource.swift index 3489378..6063054 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxCollectionViewSectionedAnimatedDataSource.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxCollectionViewSectionedAnimatedDataSource.swift @@ -13,7 +13,11 @@ import RxSwift import RxCocoa #endif -public class RxCollectionViewSectionedAnimatedDataSource +/* + This is commented becuse collection view has bugs when doing animated updates. + Take a look at randomized sections. +*/ +open class RxCollectionViewSectionedAnimatedDataSource : CollectionViewSectionedDataSource , RxCollectionViewDataSourceType { public typealias Element = [S] @@ -23,36 +27,74 @@ public class RxCollectionViewSectionedAnimatedDataSource)>() + public override init() { super.init() + + self.partialUpdateEvent + // so in case it does produce a crash, it will be after the data has changed + .observeOn(MainScheduler.asyncInstance) + // Collection view has issues digesting fast updates, this should + // help to alleviate the issues with them. + .throttle(0.5, scheduler: MainScheduler.instance) + .subscribe(onNext: { [weak self] event in + self?.collectionView(event.0, throttledObservedEvent: event.1) + }) + .addDisposableTo(disposeBag) } - - public func collectionView(collectionView: UICollectionView, observedEvent: Event) { + + /** + This method exists because collection view updates are throttled because of internal collection view bugs. + Collection view behaves poorly during fast updates, so this should remedy those issues. + */ + open func collectionView(_ collectionView: UICollectionView, throttledObservedEvent event: Event) { + UIBindingObserver(UIElement: self) { dataSource, newSections in + let oldSections = dataSource.sectionModels + do { + // if view is not in view hierarchy, performing batch updates will crash the app + if collectionView.window == nil { + collectionView.reloadData() + return + } + let differences = try differencesForSectionedView(initialSections: oldSections, finalSections: newSections) + + for difference in differences { + dataSource.setSections(difference.finalSections) + + collectionView.performBatchUpdates(difference, animationConfiguration: self.animationConfiguration) + } + } + catch let e { + #if DEBUG + print("Error while binding data animated: \(e)\nFallback to normal `reloadData` behavior.") + rxDebugFatalError(e) + #endif + self.setSections(newSections) + collectionView.reloadData() + } + }.on(event) + } + + open func collectionView(_ collectionView: UICollectionView, observedEvent: Event) { UIBindingObserver(UIElement: self) { dataSource, newSections in + #if DEBUG + self._dataSourceBound = true + #endif if !self.dataSet { self.dataSet = true dataSource.setSections(newSections) collectionView.reloadData() } else { - dispatch_async(dispatch_get_main_queue()) { - let oldSections = dataSource.sectionModels - do { - let differences = try differencesForSectionedView(oldSections, finalSections: newSections) - - for difference in differences { - dataSource.setSections(difference.finalSections) - - collectionView.performBatchUpdates(difference, animationConfiguration: self.animationConfiguration) - } - } - catch let e { - rxDebugFatalError(e) - self.setSections(newSections) - collectionView.reloadData() - } - } + let element = (collectionView, observedEvent) + dataSource.partialUpdateEvent.on(.next(element)) } }.on(observedEvent) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxCollectionViewSectionedReloadDataSource.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxCollectionViewSectionedReloadDataSource.swift index 9af39aa..1b422ad 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxCollectionViewSectionedReloadDataSource.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxCollectionViewSectionedReloadDataSource.swift @@ -13,7 +13,7 @@ import RxSwift import RxCocoa #endif -public class RxCollectionViewSectionedReloadDataSource +open class RxCollectionViewSectionedReloadDataSource : CollectionViewSectionedDataSource , RxCollectionViewDataSourceType { @@ -23,10 +23,13 @@ public class RxCollectionViewSectionedReloadDataSource super.init() } - public func collectionView(collectionView: UICollectionView, observedEvent: Event) { + open func collectionView(_ collectionView: UICollectionView, observedEvent: Event) { UIBindingObserver(UIElement: self) { dataSource, element in + #if DEBUG + self._dataSourceBound = true + #endif dataSource.setSections(element) collectionView.reloadData() }.on(observedEvent) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxTableViewSectionedAnimatedDataSource.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxTableViewSectionedAnimatedDataSource.swift index 5aaba13..307f869 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxTableViewSectionedAnimatedDataSource.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/RxTableViewSectionedAnimatedDataSource.swift @@ -13,8 +13,8 @@ import RxSwift import RxCocoa #endif -public class RxTableViewSectionedAnimatedDataSource - : RxTableViewSectionedDataSource +open class RxTableViewSectionedAnimatedDataSource + : TableViewSectionedDataSource , RxTableViewDataSourceType { public typealias Element = [S] @@ -26,18 +26,26 @@ public class RxTableViewSectionedAnimatedDataSource) { + open func tableView(_ tableView: UITableView, observedEvent: Event) { UIBindingObserver(UIElement: self) { dataSource, newSections in + #if DEBUG + self._dataSourceBound = true + #endif if !self.dataSet { self.dataSet = true dataSource.setSections(newSections) tableView.reloadData() } else { - dispatch_async(dispatch_get_main_queue()) { + DispatchQueue.main.async { + // if view is not in view hierarchy, performing batch updates will crash the app + if tableView.window == nil { + tableView.reloadData() + return + } let oldSections = dataSource.sectionModels do { - let differences = try differencesForSectionedView(oldSections, finalSections: newSections) + let differences = try differencesForSectionedView(initialSections: oldSections, finalSections: newSections) for difference in differences { dataSource.setSections(difference.finalSections) @@ -54,4 +62,4 @@ public class RxTableViewSectionedAnimatedDataSource - : RxTableViewSectionedDataSource +open class RxTableViewSectionedReloadDataSource + : TableViewSectionedDataSource , RxTableViewDataSourceType { public typealias Element = [S] @@ -22,10 +22,13 @@ public class RxTableViewSectionedReloadDataSource super.init() } - public func tableView(tableView: UITableView, observedEvent: Event) { + open func tableView(_ tableView: UITableView, observedEvent: Event) { UIBindingObserver(UIElement: self) { dataSource, element in + #if DEBUG + self._dataSourceBound = true + #endif dataSource.setSections(element) tableView.reloadData() }.on(observedEvent) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/UISectionedViewType+RxAnimatedDataSource.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/UISectionedViewType+RxAnimatedDataSource.swift deleted file mode 100644 index 5b4bdda..0000000 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources+Rx/UISectionedViewType+RxAnimatedDataSource.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// UISectionedViewType+RxAnimatedDataSource.swift -// RxExample -// -// Created by Krunoslav Zaher on 11/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -import UIKit -#if !RX_NO_MODULE -import RxSwift -import RxCocoa -#endif - -extension UITableView { - @available(*, deprecated=0.7, renamed="rx_itemsWithDataSource", message="You can just use normal `rx_itemsWithDataSource` extension.") - public func rx_itemsAnimatedWithDataSource< - DataSource: protocol, - S: SequenceType, - O: ObservableType - where - DataSource.Element == S, - O.E == S, - S.Generator.Element: AnimatableSectionModelType - > - (dataSource: DataSource) - -> (source: O) - -> Disposable { - return { source in - return self.rx_itemsWithDataSource(dataSource)(source: source) - } - } -} - -extension UICollectionView { - @available(*, deprecated=0.7, renamed="rx_itemsWithDataSource", message="You can just use normal `rx_itemsWithDataSource` extension.") - public func rx_itemsAnimatedWithDataSource< - DataSource: protocol, - S: SequenceType, - O: ObservableType - where - DataSource.Element == S, - O.E == S, - S.Generator.Element: AnimatableSectionModelType - > - (dataSource: DataSource) - -> (source: O) - -> Disposable { - return { source in - return self.rx_itemsWithDataSource(dataSource)(source: source) - } - } -} \ No newline at end of file diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/AnimatableSectionModel.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/AnimatableSectionModel.swift index cb28684..8141a62 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/AnimatableSectionModel.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/AnimatableSectionModel.swift @@ -8,40 +8,42 @@ import Foundation -public struct AnimatableSectionModel - : Hashable - , AnimatableSectionModelType - , CustomStringConvertible { - public typealias Item = IdentifiableValue - public typealias Identity = Section - +public struct AnimatableSectionModel { public var model: Section - public var items: [Item] - public var identity: Section { - return model - } - public init(model: Section, items: [ItemType]) { self.model = model - self.items = items.map(IdentifiableValue.init) + self.items = items } +} + +extension AnimatableSectionModel + : AnimatableSectionModelType { + public typealias Item = ItemType + public typealias Identity = Section.Identity + + public var identity: Section.Identity { + return model.identity + } + public init(original: AnimatableSectionModel, items: [Item]) { self.model = original.model self.items = items } - public var description: String { - return "HashableSectionModel(model: \"\(self.model)\", items: \(items))" - } - public var hashValue: Int { - return self.model.hashValue + return self.model.identity.hashValue } } -public func == (lhs: AnimatableSectionModel, rhs: AnimatableSectionModel) -> Bool { - return lhs.model == rhs.model -} \ No newline at end of file + +extension AnimatableSectionModel + : CustomStringConvertible { + + public var description: String { + return "HashableSectionModel(model: \"\(self.model)\", items: \(items))" + } + +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/AnimationConfiguration.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/AnimationConfiguration.swift index b02ea96..7e05ef7 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/AnimationConfiguration.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/AnimationConfiguration.swift @@ -17,11 +17,11 @@ public struct AnimationConfiguration { let reloadAnimation: UITableViewRowAnimation let deleteAnimation: UITableViewRowAnimation - public init(insertAnimation: UITableViewRowAnimation = .Automatic, - reloadAnimation: UITableViewRowAnimation = .Automatic, - deleteAnimation: UITableViewRowAnimation = .Automatic) { + public init(insertAnimation: UITableViewRowAnimation = .automatic, + reloadAnimation: UITableViewRowAnimation = .automatic, + deleteAnimation: UITableViewRowAnimation = .automatic) { self.insertAnimation = insertAnimation self.reloadAnimation = reloadAnimation self.deleteAnimation = deleteAnimation } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Array+Extensions.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Array+Extensions.swift new file mode 100644 index 0000000..6d37809 --- /dev/null +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Array+Extensions.swift @@ -0,0 +1,29 @@ +// +// Array+Extensions.swift +// RxDataSources +// +// Created by Krunoslav Zaher on 4/26/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +import Foundation + +extension Array where Element: SectionModelType { + mutating func moveFromSourceIndexPath(_ sourceIndexPath: IndexPath, destinationIndexPath: IndexPath) { + let sourceSection = self[sourceIndexPath.section] + var sourceItems = sourceSection.items + + let sourceItem = sourceItems.remove(at: sourceIndexPath.item) + + let sourceSectionNew = Element(original: sourceSection, items: sourceItems) + self[sourceIndexPath.section] = sourceSectionNew + + let destinationSection = self[destinationIndexPath.section] + var destinationItems = destinationSection.items + destinationItems.insert(sourceItem, at: destinationIndexPath.item) + + self[destinationIndexPath.section] = Element(original: destinationSection, items: destinationItems) + } +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Changeset.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Changeset.swift index 2b7eca1..d8eb249 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Changeset.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Changeset.swift @@ -60,11 +60,11 @@ public struct Changeset { self.updatedItems = updatedItems } - public static func initialValue(sections: [S]) -> Changeset { + public static func initialValue(_ sections: [S]) -> Changeset { return Changeset( - insertedSections: Array(0 ..< sections.count) as [Int], + reloadData: true, finalSections: sections, - reloadData: true + insertedSections: Array(0 ..< sections.count) as [Int] ) } } @@ -80,7 +80,7 @@ extension Changeset : CustomDebugStringConvertible { public var debugDescription : String { - let serializedSections = "[\n" + finalSections.map { "\($0)" }.joinWithSeparator(",\n") + "\n]\n" + let serializedSections = "[\n" + finalSections.map { "\($0)" }.joined(separator: ",\n") + "\n]\n" return " >> Final sections" + " \n\(serializedSections)" + (insertedSections.count > 0 || deletedSections.count > 0 || movedSections.count > 0 || updatedSections.count > 0 ? "\nSections:" : "") diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/CollectionViewSectionedDataSource.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/CollectionViewSectionedDataSource.swift index 4498a14..9ac324d 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/CollectionViewSectionedDataSource.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/CollectionViewSectionedDataSource.swift @@ -12,67 +12,79 @@ import UIKit import RxCocoa #endif -public class _CollectionViewSectionedDataSource +open class _CollectionViewSectionedDataSource : NSObject , UICollectionViewDataSource { - func _numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { + open func _rx_numberOfSections(in collectionView: UICollectionView) -> Int { return 0 } - public func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { - return _numberOfSectionsInCollectionView(collectionView) + open func numberOfSections(in collectionView: UICollectionView) -> Int { + return _rx_numberOfSections(in: collectionView) } - func _collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + open func _rx_collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 0 } - public func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return _collectionView(collectionView, numberOfItemsInSection: section) + open func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return _rx_collectionView(collectionView, numberOfItemsInSection: section) } - func _collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { + open func _rx_collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { return (nil as UICollectionViewCell?)! } - public func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - return _collectionView(collectionView, cellForItemAtIndexPath: indexPath) + open func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + return _rx_collectionView(collectionView, cellForItemAt: indexPath) } - func _collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView { + open func _rx_collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: IndexPath) -> UICollectionReusableView { return (nil as UICollectionReusableView?)! } - public func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView { - return _collectionView(collectionView, viewForSupplementaryElementOfKind: kind, atIndexPath: indexPath) + open func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { + return _rx_collectionView(collectionView, viewForSupplementaryElementOfKind: kind, atIndexPath: indexPath) } - func _collectionView(collectionView: UICollectionView, canMoveItemAtIndexPath indexPath: NSIndexPath) -> Bool { - return false + open func _rx_collectionView(_ collectionView: UICollectionView, canMoveItemAt indexPath: IndexPath) -> Bool { + return true } - public func collectionView(collectionView: UICollectionView, canMoveItemAtIndexPath indexPath: NSIndexPath) -> Bool { - return _collectionView(collectionView, canMoveItemAtIndexPath: indexPath) + public func collectionView(_ collectionView: UICollectionView, canMoveItemAt indexPath: IndexPath) -> Bool { + return _rx_collectionView(collectionView, canMoveItemAt: indexPath) } - func _collectionView(collectionView: UICollectionView, moveItemAtIndexPath sourceIndexPath: NSIndexPath, toIndexPath destinationIndexPath: NSIndexPath) { + open func _rx_collectionView(_ collectionView: UICollectionView, moveItemAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { } - public func collectionView(collectionView: UICollectionView, moveItemAtIndexPath sourceIndexPath: NSIndexPath, toIndexPath destinationIndexPath: NSIndexPath) { - _collectionView(collectionView, moveItemAtIndexPath: sourceIndexPath, toIndexPath: destinationIndexPath) + public func collectionView(_ collectionView: UICollectionView, moveItemAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { + _rx_collectionView(collectionView, moveItemAt: sourceIndexPath, to: destinationIndexPath) } } -public class CollectionViewSectionedDataSource +open class CollectionViewSectionedDataSource : _CollectionViewSectionedDataSource , SectionedViewDataSourceType { public typealias I = S.Item public typealias Section = S - public typealias CellFactory = (CollectionViewSectionedDataSource, UICollectionView, NSIndexPath, I) -> UICollectionViewCell - public typealias SupplementaryViewFactory = (CollectionViewSectionedDataSource, UICollectionView, String, NSIndexPath) -> UICollectionReusableView + public typealias CellFactory = (CollectionViewSectionedDataSource, UICollectionView, IndexPath, I) -> UICollectionViewCell + public typealias SupplementaryViewFactory = (CollectionViewSectionedDataSource, UICollectionView, String, IndexPath) -> UICollectionReusableView + + #if DEBUG + // If data source has already been bound, then mutating it + // afterwards isn't something desired. + // This simulates immutability after binding + var _dataSourceBound: Bool = false + + private func ensureNotMutatedAfterBinding() { + assert(!_dataSourceBound, "Data source is already bound. Please write this line before binding call (`bindTo`, `drive`). Data source must first be completely configured, and then bound after that, otherwise there could be runtime bugs, glitches, or partial malfunctions.") + } + #endif + // This structure exists because model can be mutable // In that case current state value should be preserved. // The state that needs to be preserved is ordering of items in section @@ -83,40 +95,72 @@ public class CollectionViewSectionedDataSource private var _sectionModels: [SectionModelSnapshot] = [] - public var sectionModels: [S] { + open var sectionModels: [S] { return _sectionModels.map { Section(original: $0.model, items: $0.items) } } - public func sectionAtIndex(section: Int) -> S { + open subscript(section: Int) -> S { let sectionModel = self._sectionModels[section] return S(original: sectionModel.model, items: sectionModel.items) } - public func itemAtIndexPath(indexPath: NSIndexPath) -> I { - return self._sectionModels[indexPath.section].items[indexPath.item] + open subscript(indexPath: IndexPath) -> I { + get { + return self._sectionModels[indexPath.section].items[indexPath.item] + } + set(item) { + var section = self._sectionModels[indexPath.section] + section.items[indexPath.item] = item + self._sectionModels[indexPath.section] = section + } } - public func modelAtIndexPath(indexPath: NSIndexPath) throws -> Any { - return itemAtIndexPath(indexPath) + open func model(at indexPath: IndexPath) throws -> Any { + return self[indexPath] } - public func setSections(sections: [S]) { + open func setSections(_ sections: [S]) { self._sectionModels = sections.map { SectionModelSnapshot(model: $0, items: $0.items) } } - public var cellFactory: CellFactory! = nil - public var supplementaryViewFactory: SupplementaryViewFactory + open var configureCell: CellFactory! = nil { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } + + open var supplementaryViewFactory: SupplementaryViewFactory { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } - public var moveItem: ((CollectionViewSectionedDataSource, sourceIndexPath:NSIndexPath, destinationIndexPath:NSIndexPath) -> Void)? - public var canMoveItemAtIndexPath: ((CollectionViewSectionedDataSource, indexPath:NSIndexPath) -> Bool)? + open var moveItem: ((CollectionViewSectionedDataSource, _ sourceIndexPath:IndexPath, _ destinationIndexPath:IndexPath) -> Void)? { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } + open var canMoveItemAtIndexPath: ((CollectionViewSectionedDataSource, IndexPath) -> Bool)? { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } public override init() { - self.cellFactory = {_, _, _, _ in return (nil as UICollectionViewCell?)! } + self.configureCell = {_, _, _, _ in return (nil as UICollectionViewCell?)! } self.supplementaryViewFactory = {_, _, _, _ in (nil as UICollectionReusableView?)! } super.init() - self.cellFactory = { [weak self] _ in + self.configureCell = { [weak self] _ in precondition(false, "There is a minor problem. `cellFactory` property on \(self!) was not set. Please set it manually, or use one of the `rx_bindTo` methods.") return (nil as UICollectionViewCell!)! @@ -130,37 +174,35 @@ public class CollectionViewSectionedDataSource // UICollectionViewDataSource - override func _numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { + open override func _rx_numberOfSections(in collectionView: UICollectionView) -> Int { return _sectionModels.count } - override func _collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + open override func _rx_collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return _sectionModels[section].items.count } - override func _collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { + open override func _rx_collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { precondition(indexPath.item < _sectionModels[indexPath.section].items.count) - return cellFactory(self, collectionView, indexPath, itemAtIndexPath(indexPath)) + return configureCell(self, collectionView, indexPath, self[indexPath]) } - override func _collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView { + open override func _rx_collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: IndexPath) -> UICollectionReusableView { return supplementaryViewFactory(self, collectionView, kind, indexPath) } - override func _collectionView(collectionView: UICollectionView, canMoveItemAtIndexPath indexPath: NSIndexPath) -> Bool { - guard let canMoveItem = canMoveItemAtIndexPath?(self, indexPath: indexPath) else { - return super._collectionView(collectionView, canMoveItemAtIndexPath: indexPath) + open override func _rx_collectionView(_ collectionView: UICollectionView, canMoveItemAt indexPath: IndexPath) -> Bool { + guard let canMoveItem = canMoveItemAtIndexPath?(self, indexPath) else { + return super._rx_collectionView(collectionView, canMoveItemAt: indexPath) } return canMoveItem } - override func _collectionView(collectionView: UICollectionView, moveItemAtIndexPath sourceIndexPath: NSIndexPath, toIndexPath destinationIndexPath: NSIndexPath) { - guard let _ = moveItem?(self, sourceIndexPath:sourceIndexPath, destinationIndexPath: destinationIndexPath) else { - super._collectionView(collectionView, moveItemAtIndexPath: sourceIndexPath, toIndexPath: destinationIndexPath) - return - } + open override func _rx_collectionView(_ collectionView: UICollectionView, moveItemAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { + self._sectionModels.moveFromSourceIndexPath(sourceIndexPath, destinationIndexPath: destinationIndexPath) + self.moveItem?(self, sourceIndexPath, destinationIndexPath) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/DataSources.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/DataSources.swift index 64327b5..7a7c725 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/DataSources.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/DataSources.swift @@ -8,28 +8,28 @@ import Foundation -enum RxDataSourceError : ErrorType { - case UnwrappingOptional - case PreconditionFailed(message: String) +enum RxDataSourceError : Error { + case unwrappingOptional + case preconditionFailed(message: String) } -func rxPrecondition(condition: Bool, @autoclosure _ message: () -> String) throws -> () { +func rxPrecondition(_ condition: Bool, _ message: @autoclosure() -> String) throws -> () { if condition { return } rxDebugFatalError("Precondition failed") - throw RxDataSourceError.PreconditionFailed(message: message()) + throw RxDataSourceError.preconditionFailed(message: message()) } -func rxDebugFatalError(error: ErrorType) { +func rxDebugFatalError(_ error: Error) { rxDebugFatalError("\(error)") } -func rxDebugFatalError(message: String) { +func rxDebugFatalError(_ message: String) { #if DEBUG fatalError(message) #else print(message) #endif -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Differentiator.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Differentiator.swift index 02b34d0..2ecc4f4 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Differentiator.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Differentiator.swift @@ -9,64 +9,70 @@ import Foundation public enum DifferentiatorError - : ErrorType + : Error , CustomDebugStringConvertible { - case DuplicateItem(item: Any) - case DuplicateSection(section: Any) + case duplicateItem(item: Any) + case duplicateSection(section: Any) + case invalidInitializerImplementation(section: Any, expectedItems: Any, expectedIdentifier: Any) } extension DifferentiatorError { public var debugDescription: String { switch self { - case let .DuplicateItem(item): + case let .duplicateItem(item): return "Duplicate item \(item)" - case let .DuplicateSection(section): + case let .duplicateSection(section): return "Duplicate section \(section)" + case let .invalidInitializerImplementation(section, expectedItems, expectedIdentifier): + return "Wrong initializer implementation for: \(section)\n" + + "Expected it should return items: \(expectedItems)\n" + + "Expected it should have id: \(expectedIdentifier)" } } } -enum EditEvent : CustomDebugStringConvertible { - case Inserted // can't be found in old sections - case InsertedAutomatically // Item inside section being inserted - case Deleted // Was in old, not in new, in it's place is something "not new" :(, otherwise it's Updated - case DeletedAutomatically // Item inside section that is being deleted - case Moved // same item, but was on different index, and needs explicit move - case MovedAutomatically // don't need to specify any changes for those rows - case Untouched +fileprivate enum EditEvent : CustomDebugStringConvertible { + case inserted // can't be found in old sections + case insertedAutomatically // Item inside section being inserted + case deleted // Was in old, not in new, in it's place is something "not new" :(, otherwise it's Updated + case deletedAutomatically // Item inside section that is being deleted + case moved // same item, but was on different index, and needs explicit move + case movedAutomatically // don't need to specify any changes for those rows + case untouched } extension EditEvent { - var debugDescription: String { + fileprivate var debugDescription: String { get { switch self { - case .Inserted: + case .inserted: return "Inserted" - case .InsertedAutomatically: + case .insertedAutomatically: return "InsertedAutomatically" - case .Deleted: + case .deleted: return "Deleted" - case .DeletedAutomatically: + case .deletedAutomatically: return "DeletedAutomatically" - case .Moved: + case .moved: return "Moved" - case .MovedAutomatically: + case .movedAutomatically: return "MovedAutomatically" - case .Untouched: + case .untouched: return "Untouched" } } } } -struct SectionAssociatedData { +fileprivate struct SectionAssociatedData { var event: EditEvent var indexAfterDelete: Int? var moveIndex: Int? + var itemCount: Int } extension SectionAssociatedData : CustomDebugStringConvertible { - var debugDescription: String { + fileprivate var debugDescription: String { get { return "\(event), \(indexAfterDelete)" } @@ -74,19 +80,19 @@ extension SectionAssociatedData : CustomDebugStringConvertible { } extension SectionAssociatedData { - static var initial: SectionAssociatedData { - return SectionAssociatedData(event: .Untouched, indexAfterDelete: nil, moveIndex: nil) + fileprivate static var initial: SectionAssociatedData { + return SectionAssociatedData(event: .untouched, indexAfterDelete: nil, moveIndex: nil, itemCount: 0) } } -struct ItemAssociatedData { +fileprivate struct ItemAssociatedData { var event: EditEvent var indexAfterDelete: Int? var moveIndex: ItemPath? } extension ItemAssociatedData : CustomDebugStringConvertible { - var debugDescription: String { + fileprivate var debugDescription: String { get { return "\(event) \(indexAfterDelete)" } @@ -95,18 +101,20 @@ extension ItemAssociatedData : CustomDebugStringConvertible { extension ItemAssociatedData { static var initial : ItemAssociatedData { - return ItemAssociatedData(event: .Untouched, indexAfterDelete: nil, moveIndex: nil) + return ItemAssociatedData(event: .untouched, indexAfterDelete: nil, moveIndex: nil) } } -func indexSections(sections: [S]) throws -> [S.Identity : Int] { +fileprivate func indexSections(_ sections: [S]) throws -> [S.Identity : Int] { var indexedSections: [S.Identity : Int] = [:] - for (i, section) in sections.enumerate() { + for (i, section) in sections.enumerated() { guard indexedSections[section.identity] == nil else { #if DEBUG - precondition(indexedSections[section.identity] == nil, "Section \(section) has already been indexed at \(indexedSections[section.identity]!)") + if indexedSections[section.identity] != nil { + print("Section \(section) has already been indexed at \(indexedSections[section.identity]!)") + } #endif - throw DifferentiatorError.DuplicateItem(item: section) + throw DifferentiatorError.duplicateSection(section: section) } indexedSections[section.identity] = i } @@ -114,30 +122,113 @@ func indexSections(sections: [S]) throws -> [S.Id return indexedSections } -func indexSectionItems(sections: [S]) throws -> [S.Item.Identity : (Int, Int)] { - var totalItems = 0 - for i in 0 ..< sections.count { - totalItems += sections[i].items.count +//================================================================================ +// Optimizations because Swift dictionaries are extremely slow (ARC, bridging ...) +//================================================================================ +// swift dictionary optimizations { + +fileprivate struct OptimizedIdentity { + let hashValue: Int + let identity: UnsafePointer + + init(_ identity: UnsafePointer) { + self.identity = identity + self.hashValue = identity.pointee.hashValue } - - // let's make sure it's enough - var indexedItems: [S.Item.Identity : (Int, Int)] = Dictionary(minimumCapacity: totalItems * 3) - - for i in 0 ..< sections.count { - for (j, item) in sections[i].items.enumerate() { - guard indexedItems[item.identity] == nil else { +} + +extension OptimizedIdentity: Hashable { + +} + +fileprivate func == (lhs: OptimizedIdentity, rhs: OptimizedIdentity) -> Bool { + if lhs.hashValue != rhs.hashValue { + return false + } + + if lhs.identity.distance(to: rhs.identity) == 0 { + return true + } + + return lhs.identity.pointee == rhs.identity.pointee +} + +fileprivate func calculateAssociatedData( + initialItemCache: ContiguousArray>, + finalItemCache: ContiguousArray> + ) throws + -> (ContiguousArray>, ContiguousArray>) { + + typealias Identity = Item.Identity + let totalInitialItems = initialItemCache.map { $0.count }.reduce(0, +) + + var initialIdentities: ContiguousArray = ContiguousArray() + var initialItemPaths: ContiguousArray = ContiguousArray() + + initialIdentities.reserveCapacity(totalInitialItems) + initialItemPaths.reserveCapacity(totalInitialItems) + + for (i, items) in initialItemCache.enumerated() { + for j in 0 ..< items.count { + let item = items[j] + initialIdentities.append(item.identity) + initialItemPaths.append(ItemPath(sectionIndex: i, itemIndex: j)) + } + } + + var initialItemData = ContiguousArray(initialItemCache.map { items in + return ContiguousArray(repeating: ItemAssociatedData.initial, count: items.count) + }) + + var finalItemData = ContiguousArray(finalItemCache.map { items in + return ContiguousArray(repeating: ItemAssociatedData.initial, count: items.count) + }) + + try initialIdentities.withUnsafeBufferPointer { (identitiesBuffer: UnsafeBufferPointer) -> () in + var dictionary: [OptimizedIdentity: Int] = Dictionary(minimumCapacity: totalInitialItems * 2) + + for i in 0 ..< initialIdentities.count { + let identityPointer = identitiesBuffer.baseAddress!.advanced(by: i) + + let key = OptimizedIdentity(identityPointer) + + if let existingValueItemPathIndex = dictionary[key] { + let itemPath = initialItemPaths[existingValueItemPathIndex] + let item = initialItemCache[itemPath.sectionIndex][itemPath.itemIndex] #if DEBUG - precondition(indexedItems[item.identity] == nil, "Item \(item) has already been indexed at \(indexedItems[item.identity]!)" ) + print("Item \(item) has already been indexed at \(itemPath)" ) #endif - throw DifferentiatorError.DuplicateItem(item: item) + throw DifferentiatorError.duplicateItem(item: item) } - indexedItems[item.identity] = (i, j) + + dictionary[key] = i } + + for (i, items) in finalItemCache.enumerated() { + for j in 0 ..< items.count { + let item = items[j] + var identity = item.identity + let key = OptimizedIdentity(&identity) + guard let initialItemPathIndex = dictionary[key] else { + continue + } + let itemPath = initialItemPaths[initialItemPathIndex] + if initialItemData[itemPath.sectionIndex][itemPath.itemIndex].moveIndex != nil { + throw DifferentiatorError.duplicateItem(item: item) + } + + initialItemData[itemPath.sectionIndex][itemPath.itemIndex].moveIndex = ItemPath(sectionIndex: i, itemIndex: j) + finalItemData[i][j].moveIndex = itemPath + } + } + + return () } - - return indexedItems + + return (initialItemData, finalItemData) } +// } swift dictionary optimizations /* @@ -263,9 +354,8 @@ to = [ // There maybe exists a better division, but time will tell. // public func differencesForSectionedView( - initialSections: [S], - finalSections: [S] - ) + initialSections: [S], + finalSections: [S]) throws -> [Changeset] { typealias I = S.Item @@ -273,31 +363,65 @@ public func differencesForSectionedView( var sectionCommands = try CommandGenerator.generatorForInitialSections(initialSections, finalSections: finalSections) - result.appendContentsOf(try sectionCommands.generateDeleteSections()) - result.appendContentsOf(try sectionCommands.generateInsertAndMoveSections()) - result.appendContentsOf(try sectionCommands.generateNewAndMovedItems()) + result.append(contentsOf: try sectionCommands.generateDeleteSectionsDeletedItemsAndUpdatedItems()) + result.append(contentsOf: try sectionCommands.generateInsertAndMoveSections()) + result.append(contentsOf: try sectionCommands.generateInsertAndMovedItems()) return result } -struct CommandGenerator { + +@available(*, deprecated, renamed: "differencesForSectionedView(initialSections:finalSections:)") +public func differencesForSectionedView( + _ initialSections: [S], + finalSections: [S]) + throws -> [Changeset] { + return try differencesForSectionedView(initialSections: initialSections, finalSections: finalSections) +} + +private extension AnimatableSectionModelType { + init(safeOriginal: Self, safeItems: [Item]) throws { + self.init(original: safeOriginal, items: safeItems) + + if self.items != safeItems || self.identity != safeOriginal.identity { + throw DifferentiatorError.invalidInitializerImplementation(section: self, expectedItems: safeItems, expectedIdentifier: safeOriginal.identity) + } + } +} + +fileprivate struct CommandGenerator { + typealias Item = S.Item + let initialSections: [S] let finalSections: [S] - let initialSectionData: [SectionAssociatedData] - let finalSectionData: [SectionAssociatedData] + let initialSectionData: ContiguousArray + let finalSectionData: ContiguousArray - let initialItemData: [[ItemAssociatedData]] - let finalItemData: [[ItemAssociatedData]] + let initialItemData: ContiguousArray> + let finalItemData: ContiguousArray> + let initialItemCache: ContiguousArray> + let finalItemCache: ContiguousArray> + static func generatorForInitialSections( - initialSections: [S], + _ initialSections: [S], finalSections: [S] ) throws -> CommandGenerator { - let (initialSectionData, finalSectionData) = try calculateSectionMovementsForInitialSections(initialSections, finalSections: finalSections) - let (initialItemData, finalItemData) = try calculateItemMovementsForInitialSections(initialSections, - finalSections: finalSections, + let (initialSectionData, finalSectionData) = try calculateSectionMovements(initialSections: initialSections, finalSections: finalSections) + + let initialItemCache = ContiguousArray(initialSections.map { + ContiguousArray($0.items) + }) + + let finalItemCache = ContiguousArray(finalSections.map { + ContiguousArray($0.items) + }) + + let (initialItemData, finalItemData) = try calculateItemMovements( + initialItemCache: initialItemCache, + finalItemCache: finalItemCache, initialSectionData: initialSectionData, finalSectionData: finalSectionData ) @@ -310,43 +434,32 @@ struct CommandGenerator { finalSectionData: finalSectionData, initialItemData: initialItemData, - finalItemData: finalItemData + finalItemData: finalItemData, + + initialItemCache: initialItemCache, + finalItemCache: finalItemCache ) } - static func calculateItemMovementsForInitialSections(initialSections: [S], finalSections: [S], - initialSectionData: [SectionAssociatedData], finalSectionData: [SectionAssociatedData]) throws -> ([[ItemAssociatedData]], [[ItemAssociatedData]]) { - var initialItemData = initialSections.map { s in - return [ItemAssociatedData](count: s.items.count, repeatedValue: ItemAssociatedData.initial) - } - - var finalItemData = finalSections.map { s in - return [ItemAssociatedData](count: s.items.count, repeatedValue: ItemAssociatedData.initial) - } - - let initialItemIndexes = try indexSectionItems(initialSections) - - for i in 0 ..< finalSections.count { - for (j, item) in finalSections[i].items.enumerate() { - guard let initialItemIndex = initialItemIndexes[item.identity] else { - continue - } - if initialItemData[initialItemIndex.0][initialItemIndex.1].moveIndex != nil { - throw DifferentiatorError.DuplicateItem(item: item) - } + static func calculateItemMovements( + initialItemCache: ContiguousArray>, + finalItemCache: ContiguousArray>, + initialSectionData: ContiguousArray, + finalSectionData: ContiguousArray) throws + -> (ContiguousArray>, ContiguousArray>) { - initialItemData[initialItemIndex.0][initialItemIndex.1].moveIndex = ItemPath(sectionIndex: i, itemIndex: j) - finalItemData[i][j].moveIndex = ItemPath(sectionIndex: initialItemIndex.0, itemIndex: initialItemIndex.1) - } - } + var (initialItemData, finalItemData) = try calculateAssociatedData( + initialItemCache: initialItemCache, + finalItemCache: finalItemCache + ) let findNextUntouchedOldIndex = { (initialSectionIndex: Int, initialSearchIndex: Int?) -> Int? in guard var i2 = initialSearchIndex else { return nil } - while i2 < initialSections[initialSectionIndex].items.count { - if initialItemData[initialSectionIndex][i2].event == .Untouched { + while i2 < initialSectionData[initialSectionIndex].itemCount { + if initialItemData[initialSectionIndex][i2].event == .untouched { return i2 } @@ -357,24 +470,24 @@ struct CommandGenerator { } // first mark deleted items - for i in 0 ..< initialSections.count { + for i in 0 ..< initialItemCache.count { guard let _ = initialSectionData[i].moveIndex else { continue } var indexAfterDelete = 0 - for j in 0 ..< initialSections[i].items.count { + for j in 0 ..< initialItemCache[i].count { guard let finalIndexPath = initialItemData[i][j].moveIndex else { - initialItemData[i][j].event = .Deleted + initialItemData[i][j].event = .deleted continue } // from this point below, section has to be move type because it's initial and not deleted // because there is no move to inserted section - if finalSectionData[finalIndexPath.sectionIndex].event == .Inserted { - initialItemData[i][j].event = .Deleted + if finalSectionData[finalIndexPath.sectionIndex].event == .inserted { + initialItemData[i][j].event = .deleted continue } @@ -384,59 +497,60 @@ struct CommandGenerator { } // mark moved or moved automatically - for i in 0 ..< finalSections.count { + for i in 0 ..< finalItemCache.count { guard let originalSectionIndex = finalSectionData[i].moveIndex else { continue } var untouchedIndex: Int? = 0 - for j in 0 ..< finalSections[i].items.count { + for j in 0 ..< finalItemCache[i].count { untouchedIndex = findNextUntouchedOldIndex(originalSectionIndex, untouchedIndex) guard let originalIndex = finalItemData[i][j].moveIndex else { - finalItemData[i][j].event = .Inserted + finalItemData[i][j].event = .inserted continue } // In case trying to move from deleted section, abort, otherwise it will crash table view - if initialSectionData[originalIndex.sectionIndex].event == .Deleted { - finalItemData[i][j].event = .Inserted + if initialSectionData[originalIndex.sectionIndex].event == .deleted { + finalItemData[i][j].event = .inserted continue } // original section can't be inserted - else if initialSectionData[originalIndex.sectionIndex].event == .Inserted { + else if initialSectionData[originalIndex.sectionIndex].event == .inserted { try rxPrecondition(false, "New section in initial sections, that is wrong") } let initialSectionEvent = initialSectionData[originalIndex.sectionIndex].event - try rxPrecondition(initialSectionEvent == .Moved || initialSectionEvent == .MovedAutomatically, "Section not moved") + try rxPrecondition(initialSectionEvent == .moved || initialSectionEvent == .movedAutomatically, "Section not moved") let eventType = originalIndex == ItemPath(sectionIndex: originalSectionIndex, itemIndex: untouchedIndex ?? -1) - ? EditEvent.MovedAutomatically : EditEvent.Moved + ? EditEvent.movedAutomatically : EditEvent.moved initialItemData[originalIndex.sectionIndex][originalIndex.itemIndex].event = eventType finalItemData[i][j].event = eventType - } } return (initialItemData, finalItemData) } - static func calculateSectionMovementsForInitialSections(initialSections: [S], finalSections: [S]) throws -> ([SectionAssociatedData], [SectionAssociatedData]) { + static func calculateSectionMovements(initialSections: [S], finalSections: [S]) throws + -> (ContiguousArray, ContiguousArray) { let initialSectionIndexes = try indexSections(initialSections) - var initialSectionData = [SectionAssociatedData](count: initialSections.count, repeatedValue: SectionAssociatedData.initial) - var finalSectionData = [SectionAssociatedData](count: finalSections.count, repeatedValue: SectionAssociatedData.initial) + var initialSectionData = ContiguousArray(repeating: SectionAssociatedData.initial, count: initialSections.count) + var finalSectionData = ContiguousArray(repeating: SectionAssociatedData.initial, count: finalSections.count) - for (i, section) in finalSections.enumerate() { + for (i, section) in finalSections.enumerated() { + finalSectionData[i].itemCount = finalSections[i].items.count guard let initialSectionIndex = initialSectionIndexes[section.identity] else { continue } if initialSectionData[initialSectionIndex].moveIndex != nil { - throw DifferentiatorError.DuplicateSection(section: section) + throw DifferentiatorError.duplicateSection(section: section) } initialSectionData[initialSectionIndex].moveIndex = i @@ -447,8 +561,9 @@ struct CommandGenerator { // deleted sections for i in 0 ..< initialSectionData.count { + initialSectionData[i].itemCount = initialSections[i].items.count if initialSectionData[i].moveIndex == nil { - initialSectionData[i].event = .Deleted + initialSectionData[i].event = .deleted continue } @@ -465,7 +580,7 @@ struct CommandGenerator { } while i < initialSections.count { - if initialSectionData[i].event == .Untouched { + if initialSectionData[i].event == .untouched { return i } @@ -483,28 +598,29 @@ struct CommandGenerator { // oh, it did exist if let oldSectionIndex = finalSectionData[i].moveIndex { - let moveType = oldSectionIndex != untouchedOldIndex ? EditEvent.Moved : EditEvent.MovedAutomatically + let moveType = oldSectionIndex != untouchedOldIndex ? EditEvent.moved : EditEvent.movedAutomatically finalSectionData[i].event = moveType initialSectionData[oldSectionIndex].event = moveType } else { - finalSectionData[i].event = .Inserted + finalSectionData[i].event = .inserted } } // inserted sections - for (i, section) in finalSectionData.enumerate() { + for (i, section) in finalSectionData.enumerated() { if section.moveIndex == nil { - finalSectionData[i].event == .Inserted + _ = finalSectionData[i].event == .inserted } } return (initialSectionData, finalSectionData) } - mutating func generateDeleteSections() throws -> [Changeset] { + mutating func generateDeleteSectionsDeletedItemsAndUpdatedItems() throws -> [Changeset] { var deletedSections = [Int]() + var deletedItems = [ItemPath]() var updatedItems = [ItemPath]() @@ -512,26 +628,26 @@ struct CommandGenerator { // mark deleted items { // 1rst stage again (I know, I know ...) - for (i, initialSection) in initialSections.enumerate() { + for (i, initialItems) in initialItemCache.enumerated() { let event = initialSectionData[i].event // Deleted section will take care of deleting child items. // In case of moving an item from deleted section, tableview will // crash anyway, so this is not limiting anything. - if event == .Deleted { + if event == .deleted { deletedSections.append(i) continue } var afterDeleteItems: [S.Item] = [] - for j in 0 ..< initialSection.items.count { + for j in 0 ..< initialItems.count { let event = initialItemData[i][j].event switch event { - case .Deleted: + case .deleted: deletedItems.append(ItemPath(sectionIndex: i, itemIndex: j)) - case .Moved, .MovedAutomatically: + case .moved, .movedAutomatically: let finalItemIndex = try initialItemData[i][j].moveIndex.unwrap() - let finalItem = finalSections[finalItemIndex] + let finalItem = finalItemCache[finalItemIndex.sectionIndex][finalItemIndex.itemIndex] if finalItem != initialSections[i].items[j] { updatedItems.append(ItemPath(sectionIndex: i, itemIndex: j)) } @@ -541,7 +657,7 @@ struct CommandGenerator { } } - afterDeleteState.append(S(original: initialSection, items: afterDeleteItems)) + afterDeleteState.append(try S(safeOriginal: initialSections[i], safeItems: afterDeleteItems)) } // } @@ -564,11 +680,11 @@ struct CommandGenerator { for i in 0 ..< initialSections.count { switch initialSectionData[i].event { - case .Deleted: + case .deleted: break - case .Moved: + case .moved: movedSections.append((from: try initialSectionData[i].indexAfterDelete.unwrap(), to: try initialSectionData[i].moveIndex.unwrap())) - case .MovedAutomatically: + case .movedAutomatically: break default: try rxPrecondition(false, "Unhandled case in initial sections") @@ -577,7 +693,7 @@ struct CommandGenerator { for i in 0 ..< finalSections.count { switch finalSectionData[i].event { - case .Inserted: + case .inserted: insertedSections.append(i) default: break @@ -589,22 +705,24 @@ struct CommandGenerator { } // sections should be in place, but items should be original without deleted ones - let sectionsAfterChange: [S] = try self.finalSections.enumerate().map { i, s -> S in + let sectionsAfterChange: [S] = try self.finalSections.enumerated().map { i, s -> S in let event = self.finalSectionData[i].event - if event == .Inserted { + if event == .inserted { // it's already set up return s } - else if event == .Moved || event == .MovedAutomatically { + else if event == .moved || event == .movedAutomatically { let originalSectionIndex = try finalSectionData[i].moveIndex.unwrap() let originalSection = initialSections[originalSectionIndex] var items: [S.Item] = [] - for (j, _) in originalSection.items.enumerate() { - let initialData = self.initialItemData[originalSectionIndex][j] + items.reserveCapacity(originalSection.items.count) + let itemAssociatedData = self.initialItemData[originalSectionIndex] + for j in 0 ..< originalSection.items.count { + let initialData = itemAssociatedData[j] - guard initialData.event != .Deleted else { + guard initialData.event != .deleted else { continue } @@ -613,10 +731,12 @@ struct CommandGenerator { continue } - items.append(self.finalSections[finalIndex.sectionIndex].items[finalIndex.itemIndex]) + items.append(finalItemCache[finalIndex.sectionIndex][finalIndex.itemIndex]) } - return S(original: s, items: items) + let modifiedSection = try S(safeOriginal: s, safeItems: items) + + return modifiedSection } else { try rxPrecondition(false, "This is weird, this shouldn't happen") @@ -631,7 +751,7 @@ struct CommandGenerator { )] } - mutating func generateNewAndMovedItems() throws -> [Changeset] { + mutating func generateInsertAndMovedItems() throws -> [Changeset] { var insertedItems = [ItemPath]() var movedItems = [(from: ItemPath, to: ItemPath)]() @@ -642,21 +762,21 @@ struct CommandGenerator { let sectionEvent = finalSectionData[i].event // new and deleted sections cause reload automatically - if sectionEvent != .Moved && sectionEvent != .MovedAutomatically { + if sectionEvent != .moved && sectionEvent != .movedAutomatically { continue } for j in 0 ..< finalSection.items.count { let currentItemEvent = finalItemData[i][j].event - try rxPrecondition(currentItemEvent != .Untouched, "Current event is not untouched") + try rxPrecondition(currentItemEvent != .untouched, "Current event is not untouched") let event = finalItemData[i][j].event switch event { - case .Inserted: + case .inserted: insertedItems.append(ItemPath(sectionIndex: i, itemIndex: j)) - case .Moved: + case .moved: let originalIndex = try finalItemData[i][j].moveIndex.unwrap() let finalSectionIndex = try initialSectionData[originalIndex.sectionIndex].moveIndex.unwrap() let moveFromItemWithIndex = try initialItemData[originalIndex.sectionIndex][originalIndex.itemIndex].indexAfterDelete.unwrap() @@ -682,4 +802,4 @@ struct CommandGenerator { movedItems: movedItems )] } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/FloatingPointType+IdentifiableType.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/FloatingPointType+IdentifiableType.swift new file mode 100644 index 0000000..d11eaee --- /dev/null +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/FloatingPointType+IdentifiableType.swift @@ -0,0 +1,25 @@ +// +// FloatingPointType+IdentifiableType.swift +// RxDataSources +// +// Created by Krunoslav Zaher on 7/4/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +extension FloatingPoint { + typealias identity = Self + + public var identity: Self { + return self + } +} + +extension Float : IdentifiableType { + +} + +extension Double : IdentifiableType { + +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/IdentifiableValue.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/IdentifiableValue.swift index b6ab138..3494d82 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/IdentifiableValue.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/IdentifiableValue.swift @@ -8,18 +8,24 @@ import Foundation -public struct IdentifiableValue - : IdentifiableType - , Equatable - , CustomStringConvertible - , CustomDebugStringConvertible { - public typealias Identity = Value - +public struct IdentifiableValue { public let value: Value +} + +extension IdentifiableValue + : IdentifiableType { + + public typealias Identity = Value public var identity : Identity { return value } +} + +extension IdentifiableValue + : Equatable + , CustomStringConvertible + , CustomDebugStringConvertible { public var description: String { return "\(value)" @@ -32,4 +38,4 @@ public struct IdentifiableValue public func == (lhs: IdentifiableValue, rhs: IdentifiableValue) -> Bool { return lhs.value == rhs.value -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/IntegerType+IdentifiableType.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/IntegerType+IdentifiableType.swift new file mode 100644 index 0000000..83475a0 --- /dev/null +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/IntegerType+IdentifiableType.swift @@ -0,0 +1,59 @@ +// +// IntegerType+IdentifiableType.swift +// RxDataSources +// +// Created by Krunoslav Zaher on 7/4/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +extension Integer { + typealias identity = Self + + public var identity: Self { + return self + } +} + +extension Int : IdentifiableType { + +} + +extension Int8 : IdentifiableType { + +} + +extension Int16 : IdentifiableType { + +} + +extension Int32 : IdentifiableType { + +} + +extension Int64 : IdentifiableType { + +} + + +extension UInt : IdentifiableType { + +} + +extension UInt8 : IdentifiableType { + +} + +extension UInt16 : IdentifiableType { + +} + +extension UInt32 : IdentifiableType { + +} + +extension UInt64 : IdentifiableType { + +} + diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/ItemPath.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/ItemPath.swift index 5f07363..9551e11 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/ItemPath.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/ItemPath.swift @@ -11,6 +11,11 @@ import Foundation public struct ItemPath { public let sectionIndex: Int public let itemIndex: Int + + public init(sectionIndex: Int, itemIndex: Int) { + self.sectionIndex = sectionIndex + self.itemIndex = itemIndex + } } extension ItemPath : Equatable { @@ -19,4 +24,12 @@ extension ItemPath : Equatable { public func == (lhs: ItemPath, rhs: ItemPath) -> Bool { return lhs.sectionIndex == rhs.sectionIndex && lhs.itemIndex == rhs.itemIndex -} \ No newline at end of file +} + +extension ItemPath: Hashable { + + public var hashValue: Int { + return sectionIndex.byteSwapped.hashValue ^ itemIndex.hashValue + } + +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Optional+Extensions.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Optional+Extensions.swift index a8d5763..5c60776 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Optional+Extensions.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/Optional+Extensions.swift @@ -15,7 +15,7 @@ extension Optional { } else { rxDebugFatalError("Error during unwrapping optional") - throw RxDataSourceError.UnwrappingOptional + throw RxDataSourceError.unwrappingOptional } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/SectionModel.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/SectionModel.swift index a503b1d..1367c2a 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/SectionModel.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/SectionModel.swift @@ -8,23 +8,28 @@ import Foundation -public struct SectionModel - : SectionModelType - , CustomStringConvertible { - public typealias Identity = Section - public typealias Item = ItemType +public struct SectionModel { public var model: Section - - public var identity: Section { - return model - } - public var items: [Item] public init(model: Section, items: [Item]) { self.model = model self.items = items } +} + +extension SectionModel + : SectionModelType { + public typealias Identity = Section + public typealias Item = ItemType + + public var identity: Section { + return model + } +} + +extension SectionModel + : CustomStringConvertible { public var description: String { return "\(self.model) > \(items)" @@ -34,6 +39,6 @@ public struct SectionModel extension SectionModel { public init(original: SectionModel, items: [Item]) { self.model = original.model - self.items = original.items + self.items = items } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/String+IdentifiableType.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/String+IdentifiableType.swift new file mode 100644 index 0000000..708db74 --- /dev/null +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/String+IdentifiableType.swift @@ -0,0 +1,17 @@ +// +// String+IdentifiableType.swift +// RxDataSources +// +// Created by Krunoslav Zaher on 7/4/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +extension String : IdentifiableType { + public typealias Identity = String + + public var identity: String { + return self + } +} diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/TableViewSectionedDataSource.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/TableViewSectionedDataSource.swift index cca9f26..aed4c7c 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/TableViewSectionedDataSource.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/TableViewSectionedDataSource.swift @@ -13,98 +13,113 @@ import RxCocoa #endif // objc monkey business -public class _TableViewSectionedDataSource +open class _TableViewSectionedDataSource : NSObject , UITableViewDataSource { - func _numberOfSectionsInTableView(tableView: UITableView) -> Int { + open func _rx_numberOfSections(in tableView: UITableView) -> Int { return 1 } - public func numberOfSectionsInTableView(tableView: UITableView) -> Int { - return _numberOfSectionsInTableView(tableView) + open func numberOfSections(in tableView: UITableView) -> Int { + return _rx_numberOfSections(in: tableView) } - func _tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + open func _rx_tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 0 } - public func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return _tableView(tableView, numberOfRowsInSection: section) + open func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return _rx_tableView(tableView, numberOfRowsInSection: section) } - func _tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + open func _rx_tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { return (nil as UITableViewCell?)! } - public func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - return _tableView(tableView, cellForRowAtIndexPath: indexPath) + open func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return _rx_tableView(tableView, cellForRowAt: indexPath) } - func _tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? { + open func _rx_tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { return nil } - public func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? { - return _tableView(tableView, titleForHeaderInSection: section) + open func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { + return _rx_tableView(tableView, titleForHeaderInSection: section) } - func _tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String? { + open func _rx_tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? { return nil } - public func tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String? { - return _tableView(tableView, titleForFooterInSection: section) + open func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? { + return _rx_tableView(tableView, titleForFooterInSection: section) } - func _tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { - return true + open func _rx_tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + return false } - public func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { - return _tableView(tableView, canEditRowAtIndexPath: indexPath) + open func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + return _rx_tableView(tableView, canEditRowAt: indexPath) } - func _tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { + open func _rx_tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { return false } - public func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { - return _tableView(tableView, canMoveRowAtIndexPath: indexPath) + open func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { + return _rx_tableView(tableView, canMoveRowAt: indexPath) } - - func _sectionIndexTitlesForTableView(tableView: UITableView) -> [String]? { + + #if os(iOS) + open func _rx_sectionIndexTitles(for tableView: UITableView) -> [String]? { return nil } - public func sectionIndexTitlesForTableView(tableView: UITableView) -> [String]? { - return _sectionIndexTitlesForTableView(tableView) + open func sectionIndexTitles(for tableView: UITableView) -> [String]? { + return _rx_sectionIndexTitles(for: tableView) } - - func _tableView(tableView: UITableView, sectionForSectionIndexTitle title: String, atIndex index: Int) -> Int { + + open func _rx_tableView(_ tableView: UITableView, sectionForSectionIndexTitle title: String, at index: Int) -> Int { return 0 } - public func tableView(tableView: UITableView, sectionForSectionIndexTitle title: String, atIndex index: Int) -> Int { - return _tableView(tableView, sectionForSectionIndexTitle: title, atIndex: index) + open func tableView(_ tableView: UITableView, sectionForSectionIndexTitle title: String, at index: Int) -> Int { + return _rx_tableView(tableView, sectionForSectionIndexTitle: title, at: index) } + #endif - func _tableView(tableView: UITableView, moveRowAtIndexPath sourceIndexPath: NSIndexPath, toIndexPath destinationIndexPath: NSIndexPath) { + open func _rx_tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { } - public func tableView(tableView: UITableView, moveRowAtIndexPath sourceIndexPath: NSIndexPath, toIndexPath destinationIndexPath: NSIndexPath) { - _tableView(tableView, moveRowAtIndexPath: sourceIndexPath, toIndexPath: destinationIndexPath) + open func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { + _rx_tableView(tableView, moveRowAt: sourceIndexPath, to: destinationIndexPath) } + } -public class RxTableViewSectionedDataSource +open class TableViewSectionedDataSource : _TableViewSectionedDataSource , SectionedViewDataSourceType { public typealias I = S.Item public typealias Section = S - public typealias CellFactory = (RxTableViewSectionedDataSource, UITableView, NSIndexPath, I) -> UITableViewCell + public typealias CellFactory = (TableViewSectionedDataSource, UITableView, IndexPath, I) -> UITableViewCell + + #if DEBUG + // If data source has already been bound, then mutating it + // afterwards isn't something desired. + // This simulates immutability after binding + var _dataSourceBound: Bool = false + + private func ensureNotMutatedAfterBinding() { + assert(!_dataSourceBound, "Data source is already bound. Please write this line before binding call (`bindTo`, `drive`). Data source must first be completely configured, and then bound after that, otherwise there could be runtime bugs, glitches, or partial malfunctions.") + } + #endif + // This structure exists because model can be mutable // In that case current state value should be preserved. // The state that needs to be preserved is ordering of items in section @@ -115,45 +130,90 @@ public class RxTableViewSectionedDataSource private var _sectionModels: [SectionModelSnapshot] = [] - public var sectionModels: [S] { + open var sectionModels: [S] { return _sectionModels.map { Section(original: $0.model, items: $0.items) } } - public func sectionAtIndex(section: Int) -> S { - let sectionModel = _sectionModels[section] - return Section(original: sectionModel.model, items: sectionModel.items) + open subscript(section: Int) -> S { + let sectionModel = self._sectionModels[section] + return S(original: sectionModel.model, items: sectionModel.items) } - public func itemAtIndexPath(indexPath: NSIndexPath) -> I { - return self._sectionModels[indexPath.section].items[indexPath.item] - } - - public func setItem(item item: I, indexPath: NSIndexPath) { - var section = self._sectionModels[indexPath.section] - section.items[indexPath.item] = item - self._sectionModels[indexPath.section] = section + open subscript(indexPath: IndexPath) -> I { + get { + return self._sectionModels[indexPath.section].items[indexPath.item] + } + set(item) { + var section = self._sectionModels[indexPath.section] + section.items[indexPath.item] = item + self._sectionModels[indexPath.section] = section + } } - public func modelAtIndexPath(indexPath: NSIndexPath) throws -> Any { - return itemAtIndexPath(indexPath) + open func model(at indexPath: IndexPath) throws -> Any { + return self[indexPath] } - public func setSections(sections: [S]) { + open func setSections(_ sections: [S]) { self._sectionModels = sections.map { SectionModelSnapshot(model: $0, items: $0.items) } } - public var configureCell: CellFactory! = nil - - public var titleForHeaderInSection: ((RxTableViewSectionedDataSource, section: Int) -> String?)? - public var titleForFooterInSection: ((RxTableViewSectionedDataSource, section: Int) -> String?)? - - public var canEditRowAtIndexPath: ((RxTableViewSectionedDataSource, indexPath: NSIndexPath) -> Bool)? - public var canMoveRowAtIndexPath: ((RxTableViewSectionedDataSource, indexPath: NSIndexPath) -> Bool)? + open var configureCell: CellFactory! = nil { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } - public var sectionIndexTitles: ((RxTableViewSectionedDataSource) -> [String]?)? - public var sectionForSectionIndexTitle:((RxTableViewSectionedDataSource, title: String, index: Int) -> Int)? + open var titleForHeaderInSection: ((TableViewSectionedDataSource, Int) -> String?)? { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } + open var titleForFooterInSection: ((TableViewSectionedDataSource, Int) -> String?)? { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } - public var rowAnimation: UITableViewRowAnimation = .Automatic + open var canEditRowAtIndexPath: ((TableViewSectionedDataSource, IndexPath) -> Bool)? { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } + open var canMoveRowAtIndexPath: ((TableViewSectionedDataSource, IndexPath) -> Bool)? { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } + + open var rowAnimation: UITableViewRowAnimation = .automatic + + #if os(iOS) + open var sectionIndexTitles: ((TableViewSectionedDataSource) -> [String]?)? { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } + open var sectionForSectionIndexTitle:((TableViewSectionedDataSource, _ title: String, _ index: Int) -> Int)? { + didSet { + #if DEBUG + ensureNotMutatedAfterBinding() + #endif + } + } + #endif public override init() { super.init() @@ -168,74 +228,63 @@ public class RxTableViewSectionedDataSource // UITableViewDataSource - override func _numberOfSectionsInTableView(tableView: UITableView) -> Int { + open override func _rx_numberOfSections(in tableView: UITableView) -> Int { return _sectionModels.count } - override func _tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + open override func _rx_tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return _sectionModels[section].items.count } - override func _tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + open override func _rx_tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { precondition(indexPath.item < _sectionModels[indexPath.section].items.count) - return configureCell(self, tableView, indexPath, itemAtIndexPath(indexPath)) + return configureCell(self, tableView, indexPath, self[indexPath]) } - override func _tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? { - return titleForHeaderInSection?(self, section: section) + open override func _rx_tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { + return titleForHeaderInSection?(self, section) } - override func _tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String? { - return titleForFooterInSection?(self, section: section) + open override func _rx_tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? { + return titleForFooterInSection?(self, section) } - override func _tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { - guard let canEditRow = canEditRowAtIndexPath?(self, indexPath: indexPath) else { - return super._tableView(tableView, canEditRowAtIndexPath: indexPath) + open override func _rx_tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + guard let canEditRow = canEditRowAtIndexPath?(self, indexPath) else { + return super._rx_tableView(tableView, canEditRowAt: indexPath) } return canEditRow } - override func _tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { - guard let canMoveRow = canMoveRowAtIndexPath?(self, indexPath: indexPath) else { - return super._tableView(tableView, canMoveRowAtIndexPath: indexPath) + open override func _rx_tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { + guard let canMoveRow = canMoveRowAtIndexPath?(self, indexPath) else { + return super._rx_tableView(tableView, canMoveRowAt: indexPath) } return canMoveRow } - override func _tableView(tableView: UITableView, moveRowAtIndexPath sourceIndexPath: NSIndexPath, toIndexPath destinationIndexPath: NSIndexPath) { - let sourceSection = self.sectionModels[sourceIndexPath.section] - var sourceItems = sourceSection.items - - let sourceItem = sourceItems.removeAtIndex(sourceIndexPath.item) - - let sourceSectionNew = SectionModelSnapshot(model: sourceSection, items: sourceItems) - self._sectionModels[sourceIndexPath.section] = sourceSectionNew - - let destinationSection = self.sectionModels[destinationIndexPath.section] - var destinationItems = destinationSection.items - destinationItems.insert(sourceItem, atIndex: destinationIndexPath.item) - - self._sectionModels[destinationIndexPath.section] = SectionModelSnapshot(model: destinationSection, items: destinationItems) + open override func _rx_tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { + self._sectionModels.moveFromSourceIndexPath(sourceIndexPath, destinationIndexPath: destinationIndexPath) } - - override func _sectionIndexTitlesForTableView(tableView: UITableView) -> [String]? { + + #if os(iOS) + open override func _rx_sectionIndexTitles(for tableView: UITableView) -> [String]? { guard let titles = sectionIndexTitles?(self) else { - return super._sectionIndexTitlesForTableView(tableView) + return super._rx_sectionIndexTitles(for: tableView) } return titles } - override func _tableView(tableView: UITableView, sectionForSectionIndexTitle title: String, atIndex index: Int) -> Int { - guard let section = sectionForSectionIndexTitle?(self, title: title, index: index) else { - return super._tableView(tableView, sectionForSectionIndexTitle: title, atIndex: index) + open override func _rx_tableView(_ tableView: UITableView, sectionForSectionIndexTitle title: String, at index: Int) -> Int { + guard let section = sectionForSectionIndexTitle?(self, title, index) else { + return super._rx_tableView(tableView, sectionForSectionIndexTitle: title, at: index) } return section } - + #endif } diff --git a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/UI+SectionedViewType.swift b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/UI+SectionedViewType.swift index be34455..8fa8629 100644 --- a/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/UI+SectionedViewType.swift +++ b/RxTableViewDemo/Pods/RxDataSources/Sources/DataSources/UI+SectionedViewType.swift @@ -9,49 +9,49 @@ import Foundation import UIKit -func indexSet(values: [Int]) -> NSIndexSet { +func indexSet(_ values: [Int]) -> IndexSet { let indexSet = NSMutableIndexSet() for i in values { - indexSet.addIndex(i) + indexSet.add(i) } - return indexSet + return indexSet as IndexSet } extension UITableView : SectionedViewType { - public func insertItemsAtIndexPaths(paths: [NSIndexPath], animationStyle: UITableViewRowAnimation) { - self.insertRowsAtIndexPaths(paths, withRowAnimation: animationStyle) + public func insertItemsAtIndexPaths(_ paths: [IndexPath], animationStyle: UITableViewRowAnimation) { + self.insertRows(at: paths, with: animationStyle) } - public func deleteItemsAtIndexPaths(paths: [NSIndexPath], animationStyle: UITableViewRowAnimation) { - self.deleteRowsAtIndexPaths(paths, withRowAnimation: animationStyle) + public func deleteItemsAtIndexPaths(_ paths: [IndexPath], animationStyle: UITableViewRowAnimation) { + self.deleteRows(at: paths, with: animationStyle) } - public func moveItemAtIndexPath(from: NSIndexPath, to: NSIndexPath) { - self.moveRowAtIndexPath(from, toIndexPath: to) + public func moveItemAtIndexPath(_ from: IndexPath, to: IndexPath) { + self.moveRow(at: from, to: to) } - public func reloadItemsAtIndexPaths(paths: [NSIndexPath], animationStyle: UITableViewRowAnimation) { - self.reloadRowsAtIndexPaths(paths, withRowAnimation: animationStyle) + public func reloadItemsAtIndexPaths(_ paths: [IndexPath], animationStyle: UITableViewRowAnimation) { + self.reloadRows(at: paths, with: animationStyle) } - public func insertSections(sections: [Int], animationStyle: UITableViewRowAnimation) { - self.insertSections(indexSet(sections), withRowAnimation: animationStyle) + public func insertSections(_ sections: [Int], animationStyle: UITableViewRowAnimation) { + self.insertSections(indexSet(sections), with: animationStyle) } - public func deleteSections(sections: [Int], animationStyle: UITableViewRowAnimation) { - self.deleteSections(indexSet(sections), withRowAnimation: animationStyle) + public func deleteSections(_ sections: [Int], animationStyle: UITableViewRowAnimation) { + self.deleteSections(indexSet(sections), with: animationStyle) } - public func moveSection(from: Int, to: Int) { + public func moveSection(_ from: Int, to: Int) { self.moveSection(from, toSection: to) } - public func reloadSections(sections: [Int], animationStyle: UITableViewRowAnimation) { - self.reloadSections(indexSet(sections), withRowAnimation: animationStyle) + public func reloadSections(_ sections: [Int], animationStyle: UITableViewRowAnimation) { + self.reloadSections(indexSet(sections), with: animationStyle) } - public func performBatchUpdates(changes: Changeset, animationConfiguration: AnimationConfiguration) { + public func performBatchUpdates(_ changes: Changeset, animationConfiguration: AnimationConfiguration) { self.beginUpdates() _performBatchUpdates(self, changes: changes, animationConfiguration: animationConfiguration) self.endUpdates() @@ -59,39 +59,39 @@ extension UITableView : SectionedViewType { } extension UICollectionView : SectionedViewType { - public func insertItemsAtIndexPaths(paths: [NSIndexPath], animationStyle: UITableViewRowAnimation) { - self.insertItemsAtIndexPaths(paths) + public func insertItemsAtIndexPaths(_ paths: [IndexPath], animationStyle: UITableViewRowAnimation) { + self.insertItems(at: paths) } - public func deleteItemsAtIndexPaths(paths: [NSIndexPath], animationStyle: UITableViewRowAnimation) { - self.deleteItemsAtIndexPaths(paths) + public func deleteItemsAtIndexPaths(_ paths: [IndexPath], animationStyle: UITableViewRowAnimation) { + self.deleteItems(at: paths) } - public func moveItemAtIndexPath(from: NSIndexPath, to: NSIndexPath) { - self.moveItemAtIndexPath(from, toIndexPath: to) + public func moveItemAtIndexPath(_ from: IndexPath, to: IndexPath) { + self.moveItem(at: from, to: to) } - public func reloadItemsAtIndexPaths(paths: [NSIndexPath], animationStyle: UITableViewRowAnimation) { - self.reloadItemsAtIndexPaths(paths) + public func reloadItemsAtIndexPaths(_ paths: [IndexPath], animationStyle: UITableViewRowAnimation) { + self.reloadItems(at: paths) } - public func insertSections(sections: [Int], animationStyle: UITableViewRowAnimation) { + public func insertSections(_ sections: [Int], animationStyle: UITableViewRowAnimation) { self.insertSections(indexSet(sections)) } - public func deleteSections(sections: [Int], animationStyle: UITableViewRowAnimation) { + public func deleteSections(_ sections: [Int], animationStyle: UITableViewRowAnimation) { self.deleteSections(indexSet(sections)) } - public func moveSection(from: Int, to: Int) { + public func moveSection(_ from: Int, to: Int) { self.moveSection(from, toSection: to) } - public func reloadSections(sections: [Int], animationStyle: UITableViewRowAnimation) { + public func reloadSections(_ sections: [Int], animationStyle: UITableViewRowAnimation) { self.reloadSections(indexSet(sections)) } - public func performBatchUpdates(changes: Changeset, animationConfiguration: AnimationConfiguration) { + public func performBatchUpdates(_ changes: Changeset, animationConfiguration: AnimationConfiguration) { self.performBatchUpdates({ () -> Void in _performBatchUpdates(self, changes: changes, animationConfiguration: animationConfiguration) }, completion: { (completed: Bool) -> Void in @@ -100,20 +100,20 @@ extension UICollectionView : SectionedViewType { } public protocol SectionedViewType { - func insertItemsAtIndexPaths(paths: [NSIndexPath], animationStyle: UITableViewRowAnimation) - func deleteItemsAtIndexPaths(paths: [NSIndexPath], animationStyle: UITableViewRowAnimation) - func moveItemAtIndexPath(from: NSIndexPath, to: NSIndexPath) - func reloadItemsAtIndexPaths(paths: [NSIndexPath], animationStyle: UITableViewRowAnimation) - - func insertSections(sections: [Int], animationStyle: UITableViewRowAnimation) - func deleteSections(sections: [Int], animationStyle: UITableViewRowAnimation) - func moveSection(from: Int, to: Int) - func reloadSections(sections: [Int], animationStyle: UITableViewRowAnimation) + func insertItemsAtIndexPaths(_ paths: [IndexPath], animationStyle: UITableViewRowAnimation) + func deleteItemsAtIndexPaths(_ paths: [IndexPath], animationStyle: UITableViewRowAnimation) + func moveItemAtIndexPath(_ from: IndexPath, to: IndexPath) + func reloadItemsAtIndexPaths(_ paths: [IndexPath], animationStyle: UITableViewRowAnimation) + + func insertSections(_ sections: [Int], animationStyle: UITableViewRowAnimation) + func deleteSections(_ sections: [Int], animationStyle: UITableViewRowAnimation) + func moveSection(_ from: Int, to: Int) + func reloadSections(_ sections: [Int], animationStyle: UITableViewRowAnimation) - func performBatchUpdates(changes: Changeset, animationConfiguration: AnimationConfiguration) + func performBatchUpdates(_ changes: Changeset, animationConfiguration: AnimationConfiguration) } -func _performBatchUpdates(view: V, changes: Changeset, animationConfiguration:AnimationConfiguration) { +func _performBatchUpdates(_ view: V, changes: Changeset, animationConfiguration:AnimationConfiguration) { typealias I = S.Item view.deleteSections(changes.deletedSections, animationStyle: animationConfiguration.deleteAnimation) @@ -126,22 +126,22 @@ func _performBatchUpdates(view: V, ch } view.deleteItemsAtIndexPaths( - changes.deletedItems.map { NSIndexPath(forItem: $0.itemIndex, inSection: $0.sectionIndex) }, + changes.deletedItems.map { IndexPath(item: $0.itemIndex, section: $0.sectionIndex) }, animationStyle: animationConfiguration.deleteAnimation ) view.insertItemsAtIndexPaths( - changes.insertedItems.map { NSIndexPath(forItem: $0.itemIndex, inSection: $0.sectionIndex) }, + changes.insertedItems.map { IndexPath(item: $0.itemIndex, section: $0.sectionIndex) }, animationStyle: animationConfiguration.insertAnimation ) view.reloadItemsAtIndexPaths( - changes.updatedItems.map { NSIndexPath(forItem: $0.itemIndex, inSection: $0.sectionIndex) }, + changes.updatedItems.map { IndexPath(item: $0.itemIndex, section: $0.sectionIndex) }, animationStyle: animationConfiguration.reloadAnimation ) for (from, to) in changes.movedItems { view.moveItemAtIndexPath( - NSIndexPath(forItem: from.itemIndex, inSection: from.sectionIndex), - to: NSIndexPath(forItem: to.itemIndex, inSection: to.sectionIndex) + IndexPath(item: from.itemIndex, section: from.sectionIndex), + to: IndexPath(item: to.itemIndex, section: to.sectionIndex) ) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/Bag.swift b/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/Bag.swift new file mode 100644 index 0000000..4ab6f94 --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/Bag.swift @@ -0,0 +1,167 @@ +// +// Bag.swift +// Platform +// +// Created by Krunoslav Zaher on 2/28/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation +import Swift + +let arrayDictionaryMaxSize = 30 + +struct BagKey { + /** + Unique identifier for object added to `Bag`. + + It's underlying type is UInt64. If we assume there in an idealized CPU that works at 4GHz, + it would take ~150 years of continuous running time for it to overflow. + */ + fileprivate let rawValue: UInt64 +} + +/** +Data structure that represents a bag of elements typed `T`. + +Single element can be stored multiple times. + +Time and space complexity of insertion an deletion is O(n). + +It is suitable for storing small number of elements. +*/ +struct Bag : CustomDebugStringConvertible { + /// Type of identifier for inserted elements. + typealias KeyType = BagKey + + typealias Entry = (key: BagKey, value: T) + + fileprivate var _nextKey: BagKey = BagKey(rawValue: 0) + + // data + + // first fill inline variables + var _key0: BagKey? = nil + var _value0: T? = nil + + // last is sparse dictionary + var _dictionary: [BagKey : T]? = nil + + var _onlyFastPath = true + + /// Creates new empty `Bag`. + init() { + } + + /** + Inserts `value` into bag. + + - parameter element: Element to insert. + - returns: Key that can be used to remove element from bag. + */ + mutating func insert(_ element: T) -> BagKey { + let key = _nextKey + + _nextKey = BagKey(rawValue: _nextKey.rawValue &+ 1) + + if _key0 == nil { + _key0 = key + _value0 = element + return key + } + + _onlyFastPath = false + + if _dictionary != nil { + _dictionary![key] = element + return key + } + + if _dictionary == nil { + _dictionary = [:] + } + + _dictionary![key] = element + + return key + } + + /// - returns: Number of elements in bag. + var count: Int { + let dictionaryCount: Int = _dictionary?.count ?? 0 + return (_value0 != nil ? 1 : 0) + dictionaryCount + } + + /// Removes all elements from bag and clears capacity. + mutating func removeAll() { + _key0 = nil + _value0 = nil + + _dictionary?.removeAll(keepingCapacity: false) + } + + /** + Removes element with a specific `key` from bag. + + - parameter key: Key that identifies element to remove from bag. + - returns: Element that bag contained, or nil in case element was already removed. + */ + mutating func removeKey(_ key: BagKey) -> T? { + if _key0 == key { + _key0 = nil + let value = _value0! + _value0 = nil + return value + } + + if let existingObject = _dictionary?.removeValue(forKey: key) { + return existingObject + } + + return nil + } +} + +extension Bag { + /// A textual representation of `self`, suitable for debugging. + var debugDescription : String { + return "\(self.count) elements in Bag" + } +} + +extension Bag { + /// Enumerates elements inside the bag. + /// + /// - parameter action: Enumeration closure. + func forEach(_ action: (T) -> Void) { + if _onlyFastPath { + if let value0 = _value0 { + action(value0) + } + return + } + + let value0 = _value0 + let dictionary = _dictionary + + if let value0 = value0 { + action(value0) + } + + if dictionary?.count ?? 0 > 0 { + for element in dictionary!.values { + action(element) + } + } + } +} + +extension BagKey: Hashable { + var hashValue: Int { + return rawValue.hashValue + } +} + +func ==(lhs: BagKey, rhs: BagKey) -> Bool { + return lhs.rawValue == rhs.rawValue +} diff --git a/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift b/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift new file mode 100644 index 0000000..5fad383 --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift @@ -0,0 +1,28 @@ +// +// InfiniteSequence.swift +// Platform +// +// Created by Krunoslav Zaher on 6/13/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +/// Sequence that repeats `repeatedValue` infinite number of times. +struct InfiniteSequence : Sequence { + typealias Element = E + typealias Iterator = AnyIterator + + private let _repeatedValue: E + + init(repeatedValue: E) { + _repeatedValue = repeatedValue + } + + func makeIterator() -> Iterator { + let repeatedValue = _repeatedValue + return AnyIterator { + return repeatedValue + } + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift b/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift new file mode 100644 index 0000000..725feef --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift @@ -0,0 +1,114 @@ +// +// PriorityQueue.swift +// Platform +// +// Created by Krunoslav Zaher on 12/27/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +struct PriorityQueue { + private let _hasHigherPriority: (Element, Element) -> Bool + private let _isEqual: (Element, Element) -> Bool + + fileprivate var _elements = [Element]() + + init(hasHigherPriority: @escaping (Element, Element) -> Bool, isEqual: @escaping (Element, Element) -> Bool) { + _hasHigherPriority = hasHigherPriority + _isEqual = isEqual + } + + mutating func enqueue(_ element: Element) { + _elements.append(element) + bubbleToHigherPriority(_elements.count - 1) + } + + func peek() -> Element? { + return _elements.first + } + + var isEmpty: Bool { + return _elements.count == 0 + } + + mutating func dequeue() -> Element? { + guard let front = peek() else { + return nil + } + + removeAt(0) + + return front + } + + mutating func remove(_ element: Element) { + for i in 0 ..< _elements.count { + if _isEqual(_elements[i], element) { + removeAt(i) + return + } + } + } + + private mutating func removeAt(_ index: Int) { + let removingLast = index == _elements.count - 1 + if !removingLast { + swap(&_elements[index], &_elements[_elements.count - 1]) + } + + _ = _elements.popLast() + + if !removingLast { + bubbleToHigherPriority(index) + bubbleToLowerPriority(index) + } + } + + private mutating func bubbleToHigherPriority(_ initialUnbalancedIndex: Int) { + precondition(initialUnbalancedIndex >= 0) + precondition(initialUnbalancedIndex < _elements.count) + + var unbalancedIndex = initialUnbalancedIndex + + while unbalancedIndex > 0 { + let parentIndex = (unbalancedIndex - 1) / 2 + guard _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) else { break } + + swap(&_elements[unbalancedIndex], &_elements[parentIndex]) + unbalancedIndex = parentIndex + } + } + + private mutating func bubbleToLowerPriority(_ initialUnbalancedIndex: Int) { + precondition(initialUnbalancedIndex >= 0) + precondition(initialUnbalancedIndex < _elements.count) + + var unbalancedIndex = initialUnbalancedIndex + while true { + let leftChildIndex = unbalancedIndex * 2 + 1 + let rightChildIndex = unbalancedIndex * 2 + 2 + + var highestPriorityIndex = unbalancedIndex + + if leftChildIndex < _elements.count && _hasHigherPriority(_elements[leftChildIndex], _elements[highestPriorityIndex]) { + highestPriorityIndex = leftChildIndex + } + + if rightChildIndex < _elements.count && _hasHigherPriority(_elements[rightChildIndex], _elements[highestPriorityIndex]) { + highestPriorityIndex = rightChildIndex + } + + guard highestPriorityIndex != unbalancedIndex else { break } + + swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex]) + unbalancedIndex = highestPriorityIndex + } + } +} + +extension PriorityQueue : CustomDebugStringConvertible { + var debugDescription: String { + return _elements.debugDescription + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/Queue.swift b/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/Queue.swift new file mode 100644 index 0000000..cfe3df4 --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/Platform/DataStructures/Queue.swift @@ -0,0 +1,154 @@ +// +// Queue.swift +// Platform +// +// Created by Krunoslav Zaher on 3/21/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +/** +Data structure that represents queue. + +Complexity of `enqueue`, `dequeue` is O(1) when number of operations is +averaged over N operations. + +Complexity of `peek` is O(1). +*/ +struct Queue: Sequence { + /// Type of generator. + typealias Generator = AnyIterator + + private let _resizeFactor = 2 + + private var _storage: ContiguousArray + private var _count = 0 + private var _pushNextIndex = 0 + private let _initialCapacity: Int + + /** + Creates new queue. + + - parameter capacity: Capacity of newly created queue. + */ + init(capacity: Int) { + _initialCapacity = capacity + + _storage = ContiguousArray(repeating: nil, count: capacity) + } + + private var dequeueIndex: Int { + let index = _pushNextIndex - count + return index < 0 ? index + _storage.count : index + } + + /// - returns: Is queue empty. + var isEmpty: Bool { + return count == 0 + } + + /// - returns: Number of elements inside queue. + var count: Int { + return _count + } + + /// - returns: Element in front of a list of elements to `dequeue`. + func peek() -> T { + precondition(count > 0) + + return _storage[dequeueIndex]! + } + + mutating private func resizeTo(_ size: Int) { + var newStorage = ContiguousArray(repeating: nil, count: size) + + let count = _count + + let dequeueIndex = self.dequeueIndex + let spaceToEndOfQueue = _storage.count - dequeueIndex + + // first batch is from dequeue index to end of array + let countElementsInFirstBatch = Swift.min(count, spaceToEndOfQueue) + // second batch is wrapped from start of array to end of queue + let numberOfElementsInSecondBatch = count - countElementsInFirstBatch + + newStorage[0 ..< countElementsInFirstBatch] = _storage[dequeueIndex ..< (dequeueIndex + countElementsInFirstBatch)] + newStorage[countElementsInFirstBatch ..< (countElementsInFirstBatch + numberOfElementsInSecondBatch)] = _storage[0 ..< numberOfElementsInSecondBatch] + + _count = count + _pushNextIndex = count + _storage = newStorage + } + + /// Enqueues `element`. + /// + /// - parameter element: Element to enqueue. + mutating func enqueue(_ element: T) { + if count == _storage.count { + resizeTo(Swift.max(_storage.count, 1) * _resizeFactor) + } + + _storage[_pushNextIndex] = element + _pushNextIndex += 1 + _count += 1 + + if _pushNextIndex >= _storage.count { + _pushNextIndex -= _storage.count + } + } + + private mutating func dequeueElementOnly() -> T { + precondition(count > 0) + + let index = dequeueIndex + + defer { + _storage[index] = nil + _count -= 1 + } + + return _storage[index]! + } + + /// Dequeues element or throws an exception in case queue is empty. + /// + /// - returns: Dequeued element. + mutating func dequeue() -> T? { + if self.count == 0 { + return nil + } + + defer { + let downsizeLimit = _storage.count / (_resizeFactor * _resizeFactor) + if _count < downsizeLimit && downsizeLimit >= _initialCapacity { + resizeTo(_storage.count / _resizeFactor) + } + } + + return dequeueElementOnly() + } + + /// - returns: Generator of contained elements. + func makeIterator() -> AnyIterator { + var i = dequeueIndex + var count = _count + + return AnyIterator { + if count == 0 { + return nil + } + + defer { + count -= 1 + i += 1 + } + + if i >= self._storage.count { + i -= self._storage.count + } + + return self._storage[i] + } + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift b/RxTableViewDemo/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift new file mode 100644 index 0000000..0df1ce7 --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift @@ -0,0 +1,22 @@ +// +// DispatchQueue+Extensions.swift +// Platform +// +// Created by Krunoslav Zaher on 10/22/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation +import Dispatch + +extension DispatchQueue { + private static var token: DispatchSpecificKey<()> = { + let key = DispatchSpecificKey<()>() + DispatchQueue.main.setSpecific(key: key, value: ()) + return key + }() + + static var isMain: Bool { + return DispatchQueue.getSpecific(key: token) != nil + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/Platform/Platform.Darwin.swift b/RxTableViewDemo/Pods/RxSwift/Platform/Platform.Darwin.swift new file mode 100644 index 0000000..e0d7f0d --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/Platform/Platform.Darwin.swift @@ -0,0 +1,49 @@ +// +// Platform.Darwin.swift +// Platform +// +// Created by Krunoslav Zaher on 12/29/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + + import Darwin + import Foundation + + typealias AtomicInt = Int32 + + let AtomicCompareAndSwap = OSAtomicCompareAndSwap32Barrier + let AtomicIncrement = OSAtomicIncrement32Barrier + let AtomicDecrement = OSAtomicDecrement32Barrier + + extension Thread { + + static func setThreadLocalStorageValue(_ value: T?, forKey key: String + ) { + let currentThread = Thread.current + let threadDictionary = currentThread.threadDictionary + + if let newValue = value { + threadDictionary[key] = newValue + } + else { + threadDictionary[key] = nil + } + + } + static func getThreadLocalStorageValueForKey(_ key: String) -> T? { + let currentThread = Thread.current + let threadDictionary = currentThread.threadDictionary + + return threadDictionary[key] as? T + } + } + + extension AtomicInt { + func valueSnapshot() -> Int32 { + return self + } + } + +#endif diff --git a/RxTableViewDemo/Pods/RxSwift/Platform/Platform.Linux.swift b/RxTableViewDemo/Pods/RxSwift/Platform/Platform.Linux.swift new file mode 100644 index 0000000..ae5a49d --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/Platform/Platform.Linux.swift @@ -0,0 +1,97 @@ +// +// Platform.Linux.swift +// Platform +// +// Created by Krunoslav Zaher on 12/29/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#if os(Linux) + //////////////////////////////////////////////////////////////////////////////// + // This is not the greatest API in the world, this is just a tribute. + // !!! Proof of concept until libdispatch becomes operational. !!! + //////////////////////////////////////////////////////////////////////////////// + + import Foundation + import XCTest + import Glibc + import SwiftShims + + final class AtomicInt { + typealias IntegerLiteralType = Int + fileprivate var value: Int32 = 0 + fileprivate var _lock = NSRecursiveLock() + + func lock() { + _lock.lock() + } + func unlock() { + _lock.unlock() + } + + func valueSnapshot() -> Int32 { + return value + } + } + + extension AtomicInt: ExpressibleByIntegerLiteral { + convenience init(integerLiteral value: Int) { + self.init() + self.value = Int32(value) + } + } + + func >(lhs: AtomicInt, rhs: Int32) -> Bool { + return lhs.value > rhs + } + func ==(lhs: AtomicInt, rhs: Int32) -> Bool { + return lhs.value == rhs + } + + func AtomicIncrement(_ atomic: inout AtomicInt) -> Int32 { + atomic.lock(); defer { atomic.unlock() } + atomic.value += 1 + return atomic.value + } + + func AtomicDecrement(_ atomic: inout AtomicInt) -> Int32 { + atomic.lock(); defer { atomic.unlock() } + atomic.value -= 1 + return atomic.value + } + + func AtomicCompareAndSwap(_ l: Int32, _ r: Int32, _ atomic: inout AtomicInt) -> Bool { + atomic.lock(); defer { atomic.unlock() } + if atomic.value == l { + atomic.value = r + return true + } + + return false + } + + extension Thread { + + static func setThreadLocalStorageValue(_ value: T?, forKey key: String) { + let currentThread = Thread.current + var threadDictionary = currentThread.threadDictionary + + if let newValue = value { + threadDictionary[key] = newValue + } + else { + threadDictionary[key] = nil + } + + currentThread.threadDictionary = threadDictionary + } + + static func getThreadLocalStorageValueForKey(_ key: String) -> T? { + let currentThread = Thread.current + let threadDictionary = currentThread.threadDictionary + + return threadDictionary[key] as? T + } + } + +#endif diff --git a/RxTableViewDemo/Pods/RxSwift/README.md b/RxTableViewDemo/Pods/RxSwift/README.md index b5d5519..c80e351 100644 --- a/RxTableViewDemo/Pods/RxSwift/README.md +++ b/RxTableViewDemo/Pods/RxSwift/README.md @@ -1,18 +1,19 @@ Miss Electric Eel 2016 RxSwift: ReactiveX for Swift ====================================== -[![Travis CI](https://travis-ci.org/ReactiveX/RxSwift.svg?branch=master)](https://travis-ci.org/ReactiveX/RxSwift) ![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20OSX%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux%28experimental%29-333333.svg) ![pod](https://img.shields.io/cocoapods/v/RxSwift.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Travis CI](https://travis-ci.org/ReactiveX/RxSwift.svg?branch=master)](https://travis-ci.org/ReactiveX/RxSwift) ![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-333333.svg) ![pod](https://img.shields.io/cocoapods/v/RxSwift.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) +## About Rx -Xcode 7.3 Swift 2.2 required +**:warning: This readme describes RxSwift 3.0 version that requires Swift 3.0.** -## About Rx +**:warning: If you are looking for Swift 2.3 compatible version, please take a look at RxSwift ~> 2.0 versions and [swift-2.3](https://github.com/ReactiveX/RxSwift/tree/rxswift-2.0) branch.** Rx is a [generic abstraction of computation](https://youtu.be/looJcaeboBY) expressed through `Observable` interface. This is a Swift version of [Rx](https://github.com/Reactive-Extensions/Rx.NET). -It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/OSX environment. +It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS environment. Cross platform documentation can be found on [ReactiveX.io](http://reactivex.io/). @@ -32,21 +33,20 @@ KVO observing, async operations and streams are all unified under [abstraction o * [debugging](Documentation/GettingStarted.md#debugging) * [the math behind Rx](Documentation/MathBehindRx.md) * [what are hot and cold observable sequences?](Documentation/HotAndColdObservables.md) -* [what does the the public API look like?](Documentation/API.md) ###### ... install -* Integrate RxSwift/RxCocoa with my app. [Installation Guide](Documentation/Installation.md) +* Integrate RxSwift/RxCocoa with my app. [Installation Guide](#installation) ###### ... hack around -* with example app. [Running Example App](Documentation/ExampleApp.md) +* with the example app. [Running Example App](Documentation/ExampleApp.md) * with operators in playgrounds. [Playgrounds](Documentation/Playgrounds.md) ###### ... interact -* All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences.
[![Slack channel](http://slack.rxswift.org/badge.svg)](http://slack.rxswift.org) [Join Slack Channel](http://slack.rxswift.org/) -* Report a problem using the library. [Open an Issue With Bug Template](Documentation/IssueTemplate.md) +* All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences.
[![Slack channel](http://rxswift-slack.herokuapp.com/badge.svg)](http://slack.rxswift.org) [Join Slack Channel](http://rxswift-slack.herokuapp.com) +* Report a problem using the library. [Open an Issue With Bug Template](.github/ISSUE_TEMPLATE.md) * Request a new feature. [Open an Issue With Feature Request Template](Documentation/NewFeatureRequestTemplate.md) @@ -65,7 +65,138 @@ KVO observing, async operations and streams are all unified under [abstraction o * Does this exist for Android? [RxJava](https://github.com/ReactiveX/RxJava) * Where is all of this going, what is the future, what about reactive architectures, how do you design entire apps this way? [Cycle.js](https://github.com/cyclejs/cycle-core) - this is javascript, but [RxJS](https://github.com/Reactive-Extensions/RxJS) is javascript version of Rx. -##### References +## Usage + + + + + + + + + + + + + + + + + + + +
Here's an exampleIn Action
Define search for GitHub repositories ...
+let searchResults = searchBar.rx.text.orEmpty
+    .throttle(0.3, scheduler: MainScheduler.instance)
+    .distinctUntilChanged()
+    .flatMapLatest { query -> Observable<[Repository]> in
+        if query.isEmpty {
+            return .just([])
+        }
+
+        return searchGitHub(query)
+            .catchErrorJustReturn([])
+    }
+    .observeOn(MainScheduler.instance)
... then bind the results to your tableview
+searchResults
+    .bindTo(tableView.rx.items(cellIdentifier: "Cell")) {
+        (index, repository: Repository, cell) in
+        cell.textLabel?.text = repository.name
+        cell.detailTextLabel?.text = repository.url
+    }
+    .addDisposableTo(disposeBag)
+ + +## Requirements + +* Xcode 8.0 +* Swift 3.0 + +## Installation + +Rx doesn't contain any external dependencies. + +These are currently the supported options: + +### Manual + +Open Rx.xcworkspace, choose `RxExample` and hit run. This method will build everything and run the sample app + +### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html) + +**Tested with `pod --version`: `1.1.1`** + +``` +# Podfile +use_frameworks! + +target 'YOUR_TARGET_NAME' do + pod 'RxSwift', '~> 3.0' + pod 'RxCocoa', '~> 3.0' +end + +# RxTests and RxBlocking make the most sense in the context of unit/integration tests +target 'YOUR_TESTING_TARGET' do + pod 'RxBlocking', '~> 3.0' + pod 'RxTest', '~> 3.0' +end +``` + +Replace `YOUR_TARGET_NAME` and then, in the `Podfile` directory, type: + +``` +$ pod install +``` + +### [Carthage](https://github.com/Carthage/Carthage) + +**Tested with `carthage version`: `0.18.1`** + +Add this to `Cartfile` + +``` +github "ReactiveX/RxSwift" ~> 3.0 +``` + +``` +$ carthage update +``` + +### [Swift Package Manager](https://github.com/apple/swift-package-manager) + +**Tested with `swift build --version`: `3.0.0 (swiftpm-19)`** + +Create a `Package.swift` file. + +``` +import PackageDescription + +let package = Package( + name: "RxTestProject", + targets: [], + dependencies: [ + .Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 3) + ] +) +``` + +``` +$ swift build +``` + +### Manually using git submodules + +* Add RxSwift as a submodule + +``` +$ git submodule add git@github.com:ReactiveX/RxSwift.git +``` + +* Drag `Rx.xcodeproj` into Project Navigator +* Go to `Project > Targets > Build Phases > Link Binary With Libraries`, click `+` and select `RxSwift-[Platform]` and `RxCocoa-[Platform]` targets + + +## References * [http://reactivex.io/](http://reactivex.io/) * [Reactive Extensions GitHub (GitHub)](https://github.com/Reactive-Extensions) diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/AnyObserver.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/AnyObserver.swift index 88a8440..cab759a 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/AnyObserver.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/AnyObserver.swift @@ -1,6 +1,6 @@ // // AnyObserver.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/28/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,68 +8,62 @@ import Foundation -/** -A type-erased `ObserverType`. - -Forwards operations to an arbitrary underlying observer with the same `Element` type, hiding the specifics of the underlying observer type. -*/ +/// A type-erased `ObserverType`. +/// +/// Forwards operations to an arbitrary underlying observer with the same `Element` type, hiding the specifics of the underlying observer type. public struct AnyObserver : ObserverType { - /** - The type of elements in sequence that observer can observe. - */ + /// The type of elements in sequence that observer can observe. public typealias E = Element - /** - Anonymous event handler type. - */ + /// Anonymous event handler type. public typealias EventHandler = (Event) -> Void - public let observer: EventHandler + private let observer: EventHandler - /** - Construct an instance whose `on(event)` calls `eventHandler(event)` - - - parameter eventHandler: Event handler that observes sequences events. - */ - public init(eventHandler: EventHandler) { + /// Construct an instance whose `on(event)` calls `eventHandler(event)` + /// + /// - parameter eventHandler: Event handler that observes sequences events. + public init(eventHandler: @escaping EventHandler) { self.observer = eventHandler } - /** - Construct an instance whose `on(event)` calls `observer.on(event)` - - - parameter observer: Observer that receives sequence events. - */ - public init(_ observer: O) { + /// Construct an instance whose `on(event)` calls `observer.on(event)` + /// + /// - parameter observer: Observer that receives sequence events. + public init(_ observer: O) where O.E == Element { self.observer = observer.on } - /** - Send `event` to this observer. - - - parameter event: Event instance. - */ - public func on(event: Event) { + /// Send `event` to this observer. + /// + /// - parameter event: Event instance. + public func on(_ event: Event) { return self.observer(event) } - /** - Erases type of observer and returns canonical observer. - - - returns: type erased observer. - */ + /// Erases type of observer and returns canonical observer. + /// + /// - returns: type erased observer. public func asObserver() -> AnyObserver { return self } } extension ObserverType { - /** - Erases type of observer and returns canonical observer. - - - returns: type erased observer. - */ + /// Erases type of observer and returns canonical observer. + /// + /// - returns: type erased observer. public func asObserver() -> AnyObserver { return AnyObserver(self) } -} \ No newline at end of file + + /// Transforms observer of type R to type E using custom transform method. + /// Each event sent to result observer is transformed and sent to `self`. + /// + /// - returns: observer that transforms events. + public func mapObserver(_ transform: @escaping (R) throws -> E) -> AnyObserver { + return AnyObserver { e in + self.on(e.map(transform)) + } + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Cancelable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Cancelable.swift index 1a6c591..2398be6 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Cancelable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Cancelable.swift @@ -1,6 +1,6 @@ // // Cancelable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/12/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,12 +8,8 @@ import Foundation -/** -Represents disposable resource with state tracking. -*/ +/// Represents disposable resource with state tracking. public protocol Cancelable : Disposable { - /** - - returns: Was resource disposed. - */ - var disposed: Bool { get } -} \ No newline at end of file + /// Was resource disposed. + var isDisposed: Bool { get } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift index e39fa6c..3ba6ed2 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift @@ -1,6 +1,6 @@ // // AsyncLock.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -41,7 +41,7 @@ class AsyncLock } // } - private func enqueue(action: I) -> I? { + private func enqueue(_ action: I) -> I? { _lock.lock(); defer { _lock.unlock() } // { if _hasFaulted { return nil @@ -70,7 +70,7 @@ class AsyncLock // } } - func invoke(action: I) { + func invoke(_ action: I) { let firstEnqueuedAction = enqueue(action) if let firstEnqueuedAction = firstEnqueuedAction { diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/Lock.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/Lock.swift index 048ac50..78ec442 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/Lock.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/Lock.swift @@ -1,6 +1,6 @@ // // Lock.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/31/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -13,107 +13,26 @@ protocol Lock { func unlock() } -#if os(Linux) - import Glibc - - /** - Simple wrapper for spin lock. - */ - class SpinLock { - private var _lock: pthread_spinlock_t = 0 - - init() { - if (pthread_spin_init(&_lock, 0) != 0) { - fatalError("Spin lock initialization failed") - } - } - - func lock() { - pthread_spin_lock(&_lock) - } - - func unlock() { - pthread_spin_unlock(&_lock) - } - - func performLocked(@noescape action: () -> Void) { - pthread_spin_lock(&_lock) - action() - pthread_spin_unlock(&_lock) - } - - func calculateLocked(@noescape action: () -> T) -> T { - pthread_spin_lock(&_lock) - let result = action() - pthread_spin_unlock(&_lock) - return result - } - - func calculateLockedOrFail(@noescape action: () throws -> T) throws -> T { - pthread_spin_lock(&_lock) - defer { - pthread_spin_unlock(&_lock) - } - let result = try action() - return result - } - - deinit { - pthread_spin_destroy(&_lock) - } - } -#else - - // https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html - typealias SpinLock = NSRecursiveLock -#endif +// https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html +typealias SpinLock = NSRecursiveLock extension NSRecursiveLock : Lock { - func performLocked(@noescape action: () -> Void) { - self.lock() + @inline(__always) + func performLocked(_ action: () -> Void) { + lock(); defer { unlock() } action() - self.unlock() } - func calculateLocked(@noescape action: () -> T) -> T { - self.lock() - let result = action() - self.unlock() - return result + @inline(__always) + func calculateLocked(_ action: () -> T) -> T { + lock(); defer { unlock() } + return action() } - func calculateLockedOrFail(@noescape action: () throws -> T) throws -> T { - self.lock() - defer { - self.unlock() - } + @inline(__always) + func calculateLockedOrFail(_ action: () throws -> T) throws -> T { + lock(); defer { unlock() } let result = try action() return result } } - -/* -let RECURSIVE_MUTEX = _initializeRecursiveMutex() - -func _initializeRecursiveMutex() -> pthread_mutex_t { - var mutex: pthread_mutex_t = pthread_mutex_t() - var mta: pthread_mutexattr_t = pthread_mutexattr_t() - - pthread_mutex_init(&mutex, nil) - pthread_mutexattr_init(&mta) - pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE) - pthread_mutex_init(&mutex, &mta) - - return mutex -} - -extension pthread_mutex_t { - mutating func lock() { - pthread_mutex_lock(&self) - } - - mutating func unlock() { - pthread_mutex_unlock(&self) - } -} -*/ diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift index b11fcaa..41595a9 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift @@ -1,6 +1,6 @@ // // LockOwnerType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -20,4 +20,4 @@ extension LockOwnerType { func unlock() { _lock.unlock() } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift index 5764575..9bd95b9 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift @@ -1,6 +1,6 @@ // // SynchronizedDisposeType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -17,4 +17,4 @@ extension SynchronizedDisposeType { lock(); defer { unlock() } _synchronized_dispose() } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift index 84a3df5..3c383d1 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift @@ -1,6 +1,6 @@ // // SynchronizedOnType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,12 +9,12 @@ import Foundation protocol SynchronizedOnType : class, ObserverType, Lock { - func _synchronized_on(event: Event) + func _synchronized_on(_ event: Event) } extension SynchronizedOnType { - func synchronizedOn(event: Event) { + func synchronizedOn(_ event: Event) { lock(); defer { unlock() } _synchronized_on(event) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift index a490315..ca79012 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift @@ -1,6 +1,6 @@ // // SynchronizedSubscribeType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,12 +9,12 @@ import Foundation protocol SynchronizedSubscribeType : class, ObservableType, Lock { - func _synchronized_subscribe(observer: O) -> Disposable + func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == E } extension SynchronizedSubscribeType { - func synchronizedSubscribe(observer: O) -> Disposable { + func synchronizedSubscribe(_ observer: O) -> Disposable where O.E == E { lock(); defer { unlock() } return _synchronized_subscribe(observer) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift index 4f41cb8..fc82ddd 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift @@ -1,6 +1,6 @@ // // SynchronizedUnsubscribeType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -11,5 +11,5 @@ import Foundation protocol SynchronizedUnsubscribeType : class { associatedtype DisposeKey - func synchronizedUnsubscribe(disposeKey: DisposeKey) -} \ No newline at end of file + func synchronizedUnsubscribe(_ disposeKey: DisposeKey) +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/ConnectableObservableType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/ConnectableObservableType.swift index 6722a4c..bf8f5f0 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/ConnectableObservableType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/ConnectableObservableType.swift @@ -1,6 +1,6 @@ // // ConnectableObservableType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/1/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -18,4 +18,4 @@ public protocol ConnectableObservableType : ObservableType { - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence. */ func connect() -> Disposable -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/Bag.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/Bag.swift deleted file mode 100644 index fe074de..0000000 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/DataStructures/Bag.swift +++ /dev/null @@ -1,327 +0,0 @@ -// -// Bag.swift -// Rx -// -// Created by Krunoslav Zaher on 2/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -import Swift - -let arrayDictionaryMaxSize = 30 - -/** -Class that enables using memory allocations as a means to uniquely identify objects. -*/ -class Identity { - // weird things have known to happen with Swift - var _forceAllocation: Int32 = 0 -} - -func hash(_x: Int) -> Int { - var x = _x - x = ((x >> 16) ^ x) &* 0x45d9f3b - x = ((x >> 16) ^ x) &* 0x45d9f3b - x = ((x >> 16) ^ x) - return x; -} - -/** -Unique identifier for object added to `Bag`. -*/ -public struct BagKey : Hashable { - let uniqueIdentity: Identity? - let key: Int - - public var hashValue: Int { - if let uniqueIdentity = uniqueIdentity { - return hash(key) ^ (unsafeAddressOf(uniqueIdentity).hashValue) - } - else { - return hash(key) - } - } -} - -/** -Compares two `BagKey`s. -*/ -public func == (lhs: BagKey, rhs: BagKey) -> Bool { - return lhs.key == rhs.key && lhs.uniqueIdentity === rhs.uniqueIdentity -} - -/** -Data structure that represents a bag of elements typed `T`. - -Single element can be stored multiple times. - -Time and space complexity of insertion an deletion is O(n). - -It is suitable for storing small number of elements. -*/ -public struct Bag : CustomDebugStringConvertible { - /** - Type of identifier for inserted elements. - */ - public typealias KeyType = BagKey - - private typealias ScopeUniqueTokenType = Int - - typealias Entry = (key: BagKey, value: T) - - private var _uniqueIdentity: Identity? - private var _nextKey: ScopeUniqueTokenType = 0 - - // data - - // first fill inline variables - private var _key0: BagKey? = nil - private var _value0: T? = nil - - private var _key1: BagKey? = nil - private var _value1: T? = nil - - // then fill "array dictionary" - private var _pairs = ContiguousArray() - - // last is sparse dictionary - private var _dictionary: [BagKey : T]? = nil - - private var _onlyFastPath = true - - /** - Creates new empty `Bag`. - */ - public init() { - } - - /** - Inserts `value` into bag. - - - parameter element: Element to insert. - - returns: Key that can be used to remove element from bag. - */ - public mutating func insert(element: T) -> BagKey { - _nextKey = _nextKey &+ 1 - -#if DEBUG - _nextKey = _nextKey % 20 -#endif - - if _nextKey == 0 { - _uniqueIdentity = Identity() - } - - let key = BagKey(uniqueIdentity: _uniqueIdentity, key: _nextKey) - - if _key0 == nil { - _key0 = key - _value0 = element - return key - } - - _onlyFastPath = false - - if _key1 == nil { - _key1 = key - _value1 = element - return key - } - - if _dictionary != nil { - _dictionary![key] = element - return key - } - - if _pairs.count < arrayDictionaryMaxSize { - _pairs.append(key: key, value: element) - return key - } - - if _dictionary == nil { - _dictionary = [:] - } - - _dictionary![key] = element - - return key - } - - /** - - returns: Number of elements in bag. - */ - public var count: Int { - return _pairs.count + (_value0 != nil ? 1 : 0) + (_value1 != nil ? 1 : 0) + (_dictionary?.count ?? 0) - } - - /** - Removes all elements from bag and clears capacity. - */ - public mutating func removeAll() { - _key0 = nil - _value0 = nil - _key1 = nil - _value1 = nil - - _pairs.removeAll(keepCapacity: false) - _dictionary?.removeAll(keepCapacity: false) - } - - /** - Removes element with a specific `key` from bag. - - - parameter key: Key that identifies element to remove from bag. - - returns: Element that bag contained, or nil in case element was already removed. - */ - public mutating func removeKey(key: BagKey) -> T? { - if _key0 == key { - _key0 = nil - let value = _value0! - _value0 = nil - return value - } - - if _key1 == key { - _key1 = nil - let value = _value1! - _value1 = nil - return value - } - - if let existingObject = _dictionary?.removeValueForKey(key) { - return existingObject - } - - for i in 0 ..< _pairs.count { - if _pairs[i].key == key { - let value = _pairs[i].value - _pairs.removeAtIndex(i) - return value - } - } - - return nil - } -} - -extension Bag { - /** - A textual representation of `self`, suitable for debugging. - */ - public var debugDescription : String { - return "\(self.count) elements in Bag" - } -} - - -// MARK: forEach - -extension Bag { - /** - Enumerates elements inside the bag. - - - parameter action: Enumeration closure. - */ - public func forEach(@noescape action: (T) -> Void) { - if _onlyFastPath { - if let value0 = _value0 { - action(value0) - } - return - } - - let pairs = _pairs - let value0 = _value0 - let value1 = _value1 - let dictionary = _dictionary - - if let value0 = value0 { - action(value0) - } - - if let value1 = value1 { - action(value1) - } - - for i in 0 ..< pairs.count { - action(pairs[i].value) - } - - if dictionary?.count ?? 0 > 0 { - for element in dictionary!.values { - action(element) - } - } - } -} - -extension Bag where T: ObserverType { - /** - Dispatches `event` to app observers contained inside bag. - - - parameter action: Enumeration closure. - */ - public func on(event: Event) { - if _onlyFastPath { - _value0?.on(event) - return - } - - let pairs = _pairs - let value0 = _value0 - let value1 = _value1 - let dictionary = _dictionary - - if let value0 = value0 { - value0.on(event) - } - - if let value1 = value1 { - value1.on(event) - } - - for i in 0 ..< pairs.count { - pairs[i].value.on(event) - } - - if dictionary?.count ?? 0 > 0 { - for element in dictionary!.values { - element.on(event) - } - } - } -} - -/** -Dispatches `dispose` to all disposables contained inside bag. -*/ -public func disposeAllIn(bag: Bag) { - if bag._onlyFastPath { - bag._value0?.dispose() - return - } - - let pairs = bag._pairs - let value0 = bag._value0 - let value1 = bag._value1 - let dictionary = bag._dictionary - - if let value0 = value0 { - value0.dispose() - } - - if let value1 = value1 { - value1.dispose() - } - - for i in 0 ..< pairs.count { - pairs[i].value.dispose() - } - - if dictionary?.count ?? 0 > 0 { - for element in dictionary!.values { - element.dispose() - } - } -} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposable.swift index a785d36..11e5d16 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposable.swift @@ -1,6 +1,6 @@ // // Disposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,12 +8,8 @@ import Foundation -/** -Respresents disposable resource. -*/ +/// Respresents a disposable resource. public protocol Disposable { - /** - Dispose resource. - */ + /// Dispose resource. func dispose() -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift index 17a4091..74461a6 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift @@ -1,6 +1,6 @@ // // AnonymousDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,42 +8,40 @@ import Foundation -/** -Represents an Action-based disposable. - -When dispose method is called, disposal action will be dereferenced. -*/ -public final class AnonymousDisposable : DisposeBase, Cancelable { +/// Represents an Action-based disposable. +/// +/// When dispose method is called, disposal action will be dereferenced. +fileprivate final class AnonymousDisposable : DisposeBase, Cancelable { public typealias DisposeAction = () -> Void - private var _disposed: AtomicInt = 0 + private var _isDisposed: AtomicInt = 0 private var _disposeAction: DisposeAction? - /** - - returns: Was resource disposed. - */ - public var disposed: Bool { - return _disposed == 1 + /// - returns: Was resource disposed. + public var isDisposed: Bool { + return _isDisposed == 1 } - /** - Constructs a new disposable with the given action used for disposal. - - - parameter disposeAction: Disposal action which will be run upon calling `dispose`. - */ - public init(_ disposeAction: DisposeAction) { + /// Constructs a new disposable with the given action used for disposal. + /// + /// - parameter disposeAction: Disposal action which will be run upon calling `dispose`. + fileprivate init(_ disposeAction: @escaping DisposeAction) { _disposeAction = disposeAction super.init() } - - /** - Calls the disposal action if and only if the current instance hasn't been disposed yet. - - After invoking disposal action, disposal action will be dereferenced. - */ - public func dispose() { - if AtomicCompareAndSwap(0, 1, &_disposed) { - assert(_disposed == 1) + + // Non-deprecated version of the constructor, used by `Disposables.create(with:)` + fileprivate init(disposeAction: @escaping DisposeAction) { + _disposeAction = disposeAction + super.init() + } + + /// Calls the disposal action if and only if the current instance hasn't been disposed yet. + /// + /// After invoking disposal action, disposal action will be dereferenced. + fileprivate func dispose() { + if AtomicCompareAndSwap(0, 1, &_isDisposed) { + assert(_isDisposed == 1) if let action = _disposeAction { _disposeAction = nil @@ -52,3 +50,14 @@ public final class AnonymousDisposable : DisposeBase, Cancelable { } } } + +extension Disposables { + + /// Constructs a new disposable with the given action used for disposal. + /// + /// - parameter dispose: Disposal action which will be run upon calling `dispose`. + public static func create(with dispose: @escaping () -> ()) -> Cancelable { + return AnonymousDisposable(disposeAction: dispose) + } + +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift index b617659..aef8200 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift @@ -8,43 +8,35 @@ import Foundation -/** -Represents two disposable resources that are disposed together. -*/ -public final class BinaryDisposable : DisposeBase, Cancelable { +/// Represents two disposable resources that are disposed together. +private final class BinaryDisposable : DisposeBase, Cancelable { - private var _disposed: AtomicInt = 0 + private var _isDisposed: AtomicInt = 0 // state private var _disposable1: Disposable? private var _disposable2: Disposable? - /** - - returns: Was resource disposed. - */ - public var disposed: Bool { - return _disposed > 0 + /// - returns: Was resource disposed. + var isDisposed: Bool { + return _isDisposed > 0 } - /** - Constructs new binary disposable from two disposables. - - - parameter disposable1: First disposable - - parameter disposable2: Second disposable - */ + /// Constructs new binary disposable from two disposables. + /// + /// - parameter disposable1: First disposable + /// - parameter disposable2: Second disposable init(_ disposable1: Disposable, _ disposable2: Disposable) { _disposable1 = disposable1 _disposable2 = disposable2 super.init() } - /** - Calls the disposal action if and only if the current instance hasn't been disposed yet. - - After invoking disposal action, disposal action will be dereferenced. - */ - public func dispose() { - if AtomicCompareAndSwap(0, 1, &_disposed) { + /// Calls the disposal action if and only if the current instance hasn't been disposed yet. + /// + /// After invoking disposal action, disposal action will be dereferenced. + func dispose() { + if AtomicCompareAndSwap(0, 1, &_isDisposed) { _disposable1?.dispose() _disposable2?.dispose() _disposable1 = nil @@ -52,3 +44,12 @@ public final class BinaryDisposable : DisposeBase, Cancelable { } } } + +extension Disposables { + + /// Creates a disposable with the given disposables. + public static func create(_ disposable1: Disposable, _ disposable2: Disposable) -> Cancelable { + return BinaryDisposable(disposable1, disposable2) + } + +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift index 05b8a43..bdd285e 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift @@ -1,6 +1,6 @@ // // BooleanDisposable.swift -// Rx +// RxSwift // // Created by Junior B. on 10/29/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,38 +8,28 @@ import Foundation -/** -Represents a disposable resource that can be checked for disposal status. -*/ -public class BooleanDisposable : Disposable, Cancelable { - - internal static let BooleanDisposableTrue = BooleanDisposable(disposed: true) - private var _disposed = false +/// Represents a disposable resource that can be checked for disposal status. +public final class BooleanDisposable : Disposable, Cancelable { + + internal static let BooleanDisposableTrue = BooleanDisposable(isDisposed: true) + private var _isDisposed = false - /** - Initializes a new instance of the `BooleanDisposable` class - */ + /// Initializes a new instance of the `BooleanDisposable` class public init() { } - /** - Initializes a new instance of the `BooleanDisposable` class with given value - */ - public init(disposed: Bool) { - self._disposed = disposed + /// Initializes a new instance of the `BooleanDisposable` class with given value + public init(isDisposed: Bool) { + self._isDisposed = isDisposed } - /** - - returns: Was resource disposed. - */ - public var disposed: Bool { - return _disposed + /// - returns: Was resource disposed. + public var isDisposed: Bool { + return _isDisposed } - /** - Sets the status to disposed, which can be observer through the `disposed` property. - */ + /// Sets the status to disposed, which can be observer through the `isDisposed` property. public func dispose() { - _disposed = true + _isDisposed = true } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift index dbf5068..e8c31df 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift @@ -1,6 +1,6 @@ // // CompositeDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/20/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,18 +8,22 @@ import Foundation -/** -Represents a group of disposable resources that are disposed together. -*/ -public class CompositeDisposable : DisposeBase, Disposable, Cancelable { - public typealias DisposeKey = Bag.KeyType - +/// Represents a group of disposable resources that are disposed together. +public final class CompositeDisposable : DisposeBase, Disposable, Cancelable { + /// Key used to remove disposable from composite disposable + public struct DisposeKey { + fileprivate let key: BagKey + fileprivate init(key: BagKey) { + self.key = key + } + } + private var _lock = SpinLock() // state private var _disposables: Bag? = Bag() - public var disposed: Bool { + public var isDisposed: Bool { _lock.lock(); defer { _lock.unlock() } return _disposables == nil } @@ -27,83 +31,87 @@ public class CompositeDisposable : DisposeBase, Disposable, Cancelable { public override init() { } - /** - Initializes a new instance of composite disposable with the specified number of disposables. - */ + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(_ disposable1: Disposable, _ disposable2: Disposable) { - _disposables!.insert(disposable1) - _disposables!.insert(disposable2) + // This overload is here to make sure we are using optimized version up to 4 arguments. + let _ = _disposables!.insert(disposable1) + let _ = _disposables!.insert(disposable2) } - /** - Initializes a new instance of composite disposable with the specified number of disposables. - */ + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) { - _disposables!.insert(disposable1) - _disposables!.insert(disposable2) - _disposables!.insert(disposable3) + // This overload is here to make sure we are using optimized version up to 4 arguments. + let _ = _disposables!.insert(disposable1) + let _ = _disposables!.insert(disposable2) + let _ = _disposables!.insert(disposable3) } - /** - Initializes a new instance of composite disposable with the specified number of disposables. - */ + /// Initializes a new instance of composite disposable with the specified number of disposables. + public init(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposable4: Disposable, _ disposables: Disposable...) { + // This overload is here to make sure we are using optimized version up to 4 arguments. + let _ = _disposables!.insert(disposable1) + let _ = _disposables!.insert(disposable2) + let _ = _disposables!.insert(disposable3) + let _ = _disposables!.insert(disposable4) + + for disposable in disposables { + let _ = _disposables!.insert(disposable) + } + } + + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(disposables: [Disposable]) { for disposable in disposables { - _disposables!.insert(disposable) + let _ = _disposables!.insert(disposable) } } /** - Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. - - - parameter disposable: Disposable to add. - - returns: Key that can be used to remove disposable from composite disposable. In case dispose bag was already - disposed `nil` will be returned. - */ - public func addDisposable(disposable: Disposable) -> DisposeKey? { - let key = _addDisposable(disposable) - + Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. + + - parameter disposable: Disposable to add. + - returns: Key that can be used to remove disposable from composite disposable. In case dispose bag was already + disposed `nil` will be returned. + */ + public func insert(_ disposable: Disposable) -> DisposeKey? { + let key = _insert(disposable) + if key == nil { disposable.dispose() } return key } - - private func _addDisposable(disposable: Disposable) -> DisposeKey? { + + private func _insert(_ disposable: Disposable) -> DisposeKey? { _lock.lock(); defer { _lock.unlock() } - return _disposables?.insert(disposable) + let bagKey = _disposables?.insert(disposable) + return bagKey.map(DisposeKey.init) } - /** - - returns: Gets the number of disposables contained in the `CompositeDisposable`. - */ + /// - returns: Gets the number of disposables contained in the `CompositeDisposable`. public var count: Int { _lock.lock(); defer { _lock.unlock() } return _disposables?.count ?? 0 } - /** - Removes and disposes the disposable identified by `disposeKey` from the CompositeDisposable. - - - parameter disposeKey: Key used to identify disposable to be removed. - */ - public func removeDisposable(disposeKey: DisposeKey) { - _removeDisposable(disposeKey)?.dispose() + /// Removes and disposes the disposable identified by `disposeKey` from the CompositeDisposable. + /// + /// - parameter disposeKey: Key used to identify disposable to be removed. + public func remove(for disposeKey: DisposeKey) { + _remove(for: disposeKey)?.dispose() } - - private func _removeDisposable(disposeKey: DisposeKey) -> Disposable? { + + private func _remove(for disposeKey: DisposeKey) -> Disposable? { _lock.lock(); defer { _lock.unlock() } - return _disposables?.removeKey(disposeKey) + return _disposables?.removeKey(disposeKey.key) } - /** - Disposes all disposables in the group and removes them from the group. - */ + /// Disposes all disposables in the group and removes them from the group. public func dispose() { if let disposables = _dispose() { - disposeAllIn(disposables) + disposeAll(in: disposables) } } @@ -115,4 +123,31 @@ public class CompositeDisposable : DisposeBase, Disposable, Cancelable { return disposeBag } -} \ No newline at end of file +} + +extension Disposables { + + /// Creates a disposable with the given disposables. + public static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) -> Cancelable { + return CompositeDisposable(disposable1, disposable2, disposable3) + } + + /// Creates a disposable with the given disposables. + public static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposables: Disposable ...) -> Cancelable { + var disposables = disposables + disposables.append(disposable1) + disposables.append(disposable2) + disposables.append(disposable3) + return CompositeDisposable(disposables: disposables) + } + + /// Creates a disposable with the given disposables. + public static func create(_ disposables: [Disposable]) -> Cancelable { + switch disposables.count { + case 2: + return Disposables.create(disposables[0], disposables[1]) + default: + return CompositeDisposable(disposables: disposables) + } + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/Disposables.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/Disposables.swift new file mode 100644 index 0000000..b409d52 --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/Disposables.swift @@ -0,0 +1,15 @@ +// +// Disposables.swift +// RxSwift +// +// Created by Mohsen Ramezanpoor on 01/08/2016. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +/// A collection of utility methods for common disposable operations. +public struct Disposables { + private init() {} +} + diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift index 50b4447..d9cb86f 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift @@ -1,6 +1,6 @@ // // DisposeBag.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,13 +9,11 @@ import Foundation extension Disposable { - /** - Adds `self` to `bag`. - - - parameter bag: `DisposeBag` to add `self` to. - */ - public func addDisposableTo(bag: DisposeBag) { - bag.addDisposable(self) + /// Adds `self` to `bag`. + /// + /// - parameter bag: `DisposeBag` to add `self` to. + public func addDisposableTo(_ bag: DisposeBag) { + bag.insert(self) } } @@ -31,33 +29,29 @@ or create a new one in its place. In case explicit disposal is necessary, there is also `CompositeDisposable`. */ -public class DisposeBag: DisposeBase { +public final class DisposeBag: DisposeBase { private var _lock = SpinLock() // state private var _disposables = [Disposable]() - private var _disposed = false + private var _isDisposed = false - /** - Constructs new empty dispose bag. - */ + /// Constructs new empty dispose bag. public override init() { super.init() } - /** - Adds `disposable` to be disposed when dispose bag is being deinited. - - - parameter disposable: Disposable to add. - */ - public func addDisposable(disposable: Disposable) { - _addDisposable(disposable)?.dispose() + /// Adds `disposable` to be disposed when dispose bag is being deinited. + /// + /// - parameter disposable: Disposable to add. + public func insert(_ disposable: Disposable) { + _insert(disposable)?.dispose() } - - private func _addDisposable(disposable: Disposable) -> Disposable? { + + private func _insert(_ disposable: Disposable) -> Disposable? { _lock.lock(); defer { _lock.unlock() } - if _disposed { + if _isDisposed { return disposable } @@ -66,9 +60,7 @@ public class DisposeBag: DisposeBase { return nil } - /** - This is internal on purpose, take a look at `CompositeDisposable` instead. - */ + /// This is internal on purpose, take a look at `CompositeDisposable` instead. private func dispose() { let oldDisposables = _dispose() @@ -82,8 +74,8 @@ public class DisposeBag: DisposeBase { let disposables = _disposables - _disposables.removeAll(keepCapacity: false) - _disposed = true + _disposables.removeAll(keepingCapacity: false) + _isDisposed = true return disposables } @@ -91,4 +83,4 @@ public class DisposeBag: DisposeBase { deinit { dispose() } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift index 53c4328..0a363bb 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift @@ -1,6 +1,6 @@ // // DisposeBase.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 4/4/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,19 +8,17 @@ import Foundation -/** -Base class for all disposables. -*/ +/// Base class for all disposables. public class DisposeBase { init() { #if TRACE_RESOURCES - AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif } deinit { #if TRACE_RESOURCES - AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() #endif } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/NAryDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/NAryDisposable.swift deleted file mode 100644 index b39cd98..0000000 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/NAryDisposable.swift +++ /dev/null @@ -1,10 +0,0 @@ -// This file is autogenerated. Take a look at `Preprocessor` target in RxSwift project -// -// NAryDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/20/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift index fe8a0c7..9f1df16 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift @@ -1,6 +1,6 @@ // // NopDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,25 +8,27 @@ import Foundation -/** -Represents a disposable that does nothing on disposal. - -Nop = No Operation -*/ -public struct NopDisposable : Disposable { +/// Represents a disposable that does nothing on disposal. +/// +/// Nop = No Operation +fileprivate struct NopDisposable : Disposable { - /** - Singleton instance of `NopDisposable`. - */ - public static let instance: Disposable = NopDisposable() + fileprivate static let noOp: Disposable = NopDisposable() - init() { + fileprivate init() { } - /** - Does nothing. - */ + /// Does nothing. public func dispose() { } -} \ No newline at end of file +} + +extension Disposables { + /** + Creates a disposable that does nothing on disposal. + */ + static public func create() -> Disposable { + return NopDisposable.noOp + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift index 2d29d74..df0ab3e 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift @@ -1,6 +1,6 @@ // // RefCountDisposable.swift -// Rx +// RxSwift // // Created by Junior B. on 10/29/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,26 +8,20 @@ import Foundation -/** - Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. - */ -public class RefCountDisposable : DisposeBase, Cancelable { +/// Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. +public final class RefCountDisposable : DisposeBase, Cancelable { private var _lock = SpinLock() private var _disposable = nil as Disposable? private var _primaryDisposed = false private var _count = 0 - /** - - returns: Was resource disposed. - */ - public var disposed: Bool { + /// - returns: Was resource disposed. + public var isDisposed: Bool { _lock.lock(); defer { _lock.unlock() } return _disposable == nil } - /** - Initializes a new instance of the `RefCountDisposable`. - */ + /// Initializes a new instance of the `RefCountDisposable`. public init(disposable: Disposable) { _disposable = disposable super.init() @@ -43,24 +37,22 @@ public class RefCountDisposable : DisposeBase, Cancelable { if let _ = _disposable { do { - try incrementChecked(&_count) + let _ = try incrementChecked(&_count) } catch (_) { rxFatalError("RefCountDisposable increment failed") } return RefCountInnerDisposable(self) } else { - return NopDisposable.instance + return Disposables.create() } } } - /** - Disposes the underlying disposable only when all dependent disposables have been disposed. - */ + /// Disposes the underlying disposable only when all dependent disposables have been disposed. public func dispose() { let oldDisposable: Disposable? = _lock.calculateLocked { - if let oldDisposable = _disposable where !_primaryDisposed + if let oldDisposable = _disposable, !_primaryDisposed { _primaryDisposed = true @@ -79,11 +71,11 @@ public class RefCountDisposable : DisposeBase, Cancelable { } } - private func release() { + fileprivate func release() { let oldDisposable: Disposable? = _lock.calculateLocked { if let oldDisposable = _disposable { do { - try decrementChecked(&_count) + let _ = try decrementChecked(&_count) } catch (_) { rxFatalError("RefCountDisposable decrement on release failed") } @@ -110,7 +102,7 @@ public class RefCountDisposable : DisposeBase, Cancelable { internal final class RefCountInnerDisposable: DisposeBase, Disposable { private let _parent: RefCountDisposable - private var _disposed: AtomicInt = 0 + private var _isDisposed: AtomicInt = 0 init(_ parent: RefCountDisposable) { @@ -120,7 +112,7 @@ internal final class RefCountInnerDisposable: DisposeBase, Disposable internal func dispose() { - if AtomicCompareAndSwap(0, 1, &_disposed) { + if AtomicCompareAndSwap(0, 1, &_isDisposed) { _parent.release() } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift index ac73499..a922600 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift @@ -8,27 +8,23 @@ import Foundation -private let disposeScheduledDisposable: ScheduledDisposable -> Disposable = { sd in +private let disposeScheduledDisposable: (ScheduledDisposable) -> Disposable = { sd in sd.disposeInner() - return NopDisposable.instance + return Disposables.create() } -/** -Represents a disposable resource whose disposal invocation will be scheduled on the specified scheduler. -*/ -public class ScheduledDisposable : Cancelable { +/// Represents a disposable resource whose disposal invocation will be scheduled on the specified scheduler. +public final class ScheduledDisposable : Cancelable { public let scheduler: ImmediateSchedulerType - private var _disposed: AtomicInt = 0 + private var _isDisposed: AtomicInt = 0 // state private var _disposable: Disposable? - /** - - returns: Was resource disposed. - */ - public var disposed: Bool { - return _disposed == 1 + /// - returns: Was resource disposed. + public var isDisposed: Bool { + return _isDisposed == 1 } /** @@ -42,15 +38,13 @@ public class ScheduledDisposable : Cancelable { _disposable = disposable } - /** - Disposes the wrapped disposable on the provided scheduler. - */ + /// Disposes the wrapped disposable on the provided scheduler. public func dispose() { - scheduler.schedule(self, action: disposeScheduledDisposable) + let _ = scheduler.schedule(self, action: disposeScheduledDisposable) } func disposeInner() { - if AtomicCompareAndSwap(0, 1, &_disposed) { + if AtomicCompareAndSwap(0, 1, &_isDisposed) { _disposable!.dispose() _disposable = nil } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift index cb5c4e3..a87814f 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift @@ -1,6 +1,6 @@ // // SerialDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/12/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,26 +8,20 @@ import Foundation -/** -Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, causing automatic disposal of the previous underlying disposable resource. -*/ -public class SerialDisposable : DisposeBase, Cancelable { +/// Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, causing automatic disposal of the previous underlying disposable resource. +public final class SerialDisposable : DisposeBase, Cancelable { private var _lock = SpinLock() // state private var _current = nil as Disposable? - private var _disposed = false + private var _isDisposed = false - /** - - returns: Was resource disposed. - */ - public var disposed: Bool { - return _disposed + /// - returns: Was resource disposed. + public var isDisposed: Bool { + return _isDisposed } - /** - Initializes a new instance of the `SerialDisposable`. - */ + /// Initializes a new instance of the `SerialDisposable`. override public init() { super.init() } @@ -47,7 +41,7 @@ public class SerialDisposable : DisposeBase, Cancelable { } set (newDisposable) { let disposable: Disposable? = _lock.calculateLocked { - if _disposed { + if _isDisposed { return newDisposable } else { @@ -63,23 +57,21 @@ public class SerialDisposable : DisposeBase, Cancelable { } } - /** - Disposes the underlying disposable as well as all future replacements. - */ + /// Disposes the underlying disposable as well as all future replacements. public func dispose() { _dispose()?.dispose() } private func _dispose() -> Disposable? { _lock.lock(); defer { _lock.unlock() } - if _disposed { + if _isDisposed { return nil } else { - _disposed = true + _isDisposed = true let current = _current _current = nil return current } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift index 9fedf5f..18d27ec 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift @@ -1,6 +1,6 @@ // // SingleAssignmentDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -14,76 +14,84 @@ Represents a disposable resource which only allows a single assignment of its un If an underlying disposable resource has already been set, future attempts to set the underlying disposable resource will throw an exception. */ public class SingleAssignmentDisposable : DisposeBase, Disposable, Cancelable { - private var _lock = SpinLock() - +#if os(Linux) + fileprivate let _lock = SpinLock() +#endif + + fileprivate enum DisposeState: UInt32 { + case disposed = 1 + case disposableSet = 2 + } + + // Jeej, swift API consistency rules + fileprivate enum DisposeStateInt32: Int32 { + case disposed = 1 + case disposableSet = 2 + } + // state - private var _disposed = false - private var _disposableSet = false + private var _state: UInt32 = 0 private var _disposable = nil as Disposable? - /** - - returns: A value that indicates whether the object is disposed. - */ - public var disposed: Bool { - return _disposed + /// - returns: A value that indicates whether the object is disposed. + public var isDisposed: Bool { + return (_state & DisposeState.disposed.rawValue) != 0 } - /** - Initializes a new instance of the `SingleAssignmentDisposable`. - */ + /// Initializes a new instance of the `SingleAssignmentDisposable`. public override init() { super.init() } - /** - Gets or sets the underlying disposable. After disposal, the result of getting this property is undefined. - - **Throws exception if the `SingleAssignmentDisposable` has already been assigned to.** - */ - public var disposable: Disposable { - get { - _lock.lock(); defer { _lock.unlock() } - return _disposable ?? NopDisposable.instance - } - set { - _setDisposable(newValue)?.dispose() - } - } + /// Gets or sets the underlying disposable. After disposal, the result of getting this property is undefined. + /// + /// **Throws exception if the `SingleAssignmentDisposable` has already been assigned to.** + public func setDisposable(_ disposable: Disposable) { + _disposable = disposable - private func _setDisposable(newValue: Disposable) -> Disposable? { - _lock.lock(); defer { _lock.unlock() } - if _disposableSet { + #if os(Linux) + _lock.lock() + let previousState = Int32(_state) + _state = _state | DisposeState.disposableSet.rawValue + // We know about `defer { _lock.unlock() }`, but this resolves Swift compiler bug. Using `defer` here causes anomaly. + _lock.unlock() + #else + let previousState = OSAtomicOr32OrigBarrier(DisposeState.disposableSet.rawValue, &_state) + #endif + + if (previousState & DisposeStateInt32.disposableSet.rawValue) != 0 { rxFatalError("oldState.disposable != nil") } - _disposableSet = true - - if _disposed { - return newValue + if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { + disposable.dispose() + _disposable = nil } - - _disposable = newValue - - return nil } - /** - Disposes the underlying disposable. - */ + /// Disposes the underlying disposable. public func dispose() { - if _disposed { + #if os(Linux) + _lock.lock() + let previousState = Int32(_state) + _state = _state | DisposeState.disposed.rawValue + // We know about `defer { _lock.unlock() }`, but this resolves Swift compiler bug. Using `defer` here causes anomaly. + _lock.unlock() + #else + let previousState = OSAtomicOr32OrigBarrier(DisposeState.disposed.rawValue, &_state) + #endif + + if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { return } - _dispose()?.dispose() - } - private func _dispose() -> Disposable? { - _lock.lock(); defer { _lock.unlock() } - - _disposed = true - let disposable = _disposable - _disposable = nil - - return disposable + if (previousState & DisposeStateInt32.disposableSet.rawValue) != 0 { + guard let disposable = _disposable else { + rxFatalError("Disposable not set") + } + disposable.dispose() + _disposable = nil + } } + } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/StableCompositeDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/StableCompositeDisposable.swift deleted file mode 100644 index 54162d2..0000000 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/StableCompositeDisposable.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// StableCompositeDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -public final class StableCompositeDisposable { - public static func create(disposable1: Disposable, _ disposable2: Disposable) -> Disposable { - return BinaryDisposable(disposable1, disposable2) - } -} \ No newline at end of file diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift index 7a3e1e9..9a3d639 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift @@ -1,6 +1,6 @@ // // SubscriptionDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -20,4 +20,4 @@ struct SubscriptionDisposable : Disposable { func dispose() { _owner?.synchronizedUnsubscribe(_key) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Errors.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Errors.swift index ccb71c1..92cb2f1 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Errors.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Errors.swift @@ -1,6 +1,6 @@ // // Errors.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/28/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -11,62 +11,44 @@ import Foundation let RxErrorDomain = "RxErrorDomain" let RxCompositeFailures = "RxCompositeFailures" -/** -Generic Rx error codes. -*/ +/// Generic Rx error codes. public enum RxError - : ErrorType + : Swift.Error , CustomDebugStringConvertible { - /** - Unknown error occured. - */ - case Unknown - /** - Performing an action on disposed object. - */ - case Disposed(object: AnyObject) - /** - Aritmetic overflow error. - */ - case Overflow - /** - Argument out of range error. - */ - case ArgumentOutOfRange - /** - Sequence doesn't contain any elements. - */ - case NoElements - /** - Sequence contains more than one element. - */ - case MoreThanOneElement - /** - Timeout error. - */ - case Timeout + /// Unknown error occured. + case unknown + /// Performing an action on disposed object. + case disposed(object: AnyObject) + /// Aritmetic overflow error. + case overflow + /// Argument out of range error. + case argumentOutOfRange + /// Sequence doesn't contain any elements. + case noElements + /// Sequence contains more than one element. + case moreThanOneElement + /// Timeout error. + case timeout } -public extension RxError { - /** - A textual representation of `self`, suitable for debugging. - */ +extension RxError { + /// A textual representation of `self`, suitable for debugging. public var debugDescription: String { switch self { - case .Unknown: + case .unknown: return "Unknown error occured." - case .Disposed(let object): + case .disposed(let object): return "Object `\(object)` was already disposed." - case .Overflow: + case .overflow: return "Arithmetic overflow occured." - case .ArgumentOutOfRange: + case .argumentOutOfRange: return "Argument out of range." - case .NoElements: + case .noElements: return "Sequence doesn't contain any elements." - case .MoreThanOneElement: + case .moreThanOneElement: return "Sequence contains more than one element." - case .Timeout: + case .timeout: return "Sequence timeout." } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Event.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Event.swift index 32b2780..d0f995c 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Event.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Event.swift @@ -1,6 +1,6 @@ // // Event.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,74 +8,77 @@ import Foundation +/// Represents a sequence event. +/// +/// Sequence grammar: +/// **next\* (error | completed)** +public enum Event { + /// Next element is produced. + case next(Element) -/** -Represents sequence event + /// Sequence terminated with an error. + case error(Swift.Error) -Sequence grammar: -Next\* (Error | Completed) -*/ -public enum Event : CustomDebugStringConvertible { - /** - Next element is produced - */ - case Next(Element) - - /** - Sequence terminates with error - */ - case Error(ErrorType) - - /** - Sequence completes sucessfully - */ - case Completed + /// Sequence completed successfully. + case completed } -extension Event { - /** - - returns: Description of event - */ +extension Event : CustomDebugStringConvertible { + /// - returns: Description of event. public var debugDescription: String { switch self { - case .Next(let value): - return "Next(\(value))" - case .Error(let error): - return "Error(\(error))" - case .Completed: - return "Completed" + case .next(let value): + return "next(\(value))" + case .error(let error): + return "error(\(error))" + case .completed: + return "completed" } } } extension Event { - /** - - returns: Is `Completed` or `Error` event - */ + /// Is `Completed` or `Error` event. public var isStopEvent: Bool { switch self { - case .Next: return false - case .Error, .Completed: return true + case .next: return false + case .error, .completed: return true } } - /** - - returns: If `Next` event, returns element value. - */ + /// If `Next` event, returns element value. public var element: Element? { - if case .Next(let value) = self { + if case .next(let value) = self { return value } return nil } - /** - - returns: If `Error` event, returns error. - */ - public var error: ErrorType? { - if case .Error(let error) = self { + /// If `Error` event, returns error. + public var error: Swift.Error? { + if case .error(let error) = self { return error } return nil } -} \ No newline at end of file +} + +extension Event { + /// Maps sequence elements using transform. If error happens during the transform .error + /// will be returned as value + public func map(_ transform: (Element) throws -> Result) -> Event { + do { + switch self { + case let .next(element): + return .next(try transform(element)) + case let .error(error): + return .error(error) + case .completed: + return .completed + } + } + catch let e { + return .error(e) + } + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift new file mode 100644 index 0000000..7a917e3 --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift @@ -0,0 +1,58 @@ +// +// Bag+Rx.swift +// RxSwift +// +// Created by Krunoslav Zaher on 10/19/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + + +// MARK: forEach + +extension Bag where T: ObserverType { + /// Dispatches `event` to app observers contained inside bag. + /// + /// - parameter action: Enumeration closure. + func on(_ event: Event) { + if _onlyFastPath { + _value0?.on(event) + return + } + + let value0 = _value0 + let dictionary = _dictionary + + if let value0 = value0 { + value0.on(event) + } + + if let dictionary = dictionary { + for element in dictionary.values { + element.on(event) + } + } + } +} + +/// Dispatches `dispose` to all disposables contained inside bag. +func disposeAll(in bag: Bag) { + if bag._onlyFastPath { + bag._value0?.dispose() + return + } + + let value0 = bag._value0 + let dictionary = bag._dictionary + + if let value0 = value0 { + value0.dispose() + } + + if let dictionary = dictionary { + for element in dictionary.values { + element.dispose() + } + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift index 5d336f7..40fd9a8 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift @@ -1,6 +1,6 @@ // // String+Rx.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 12/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,17 +9,16 @@ import Foundation extension String { - /** - This is needed because on Linux Swift doesn't have `rangeOfString(..., options: .BackwardsSearch)` - */ - func lastIndexOf(character: Character) -> Index? { - var last: Index? - for i in startIndex ..< endIndex { - if self[i] == character { - last = i + /// This is needed because on Linux Swift doesn't have `rangeOfString(..., options: .BackwardsSearch)` + func lastIndexOf(_ character: Character) -> Index? { + var index = endIndex + while index > startIndex { + index = self.index(before: index) + if self[index] == character { + return index } } - return last + return nil } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift index b5e0309..fa0c2d3 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift @@ -8,9 +8,7 @@ import Foundation -/** -Represents an object that immediately schedules units of work. -*/ +/// Represents an object that immediately schedules units of work. public protocol ImmediateSchedulerType { /** Schedules an action to be executed immediatelly. @@ -19,7 +17,7 @@ public protocol ImmediateSchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - func schedule(state: StateType, action: (StateType) -> Disposable) -> Disposable + func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable } extension ImmediateSchedulerType { @@ -30,13 +28,11 @@ extension ImmediateSchedulerType { - parameter action: Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func scheduleRecursive(state: State, action: (state: State, recurse: (State) -> ()) -> ()) -> Disposable { + public func scheduleRecursive(_ state: State, action: @escaping (_ state: State, _ recurse: (State) -> ()) -> ()) -> Disposable { let recursiveScheduler = RecursiveImmediateScheduler(action: action, scheduler: self) recursiveScheduler.schedule(state) - return AnonymousDisposable { - recursiveScheduler.dispose() - } + return Disposables.create(with: recursiveScheduler.dispose) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observable.swift index 31e2e65..f394063 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observable.swift @@ -1,6 +1,6 @@ // // Observable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,24 +8,20 @@ import Foundation -/** -A type-erased `ObservableType`. - -It represents a push style sequence. -*/ +/// A type-erased `ObservableType`. +/// +/// It represents a push style sequence. public class Observable : ObservableType { - /** - Type of elements in sequence. - */ + /// Type of elements in sequence. public typealias E = Element init() { #if TRACE_RESOURCES - OSAtomicIncrement32(&resourceCount) + let _ = Resources.incrementTotal() #endif } - public func subscribe(observer: O) -> Disposable { + public func subscribe(_ observer: O) -> Disposable where O.E == E { abstractMethod() } @@ -35,17 +31,16 @@ public class Observable : ObservableType { deinit { #if TRACE_RESOURCES - AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() #endif } // this is kind of ugly I know :( // Swift compiler reports "Not supported yet" when trying to override protocol extensions, so ¯\_(ツ)_/¯ - /** - Optimizations for map operator - */ - internal func composeMap(selector: Element throws -> R) -> Observable { - return Map(source: self, selector: selector) + /// Optimizations for map operator + internal func composeMap(_ selector: @escaping (Element) throws -> R) -> Observable { + return Map(source: self, transform: selector) } } + diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift index a749a06..2a94d63 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift @@ -1,6 +1,6 @@ // // ObservableConvertibleType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 9/17/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,19 +8,13 @@ import Foundation -/** -Type that can be converted to observable sequence (`Observer`). -*/ +/// Type that can be converted to observable sequence (`Observer`). public protocol ObservableConvertibleType { - /** - Type of elements in sequence. - */ + /// Type of elements in sequence. associatedtype E - - /** - Converts `self` to `Observable` sequence. - - - returns: Observable sequence that represents `self`. - */ + + /// Converts `self` to `Observable` sequence. + /// + /// - returns: Observable sequence that represents `self`. func asObservable() -> Observable } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observable+Extensions.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift similarity index 51% rename from RxTableViewDemo/Pods/RxSwift/RxSwift/Observable+Extensions.swift rename to RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift index c44b9b0..ea225ab 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observable+Extensions.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift @@ -1,6 +1,6 @@ // -// Observable+Extensions.swift -// Rx +// ObservableType+Extensions.swift +// RxSwift // // Created by Krunoslav Zaher on 2/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -15,15 +15,15 @@ extension ObservableType { - parameter on: Action to invoke for each event in the observable sequence. - returns: Subscription object used to unsubscribe from the observable sequence. */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func subscribe(on: (event: Event) -> Void) + public func subscribe(_ on: @escaping (Event) -> Void) -> Disposable { let observer = AnonymousObserver { e in - on(event: e) + on(e) } return self.subscribeSafe(observer) } + #if DEBUG /** Subscribes an element handler, an error handler, a completion handler and disposed handler to an observable sequence. @@ -34,95 +34,86 @@ extension ObservableType { gracefully completed, errored, or if the generation is cancelled by disposing subscription). - returns: Subscription object used to unsubscribe from the observable sequence. */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func subscribe(onNext onNext: (E -> Void)? = nil, onError: (ErrorType -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) + public func subscribe(file: String = #file, line: UInt = #line, function: String = #function, onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) -> Disposable { let disposable: Disposable if let disposed = onDisposed { - disposable = AnonymousDisposable(disposed) + disposable = Disposables.create(with: disposed) } else { - disposable = NopDisposable.instance + disposable = Disposables.create() } let observer = AnonymousObserver { e in switch e { - case .Next(let value): + case .next(let value): onNext?(value) - case .Error(let e): - onError?(e) + case .error(let e): + if let onError = onError { + onError(e) + } + else { + print("Received unhandled error: \(file):\(line):\(function) -> \(e)") + } disposable.dispose() - case .Completed: + case .completed: onCompleted?() disposable.dispose() } } - return BinaryDisposable( + return Disposables.create( self.subscribeSafe(observer), disposable ) } - + #else /** - Subscribes an element handler to an observable sequence. + Subscribes an element handler, an error handler, a completion handler and disposed handler to an observable sequence. - parameter onNext: Action to invoke for each element in the observable sequence. + - parameter onError: Action to invoke upon errored termination of the observable sequence. + - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. + - parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has + gracefully completed, errored, or if the generation is cancelled by disposing subscription). - returns: Subscription object used to unsubscribe from the observable sequence. */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func subscribeNext(onNext: (E) -> Void) + public func subscribe(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) -> Disposable { - let observer = AnonymousObserver { e in - if case .Next(let value) = e { - onNext(value) - } - } - return self.subscribeSafe(observer) - } - /** - Subscribes an error handler to an observable sequence. + let disposable: Disposable - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func subscribeError(onError: (ErrorType) -> Void) - -> Disposable { - let observer = AnonymousObserver { e in - if case .Error(let error) = e { - onError(error) - } + if let disposed = onDisposed { + disposable = Disposables.create(with: disposed) + } + else { + disposable = Disposables.create() } - return self.subscribeSafe(observer) - } - - /** - Subscribes a completion handler to an observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - @warn_unused_result(message="http://git.io/rxs.ud") - public func subscribeCompleted(onCompleted: () -> Void) - -> Disposable { let observer = AnonymousObserver { e in - if case .Completed = e { - onCompleted() + switch e { + case .next(let value): + onNext?(value) + case .error(let e): + onError?(e) + disposable.dispose() + case .completed: + onCompleted?() + disposable.dispose() } } - return self.subscribeSafe(observer) + return Disposables.create( + self.subscribeSafe(observer), + disposable + ) } + #endif } -public extension ObservableType { - /** - All internal subscribe calls go through this method. - */ - @warn_unused_result(message="http://git.io/rxs.ud") - func subscribeSafe(observer: O) -> Disposable { +extension ObservableType { + /// All internal subscribe calls go through this method. + func subscribeSafe(_ observer: O) -> Disposable where O.E == E { return self.asObservable().subscribe(observer) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableType.swift index 93723e3..7fd799c 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/ObservableType.swift @@ -8,13 +8,9 @@ import Foundation -/** -Represents a push style sequence. -*/ +/// Represents a push style sequence. public protocol ObservableType : ObservableConvertibleType { - /** - Type of elements in sequence. - */ + /// Type of elements in sequence. associatedtype E /** @@ -40,18 +36,17 @@ public protocol ObservableType : ObservableConvertibleType { - returns: Subscription for `observer` that can be used to cancel production of sequence elements and free resources. */ - @warn_unused_result(message="http://git.io/rxs.ud") - func subscribe(observer: O) -> Disposable - + func subscribe(_ observer: O) -> Disposable where O.E == E } extension ObservableType { - /** - Default implementation of converting `ObservableType` to `Observable`. - */ - @warn_unused_result(message="http://git.io/rxs.uo") + /// Default implementation of converting `ObservableType` to `Observable`. public func asObservable() -> Observable { - return Observable.create(self.subscribe) + // temporary workaround + //return Observable.create(subscribe: self.subscribe) + return Observable.create { o in + return self.subscribe(o) + } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift index 50358ec..36f9d79 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift @@ -1,6 +1,6 @@ // // AddRef.swift -// Rx +// RxSwift // // Created by Junior B. on 30/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -11,15 +11,15 @@ import Foundation class AddRefSink : Sink, ObserverType { typealias Element = O.E - override init(observer: O) { - super.init(observer: observer) + override init(observer: O, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(_): + case .next(_): forwardOn(event) - case .Completed, .Error(_): + case .completed, .error(_): forwardOn(event) dispose() } @@ -27,7 +27,7 @@ class AddRefSink : Sink, ObserverType { } class AddRef : Producer { - typealias EventHandler = Event throws -> Void + typealias EventHandler = (Event) throws -> Void private let _source: Observable private let _refCount: RefCountDisposable @@ -37,11 +37,11 @@ class AddRef : Producer { _refCount = refCount } - override func run(observer: O) -> Disposable { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let releaseDisposable = _refCount.retain() - let sink = AddRefSink(observer: observer) - sink.disposable = StableCompositeDisposable.create(releaseDisposable, _source.subscribeSafe(sink)) + let sink = AddRefSink(observer: observer, cancel: cancel) + let subscription = Disposables.create(releaseDisposable, _source.subscribeSafe(sink)) - return sink + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift index 874d5a1..698747d 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift @@ -9,24 +9,24 @@ import Foundation enum AmbState { - case Neither - case Left - case Right + case neither + case left + case right } -class AmbObserver : ObserverType { - typealias Element = ElementType - typealias Parent = AmbSink - typealias This = AmbObserver +class AmbObserver : ObserverType { + typealias Element = O.E + typealias Parent = AmbSink + typealias This = AmbObserver typealias Sink = (This, Event) -> Void - private let _parent: Parent - private var _sink: Sink - private var _cancel: Disposable + fileprivate let _parent: Parent + fileprivate var _sink: Sink + fileprivate var _cancel: Disposable - init(parent: Parent, cancel: Disposable, sink: Sink) { + init(parent: Parent, cancel: Disposable, sink: @escaping Sink) { #if TRACE_RESOURCES - AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif _parent = parent @@ -34,7 +34,7 @@ class AmbObserver : Obser _cancel = cancel } - func on(event: Event) { + func on(_ event: Event) { _sink(self, event) if event.isStopEvent { _cancel.dispose() @@ -43,30 +43,31 @@ class AmbObserver : Obser deinit { #if TRACE_RESOURCES - AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() #endif } } -class AmbSink : Sink { +class AmbSink : Sink { + typealias ElementType = O.E typealias Parent = Amb - typealias AmbObserverType = AmbObserver + typealias AmbObserverType = AmbObserver private let _parent: Parent private let _lock = NSRecursiveLock() // state - private var _choice = AmbState.Neither + private var _choice = AmbState.neither - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { let subscription1 = SingleAssignmentDisposable() let subscription2 = SingleAssignmentDisposable() - let disposeAll = StableCompositeDisposable.create(subscription1, subscription2) + let disposeAll = Disposables.create(subscription1, subscription2) let forwardEvent = { (o: AmbObserverType, event: Event) -> Void in self.forwardOn(event) @@ -74,7 +75,7 @@ class AmbSink : Sink { let decide = { (o: AmbObserverType, event: Event, me: AmbState, otherSubscription: Disposable) in self._lock.performLocked { - if self._choice == .Neither { + if self._choice == .neither { self._choice = me o._sink = forwardEvent o._cancel = disposeAll @@ -91,32 +92,32 @@ class AmbSink : Sink { } let sink1 = AmbObserver(parent: self, cancel: subscription1) { o, e in - decide(o, e, .Left, subscription2) + decide(o, e, .left, subscription2) } let sink2 = AmbObserver(parent: self, cancel: subscription1) { o, e in - decide(o, e, .Right, subscription1) + decide(o, e, .right, subscription1) } - subscription1.disposable = _parent._left.subscribe(sink1) - subscription2.disposable = _parent._right.subscribe(sink2) + subscription1.setDisposable(_parent._left.subscribe(sink1)) + subscription2.setDisposable(_parent._right.subscribe(sink2)) return disposeAll } } class Amb: Producer { - private let _left: Observable - private let _right: Observable + fileprivate let _left: Observable + fileprivate let _right: Observable init(left: Observable, right: Observable) { _left = left _right = right } - override func run(observer: O) -> Disposable { - let sink = AmbSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = AmbSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift index 11346a9..bf3627a 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift @@ -1,6 +1,6 @@ // // AnonymousObservable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -15,18 +15,18 @@ class AnonymousObservableSink : Sink, ObserverType { // state private var _isStopped: AtomicInt = 0 - override init(observer: O) { - super.init(observer: observer) + override init(observer: O, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next: + case .next: if _isStopped == 1 { return } forwardOn(event) - case .Error, .Completed: + case .error, .completed: if AtomicCompareAndSwap(0, 1, &_isStopped) { forwardOn(event) dispose() @@ -34,7 +34,7 @@ class AnonymousObservableSink : Sink, ObserverType { } } - func run(parent: Parent) -> Disposable { + func run(_ parent: Parent) -> Disposable { return parent._subscribeHandler(AnyObserver(self)) } } @@ -44,13 +44,13 @@ class AnonymousObservable : Producer { let _subscribeHandler: SubscribeHandler - init(_ subscribeHandler: SubscribeHandler) { + init(_ subscribeHandler: @escaping SubscribeHandler) { _subscribeHandler = subscribeHandler } - override func run(observer: O) -> Disposable { - let sink = AnonymousObservableSink(observer: observer) - sink.disposable = sink.run(self) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = AnonymousObservableSink(observer: observer, cancel: cancel) + let subscription = sink.run(self) + return (sink: sink, subscription: subscription) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift index 2da636d..c773f47 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift @@ -1,6 +1,6 @@ // // Buffer.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 9/13/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -10,10 +10,10 @@ import Foundation class BufferTimeCount : Producer<[Element]> { - private let _timeSpan: RxTimeInterval - private let _count: Int - private let _scheduler: SchedulerType - private let _source: Observable + fileprivate let _timeSpan: RxTimeInterval + fileprivate let _count: Int + fileprivate let _scheduler: SchedulerType + fileprivate let _source: Observable init(source: Observable, timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) { _source = source @@ -22,18 +22,18 @@ class BufferTimeCount : Producer<[Element]> { _scheduler = scheduler } - override func run(observer: O) -> Disposable { - let sink = BufferTimeCountSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [Element] { + let sink = BufferTimeCountSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } -class BufferTimeCountSink +class BufferTimeCountSink : Sink , LockOwnerType , ObserverType - , SynchronizedOnType { + , SynchronizedOnType where O.E == [Element] { typealias Parent = BufferTimeCount typealias E = Element @@ -46,14 +46,14 @@ class BufferTimeCountSink private var _buffer = [Element]() private var _windowID = 0 - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { createTimer(_windowID) - return StableCompositeDisposable.create(_timerD, _parent._source.subscribe(self)) + return Disposables.create(_timerD, _parent._source.subscribe(self)) } func startNewWindowAndSendCurrentOne() { @@ -62,37 +62,37 @@ class BufferTimeCountSink let buffer = _buffer _buffer = [] - forwardOn(.Next(buffer)) + forwardOn(.next(buffer)) createTimer(windowID) } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next(let element): + case .next(let element): _buffer.append(element) if _buffer.count == _parent._count { startNewWindowAndSendCurrentOne() } - case .Error(let error): + case .error(let error): _buffer = [] - forwardOn(.Error(error)) + forwardOn(.error(error)) dispose() - case .Completed: - forwardOn(.Next(_buffer)) - forwardOn(.Completed) + case .completed: + forwardOn(.next(_buffer)) + forwardOn(.completed) dispose() } } - func createTimer(windowID: Int) { - if _timerD.disposed { + func createTimer(_ windowID: Int) { + if _timerD.isDisposed { return } @@ -104,7 +104,7 @@ class BufferTimeCountSink _timerD.disposable = nextTimer - nextTimer.disposable = _parent._scheduler.scheduleRelative(windowID, dueTime: _parent._timeSpan) { previousWindowID in + let disposable = _parent._scheduler.scheduleRelative(windowID, dueTime: _parent._timeSpan) { previousWindowID in self._lock.performLocked { if previousWindowID != self._windowID { return @@ -113,7 +113,9 @@ class BufferTimeCountSink self.startNewWindowAndSendCurrentOne() } - return NopDisposable.instance + return Disposables.create() } + + nextTimer.setDisposable(disposable) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift index 72cb33b..0f43069 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift @@ -20,13 +20,13 @@ class CatchSinkProxy : ObserverType { _parent = parent } - func on(event: Event) { + func on(_ event: Event) { _parent.forwardOn(event) switch event { - case .Next: + case .next: break - case .Error, .Completed: + case .error, .completed: _parent.dispose() } } @@ -39,27 +39,27 @@ class CatchSink : Sink, ObserverType { private let _parent: Parent private let _subscription = SerialDisposable() - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { let d1 = SingleAssignmentDisposable() _subscription.disposable = d1 - d1.disposable = _parent._source.subscribe(self) + d1.setDisposable(_parent._source.subscribe(self)) return _subscription } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next: + case .next: forwardOn(event) - case .Completed: + case .completed: forwardOn(event) dispose() - case .Error(let error): + case .error(let error): do { let catchSequence = try _parent._handler(error) @@ -68,7 +68,7 @@ class CatchSink : Sink, ObserverType { _subscription.disposable = catchSequence.subscribe(observer) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() } } @@ -76,68 +76,68 @@ class CatchSink : Sink, ObserverType { } class Catch : Producer { - typealias Handler = (ErrorType) throws -> Observable + typealias Handler = (Swift.Error) throws -> Observable - private let _source: Observable - private let _handler: Handler + fileprivate let _source: Observable + fileprivate let _handler: Handler - init(source: Observable, handler: Handler) { + init(source: Observable, handler: @escaping Handler) { _source = source _handler = handler } - override func run(observer: O) -> Disposable { - let sink = CatchSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = CatchSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } // catch enumerable -class CatchSequenceSink +class CatchSequenceSink : TailRecursiveSink - , ObserverType { + , ObserverType where S.Iterator.Element : ObservableConvertibleType, S.Iterator.Element.E == O.E { typealias Element = O.E typealias Parent = CatchSequence - private var _lastError: ErrorType? + private var _lastError: Swift.Error? - override init(observer: O) { - super.init(observer: observer) + override init(observer: O, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next: + case .next: forwardOn(event) - case .Error(let error): + case .error(let error): _lastError = error - schedule(.MoveNext) - case .Completed: + schedule(.moveNext) + case .completed: forwardOn(event) dispose() } } - override func subscribeToNext(source: Observable) -> Disposable { + override func subscribeToNext(_ source: Observable) -> Disposable { return source.subscribe(self) } override func done() { if let lastError = _lastError { - forwardOn(.Error(lastError)) + forwardOn(.error(lastError)) } else { - forwardOn(.Completed) + forwardOn(.completed) } self.dispose() } - override func extract(observable: Observable) -> SequenceGenerator? { + override func extract(_ observable: Observable) -> SequenceGenerator? { if let onError = observable as? CatchSequence { - return (onError.sources.generate(), nil) + return (onError.sources.makeIterator(), nil) } else { return nil @@ -145,8 +145,8 @@ class CatchSequenceSink : Producer { - typealias Element = S.Generator.Element.E +class CatchSequence : Producer where S.Iterator.Element : ObservableConvertibleType { + typealias Element = S.Iterator.Element.E let sources: S @@ -154,9 +154,9 @@ class CatchSequence(observer: O) -> Disposable { - let sink = CatchSequenceSink(observer: observer) - sink.disposable = sink.run((self.sources.generate(), nil)) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = CatchSequenceSink(observer: observer, cancel: cancel) + let subscription = sink.run((self.sources.makeIterator(), nil)) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+CollectionType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+Collection.swift similarity index 59% rename from RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+CollectionType.swift rename to RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+Collection.swift index c1dba6b..fea66e2 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+CollectionType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+Collection.swift @@ -1,6 +1,6 @@ // -// CombineLatest+CollectionType.swift -// Rx +// CombineLatest+Collection.swift +// RxSwift // // Created by Krunoslav Zaher on 8/29/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,10 +8,11 @@ import Foundation -class CombineLatestCollectionTypeSink - : Sink { +class CombineLatestCollectionTypeSink + : Sink where C.Iterator.Element : ObservableConvertibleType { + typealias R = O.E typealias Parent = CombineLatestCollectionType - typealias SourceElement = C.Generator.Element.E + typealias SourceElement = C.Iterator.Element.E let _parent: Parent @@ -24,10 +25,10 @@ class CombineLatestCollectionTypeSink() _subscriptions.reserveCapacity(parent._count) @@ -35,13 +36,13 @@ class CombineLatestCollectionTypeSink, atIndex: Int) { + func on(_ event: Event, atIndex: Int) { _lock.lock(); defer { _lock.unlock() } // { switch event { - case .Next(let element): + case .next(let element): if _values[atIndex] == nil { _numberOfValues += 1 } @@ -51,7 +52,7 @@ class CombineLatestCollectionTypeSink Disposable { var j = 0 - for i in _parent._sources.startIndex ..< _parent._sources.endIndex { + for i in _parent._sources { let index = j - let source = _parent._sources[i].asObservable() - _subscriptions[j].disposable = source.subscribe(AnyObserver { event in + let source = i.asObservable() + let disposable = source.subscribe(AnyObserver { event in self.on(event, atIndex: index) }) + + _subscriptions[j].setDisposable(disposable) j += 1 } - return CompositeDisposable(disposables: _subscriptions.map { $0 }) + return Disposables.create(_subscriptions) } } -class CombineLatestCollectionType : Producer { - typealias ResultSelector = [C.Generator.Element.E] throws -> R +class CombineLatestCollectionType : Producer where C.Iterator.Element : ObservableConvertibleType { + typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R let _sources: C let _resultSelector: ResultSelector let _count: Int - init(sources: C, resultSelector: ResultSelector) { + init(sources: C, resultSelector: @escaping ResultSelector) { _sources = sources _resultSelector = resultSelector _count = Int(self._sources.count.toIntMax()) } - override func run(observer: O) -> Disposable { - let sink = CombineLatestCollectionTypeSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = CombineLatestCollectionTypeSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+arity.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+arity.swift index 8f7b608..2969b45 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+arity.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+arity.swift @@ -22,9 +22,8 @@ extension Observable { - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func combineLatest - (source1: O1, _ source2: O2, resultSelector: (O1.E, O2.E) throws -> E) + (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) -> Observable { return CombineLatest2( source1: source1.asObservable(), source2: source2.asObservable(), @@ -42,9 +41,9 @@ class CombineLatestSink2_ : CombineLatestSink { var _latestElement1: E1! = nil var _latestElement2: E2! = nil - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 2, observer: observer) + super.init(arity: 2, observer: observer, cancel: cancel) } func run() -> Disposable { @@ -54,10 +53,10 @@ class CombineLatestSink2_ : CombineLatestSink { let observer1 = CombineLatestObserver(lock: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - subscription1.disposable = _parent._source1.subscribe(observer1) - subscription2.disposable = _parent._source2.subscribe(observer2) + subscription1.setDisposable(_parent._source1.subscribe(observer1)) + subscription2.setDisposable(_parent._source2.subscribe(observer2)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2 ]) @@ -76,17 +75,17 @@ class CombineLatest2 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, resultSelector: @escaping ResultSelector) { _source1 = source1 _source2 = source2 _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = CombineLatestSink2_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = CombineLatestSink2_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -103,9 +102,8 @@ extension Observable { - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, resultSelector: (O1.E, O2.E, O3.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) -> Observable { return CombineLatest3( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), @@ -124,9 +122,9 @@ class CombineLatestSink3_ : CombineLatestSink { var _latestElement2: E2! = nil var _latestElement3: E3! = nil - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 3, observer: observer) + super.init(arity: 3, observer: observer, cancel: cancel) } func run() -> Disposable { @@ -138,11 +136,11 @@ class CombineLatestSink3_ : CombineLatestSink { let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - subscription1.disposable = _parent._source1.subscribe(observer1) - subscription2.disposable = _parent._source2.subscribe(observer2) - subscription3.disposable = _parent._source3.subscribe(observer3) + subscription1.setDisposable(_parent._source1.subscribe(observer1)) + subscription2.setDisposable(_parent._source2.subscribe(observer2)) + subscription3.setDisposable(_parent._source3.subscribe(observer3)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3 @@ -163,7 +161,7 @@ class CombineLatest3 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, resultSelector: @escaping ResultSelector) { _source1 = source1 _source2 = source2 _source3 = source3 @@ -171,10 +169,10 @@ class CombineLatest3 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = CombineLatestSink3_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = CombineLatestSink3_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -191,9 +189,8 @@ extension Observable { - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: (O1.E, O2.E, O3.E, O4.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) -> Observable { return CombineLatest4( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), @@ -213,9 +210,9 @@ class CombineLatestSink4_ : CombineLatestSink Disposable { @@ -229,12 +226,12 @@ class CombineLatestSink4_ : CombineLatestSink Void in self._latestElement3 = e }, this: subscription3) let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - subscription1.disposable = _parent._source1.subscribe(observer1) - subscription2.disposable = _parent._source2.subscribe(observer2) - subscription3.disposable = _parent._source3.subscribe(observer3) - subscription4.disposable = _parent._source4.subscribe(observer4) + subscription1.setDisposable(_parent._source1.subscribe(observer1)) + subscription2.setDisposable(_parent._source2.subscribe(observer2)) + subscription3.setDisposable(_parent._source3.subscribe(observer3)) + subscription4.setDisposable(_parent._source4.subscribe(observer4)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3, @@ -257,7 +254,7 @@ class CombineLatest4 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: @escaping ResultSelector) { _source1 = source1 _source2 = source2 _source3 = source3 @@ -266,10 +263,10 @@ class CombineLatest4 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = CombineLatestSink4_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = CombineLatestSink4_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -286,9 +283,8 @@ extension Observable { - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) -> Observable { return CombineLatest5( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), @@ -309,9 +305,9 @@ class CombineLatestSink5_ : CombineLatestSi var _latestElement4: E4! = nil var _latestElement5: E5! = nil - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 5, observer: observer) + super.init(arity: 5, observer: observer, cancel: cancel) } func run() -> Disposable { @@ -327,13 +323,13 @@ class CombineLatestSink5_ : CombineLatestSi let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) let observer5 = CombineLatestObserver(lock: _lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - subscription1.disposable = _parent._source1.subscribe(observer1) - subscription2.disposable = _parent._source2.subscribe(observer2) - subscription3.disposable = _parent._source3.subscribe(observer3) - subscription4.disposable = _parent._source4.subscribe(observer4) - subscription5.disposable = _parent._source5.subscribe(observer5) + subscription1.setDisposable(_parent._source1.subscribe(observer1)) + subscription2.setDisposable(_parent._source2.subscribe(observer2)) + subscription3.setDisposable(_parent._source3.subscribe(observer3)) + subscription4.setDisposable(_parent._source4.subscribe(observer4)) + subscription5.setDisposable(_parent._source5.subscribe(observer5)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3, @@ -358,7 +354,7 @@ class CombineLatest5 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: @escaping ResultSelector) { _source1 = source1 _source2 = source2 _source3 = source3 @@ -368,10 +364,10 @@ class CombineLatest5 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = CombineLatestSink5_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = CombineLatestSink5_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -388,9 +384,8 @@ extension Observable { - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) -> Observable { return CombineLatest6( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), @@ -412,9 +407,9 @@ class CombineLatestSink6_ : CombineLate var _latestElement5: E5! = nil var _latestElement6: E6! = nil - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 6, observer: observer) + super.init(arity: 6, observer: observer, cancel: cancel) } func run() -> Disposable { @@ -432,14 +427,14 @@ class CombineLatestSink6_ : CombineLate let observer5 = CombineLatestObserver(lock: _lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) let observer6 = CombineLatestObserver(lock: _lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - subscription1.disposable = _parent._source1.subscribe(observer1) - subscription2.disposable = _parent._source2.subscribe(observer2) - subscription3.disposable = _parent._source3.subscribe(observer3) - subscription4.disposable = _parent._source4.subscribe(observer4) - subscription5.disposable = _parent._source5.subscribe(observer5) - subscription6.disposable = _parent._source6.subscribe(observer6) + subscription1.setDisposable(_parent._source1.subscribe(observer1)) + subscription2.setDisposable(_parent._source2.subscribe(observer2)) + subscription3.setDisposable(_parent._source3.subscribe(observer3)) + subscription4.setDisposable(_parent._source4.subscribe(observer4)) + subscription5.setDisposable(_parent._source5.subscribe(observer5)) + subscription6.setDisposable(_parent._source6.subscribe(observer6)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3, @@ -466,7 +461,7 @@ class CombineLatest6 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, resultSelector: @escaping ResultSelector) { _source1 = source1 _source2 = source2 _source3 = source3 @@ -477,10 +472,10 @@ class CombineLatest6 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = CombineLatestSink6_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = CombineLatestSink6_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -497,9 +492,8 @@ extension Observable { - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) -> Observable { return CombineLatest7( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), @@ -522,9 +516,9 @@ class CombineLatestSink7_ : Combine var _latestElement6: E6! = nil var _latestElement7: E7! = nil - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 7, observer: observer) + super.init(arity: 7, observer: observer, cancel: cancel) } func run() -> Disposable { @@ -544,15 +538,15 @@ class CombineLatestSink7_ : Combine let observer6 = CombineLatestObserver(lock: _lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) let observer7 = CombineLatestObserver(lock: _lock, parent: self, index: 6, setLatestValue: { (e: E7) -> Void in self._latestElement7 = e }, this: subscription7) - subscription1.disposable = _parent._source1.subscribe(observer1) - subscription2.disposable = _parent._source2.subscribe(observer2) - subscription3.disposable = _parent._source3.subscribe(observer3) - subscription4.disposable = _parent._source4.subscribe(observer4) - subscription5.disposable = _parent._source5.subscribe(observer5) - subscription6.disposable = _parent._source6.subscribe(observer6) - subscription7.disposable = _parent._source7.subscribe(observer7) + subscription1.setDisposable(_parent._source1.subscribe(observer1)) + subscription2.setDisposable(_parent._source2.subscribe(observer2)) + subscription3.setDisposable(_parent._source3.subscribe(observer3)) + subscription4.setDisposable(_parent._source4.subscribe(observer4)) + subscription5.setDisposable(_parent._source5.subscribe(observer5)) + subscription6.setDisposable(_parent._source6.subscribe(observer6)) + subscription7.setDisposable(_parent._source7.subscribe(observer7)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3, @@ -581,7 +575,7 @@ class CombineLatest7 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, resultSelector: @escaping ResultSelector) { _source1 = source1 _source2 = source2 _source3 = source3 @@ -593,10 +587,10 @@ class CombineLatest7 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = CombineLatestSink7_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = CombineLatestSink7_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -613,9 +607,8 @@ extension Observable { - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func combineLatest - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) -> Observable { return CombineLatest8( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), @@ -639,9 +632,9 @@ class CombineLatestSink8_ : Com var _latestElement7: E7! = nil var _latestElement8: E8! = nil - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 8, observer: observer) + super.init(arity: 8, observer: observer, cancel: cancel) } func run() -> Disposable { @@ -663,16 +656,16 @@ class CombineLatestSink8_ : Com let observer7 = CombineLatestObserver(lock: _lock, parent: self, index: 6, setLatestValue: { (e: E7) -> Void in self._latestElement7 = e }, this: subscription7) let observer8 = CombineLatestObserver(lock: _lock, parent: self, index: 7, setLatestValue: { (e: E8) -> Void in self._latestElement8 = e }, this: subscription8) - subscription1.disposable = _parent._source1.subscribe(observer1) - subscription2.disposable = _parent._source2.subscribe(observer2) - subscription3.disposable = _parent._source3.subscribe(observer3) - subscription4.disposable = _parent._source4.subscribe(observer4) - subscription5.disposable = _parent._source5.subscribe(observer5) - subscription6.disposable = _parent._source6.subscribe(observer6) - subscription7.disposable = _parent._source7.subscribe(observer7) - subscription8.disposable = _parent._source8.subscribe(observer8) + subscription1.setDisposable(_parent._source1.subscribe(observer1)) + subscription2.setDisposable(_parent._source2.subscribe(observer2)) + subscription3.setDisposable(_parent._source3.subscribe(observer3)) + subscription4.setDisposable(_parent._source4.subscribe(observer4)) + subscription5.setDisposable(_parent._source5.subscribe(observer5)) + subscription6.setDisposable(_parent._source6.subscribe(observer6)) + subscription7.setDisposable(_parent._source7.subscribe(observer7)) + subscription8.setDisposable(_parent._source8.subscribe(observer8)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3, @@ -703,7 +696,7 @@ class CombineLatest8 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, source8: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, source8: Observable, resultSelector: @escaping ResultSelector) { _source1 = source1 _source2 = source2 _source3 = source3 @@ -716,10 +709,10 @@ class CombineLatest8 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = CombineLatestSink8_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = CombineLatestSink8_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift index f493fde..be5cc2e 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift @@ -1,6 +1,6 @@ // // CombineLatest.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,9 +9,9 @@ import Foundation protocol CombineLatestProtocol : class { - func next(index: Int) - func fail(error: ErrorType) - func done(index: Int) + func next(_ index: Int) + func fail(_ error: Swift.Error) + func done(_ index: Int) } class CombineLatestSink @@ -27,19 +27,19 @@ class CombineLatestSink private var _hasValue: [Bool] private var _isDone: [Bool] - init(arity: Int, observer: O) { + init(arity: Int, observer: O, cancel: Cancelable) { _arity = arity - _hasValue = [Bool](count: arity, repeatedValue: false) - _isDone = [Bool](count: arity, repeatedValue: false) + _hasValue = [Bool](repeating: false, count: arity) + _isDone = [Bool](repeating: false, count: arity) - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func getResult() throws -> Element { abstractMethod() } - func next(index: Int) { + func next(_ index: Int) { if !_hasValue[index] { _hasValue[index] = true _numberOfValues += 1 @@ -48,10 +48,10 @@ class CombineLatestSink if _numberOfValues == _arity { do { let result = try getResult() - forwardOn(.Next(result)) + forwardOn(.next(result)) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() } } @@ -66,18 +66,18 @@ class CombineLatestSink } if allOthersDone { - forwardOn(.Completed) + forwardOn(.completed) dispose() } } } - func fail(error: ErrorType) { - forwardOn(.Error(error)) + func fail(_ error: Swift.Error) { + forwardOn(.error(error)) dispose() } - func done(index: Int) { + func done(_ index: Int) { if _isDone[index] { return } @@ -86,7 +86,7 @@ class CombineLatestSink _numberOfDone += 1 if _numberOfDone == _arity { - forwardOn(.Completed) + forwardOn(.completed) dispose() } } @@ -106,7 +106,7 @@ class CombineLatestObserver private let _this: Disposable private let _setLatestValue: ValueSetter - init(lock: NSRecursiveLock, parent: CombineLatestProtocol, index: Int, setLatestValue: ValueSetter, this: Disposable) { + init(lock: NSRecursiveLock, parent: CombineLatestProtocol, index: Int, setLatestValue: @escaping ValueSetter, this: Disposable) { _lock = lock _parent = parent _index = index @@ -114,21 +114,21 @@ class CombineLatestObserver _setLatestValue = setLatestValue } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): _setLatestValue(value) _parent.next(_index) - case .Error(let error): + case .error(let error): _this.dispose() _parent.fail(error) - case .Completed: + case .completed: _this.dispose() _parent.done(_index) } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift index 05352b9..51ac494 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift @@ -1,6 +1,6 @@ // // Concat.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,34 +9,34 @@ import Foundation -class ConcatSink +class ConcatSink : TailRecursiveSink - , ObserverType { + , ObserverType where S.Iterator.Element : ObservableConvertibleType, S.Iterator.Element.E == O.E { typealias Element = O.E - override init(observer: O) { - super.init(observer: observer) + override init(observer: O, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) } - func on(event: Event){ + func on(_ event: Event){ switch event { - case .Next: + case .next: forwardOn(event) - case .Error: + case .error: forwardOn(event) dispose() - case .Completed: - schedule(.MoveNext) + case .completed: + schedule(.moveNext) } } - override func subscribeToNext(source: Observable) -> Disposable { + override func subscribeToNext(_ source: Observable) -> Disposable { return source.subscribe(self) } - override func extract(observable: Observable) -> SequenceGenerator? { + override func extract(_ observable: Observable) -> SequenceGenerator? { if let source = observable as? Concat { - return (source._sources.generate(), source._count) + return (source._sources.makeIterator(), source._count) } else { return nil @@ -44,20 +44,20 @@ class ConcatSink : Producer { - typealias Element = S.Generator.Element.E +class Concat : Producer where S.Iterator.Element : ObservableConvertibleType { + typealias Element = S.Iterator.Element.E - private let _sources: S - private let _count: IntMax? + fileprivate let _sources: S + fileprivate let _count: IntMax? init(sources: S, count: IntMax?) { _sources = sources _count = count } - override func run(observer: O) -> Disposable { - let sink = ConcatSink(observer: observer) - sink.disposable = sink.run((_sources.generate(), _count)) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = ConcatSink(observer: observer, cancel: cancel) + let subscription = sink.run((_sources.makeIterator(), _count)) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift index ce78bab..12eb555 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift @@ -1,6 +1,6 @@ // // ConnectableObservable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/1/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -63,13 +63,13 @@ class ConnectableObservableAdapter : ConnectableObservable { typealias ConnectionType = Connection - private let _subject: S - private let _source: Observable + fileprivate let _subject: S + fileprivate let _source: Observable - private let _lock = NSRecursiveLock() + fileprivate let _lock = NSRecursiveLock() // state - private var _connection: ConnectionType? + fileprivate var _connection: ConnectionType? init(source: Observable, subject: S) { _source = source @@ -90,7 +90,7 @@ class ConnectableObservableAdapter } } - override func subscribe(observer: O) -> Disposable { + override func subscribe(_ observer: O) -> Disposable where O.E == S.E { return _subject.subscribe(observer) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift index b74b9a1..76f8ecd 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift @@ -10,56 +10,64 @@ import Foundation let dateFormat = "yyyy-MM-dd HH:mm:ss.SSS" -func logEvent(identifier: String, dateFormat: NSDateFormatter, content: String) { - print("\(dateFormat.stringFromDate(NSDate())): \(identifier) -> \(content)") +func logEvent(_ identifier: String, dateFormat: DateFormatter, content: String) { + print("\(dateFormat.string(from: Date())): \(identifier) -> \(content)") } -class Debug_ : Sink, ObserverType { +class DebugSink : Sink, ObserverType where O.E == Source.E { typealias Element = O.E - typealias Parent = Debug + typealias Parent = Debug private let _parent: Parent - private let _timestampFormatter = NSDateFormatter() + private let _timestampFormatter = DateFormatter() - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent _timestampFormatter.dateFormat = dateFormat logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "subscribed") - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { let maxEventTextLength = 40 let eventText = "\(event)" - let eventNormalized = eventText.characters.count > maxEventTextLength + + let eventNormalized = (eventText.characters.count > maxEventTextLength) && _parent._trimOutput ? String(eventText.characters.prefix(maxEventTextLength / 2)) + "..." + String(eventText.characters.suffix(maxEventTextLength / 2)) : eventText logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "Event \(eventNormalized)") + forwardOn(event) + if event.isStopEvent { + dispose() + } } override func dispose() { - logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "disposed") + if !self.disposed { + logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "isDisposed") + } super.dispose() } } -class Debug : Producer { - private let _identifier: String - - private let _source: Observable +class Debug : Producer { + fileprivate let _identifier: String + fileprivate let _trimOutput: Bool + fileprivate let _source: Source - init(source: Observable, identifier: String?, file: String, line: UInt, function: String) { + init(source: Source, identifier: String?, trimOutput: Bool, file: String, line: UInt, function: String) { + _trimOutput = trimOutput if let identifier = identifier { _identifier = identifier } else { let trimmedFile: String if let lastIndex = file.lastIndexOf("/") { - trimmedFile = file[lastIndex.successor() ..< file.endIndex] + trimmedFile = file[file.index(after: lastIndex) ..< file.endIndex] } else { trimmedFile = file @@ -69,9 +77,9 @@ class Debug : Producer { _source = source } - override func run(observer: O) -> Disposable { - let sink = Debug_(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Source.E { + let sink = DebugSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Debunce.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Debunce.swift new file mode 100644 index 0000000..99e8013 --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Debunce.swift @@ -0,0 +1,104 @@ +// +// Debunce.swift +// RxSwift +// +// Created by Krunoslav Zaher on 9/11/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +class DebounceSink + : Sink + , ObserverType + , LockOwnerType + , SynchronizedOnType { + typealias Element = O.E + typealias ParentType = Debounce + + private let _parent: ParentType + + let _lock = NSRecursiveLock() + + // state + private var _id = 0 as UInt64 + private var _value: Element? = nil + + let cancellable = SerialDisposable() + + init(parent: ParentType, observer: O, cancel: Cancelable) { + _parent = parent + + super.init(observer: observer, cancel: cancel) + } + + func run() -> Disposable { + let subscription = _parent._source.subscribe(self) + + return Disposables.create(subscription, cancellable) + } + + func on(_ event: Event) { + synchronizedOn(event) + } + + func _synchronized_on(_ event: Event) { + switch event { + case .next(let element): + _id = _id &+ 1 + let currentId = _id + _value = element + + + let scheduler = _parent._scheduler + let dueTime = _parent._dueTime + + let d = SingleAssignmentDisposable() + self.cancellable.disposable = d + d.setDisposable(scheduler.scheduleRelative(currentId, dueTime: dueTime, action: self.propagate)) + case .error: + _value = nil + forwardOn(event) + dispose() + case .completed: + if let value = _value { + _value = nil + forwardOn(.next(value)) + } + forwardOn(.completed) + dispose() + } + } + + func propagate(_ currentId: UInt64) -> Disposable { + _lock.lock(); defer { _lock.unlock() } // { + let originalValue = _value + + if let value = originalValue, _id == currentId { + _value = nil + forwardOn(.next(value)) + } + // } + return Disposables.create() + } +} + +class Debounce : Producer { + + fileprivate let _source: Observable + fileprivate let _dueTime: RxTimeInterval + fileprivate let _scheduler: SchedulerType + + init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { + _source = source + _dueTime = dueTime + _scheduler = scheduler + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = DebounceSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) + } + +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift index 31c6f2b..43182ce 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift @@ -8,14 +8,14 @@ import Foundation -class DeferredSink : Sink, ObserverType { +class DeferredSink : Sink, ObserverType where S.E == O.E { typealias E = O.E private let _observableFactory: () throws -> S - init(observableFactory: () throws -> S, observer: O) { + init(observableFactory: @escaping () throws -> S, observer: O, cancel: Cancelable) { _observableFactory = observableFactory - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { @@ -24,21 +24,21 @@ class DeferredSink : Sink) { + func on(_ event: Event) { forwardOn(event) switch event { - case .Next: + case .next: break - case .Error: + case .error: dispose() - case .Completed: + case .completed: dispose() } } @@ -49,13 +49,13 @@ class Deferred : Producer { private let _observableFactory : Factory - init(observableFactory: Factory) { + init(observableFactory: @escaping Factory) { _observableFactory = observableFactory } - override func run(observer: O) -> Disposable { - let sink = DeferredSink(observableFactory: _observableFactory, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { + let sink = DeferredSink(observableFactory: _observableFactory, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift new file mode 100644 index 0000000..37f6a2f --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift @@ -0,0 +1,164 @@ +// +// Delay.swift +// RxSwift +// +// Created by tarunon on 2016/02/09. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +class DelaySink + : Sink + , ObserverType { + typealias E = O.E + typealias Source = Observable + typealias DisposeKey = Bag.KeyType + + private let _lock = NSRecursiveLock() + + private let _dueTime: RxTimeInterval + private let _scheduler: SchedulerType + + private let _sourceSubscription = SingleAssignmentDisposable() + private let _cancelable = SerialDisposable() + + // is scheduled some action + private var _active = false + // is "run loop" on different scheduler running + private var _running = false + private var _errorEvent: Event? = nil + + // state + private var _queue = Queue<(eventTime: RxTime, event: Event)>(capacity: 0) + private var _disposed = false + + init(observer: O, dueTime: RxTimeInterval, scheduler: SchedulerType, cancel: Cancelable) { + _dueTime = dueTime + _scheduler = scheduler + super.init(observer: observer, cancel: cancel) + } + + // All of these complications in this method are caused by the fact that + // error should be propagated immediatelly. Error can bepotentially received on different + // scheduler so this process needs to be synchronized somehow. + // + // Another complication is that scheduler is potentially concurrent so internal queue is used. + func drainQueue(state: (), scheduler: AnyRecursiveScheduler<()>) { + + _lock.lock() // { + let hasFailed = _errorEvent != nil + if !hasFailed { + _running = true + } + _lock.unlock() // } + + if hasFailed { + return + } + + var ranAtLeastOnce = false + + while true { + _lock.lock() // { + let errorEvent = _errorEvent + + let eventToForwardImmediatelly = ranAtLeastOnce ? nil : _queue.dequeue()?.event + let nextEventToScheduleOriginalTime: Date? = ranAtLeastOnce && !_queue.isEmpty ? _queue.peek().eventTime : nil + + if let _ = errorEvent { + } + else { + if let _ = eventToForwardImmediatelly { + } + else if let _ = nextEventToScheduleOriginalTime { + _running = false + } + else { + _running = false + _active = false + } + } + _lock.unlock() // { + + if let errorEvent = errorEvent { + self.forwardOn(errorEvent) + self.dispose() + return + } + else { + if let eventToForwardImmediatelly = eventToForwardImmediatelly { + ranAtLeastOnce = true + self.forwardOn(eventToForwardImmediatelly) + if case .completed = eventToForwardImmediatelly { + self.dispose() + return + } + } + else if let nextEventToScheduleOriginalTime = nextEventToScheduleOriginalTime { + let elapsedTime = _scheduler.now.timeIntervalSince(nextEventToScheduleOriginalTime) + let interval = _dueTime - elapsedTime + let normalizedInterval = interval < 0.0 ? 0.0 : interval + scheduler.schedule((), dueTime: normalizedInterval) + return + } + else { + return + } + } + } + } + + func on(_ event: Event) { + if event.isStopEvent { + _sourceSubscription.dispose() + } + + switch event { + case .error(_): + _lock.lock() // { + let shouldSendImmediatelly = !_running + _queue = Queue(capacity: 0) + _errorEvent = event + _lock.unlock() // } + + if shouldSendImmediatelly { + forwardOn(event) + dispose() + } + default: + _lock.lock() // { + let shouldSchedule = !_active + _active = true + _queue.enqueue((_scheduler.now, event)) + _lock.unlock() // } + + if shouldSchedule { + _cancelable.disposable = _scheduler.scheduleRecursive((), dueTime: _dueTime, action: self.drainQueue) + } + } + } + + func run(source: Source) -> Disposable { + _sourceSubscription.setDisposable(source.subscribeSafe(self)) + return Disposables.create(_sourceSubscription, _cancelable) + } +} + +class Delay: Producer { + private let _source: Observable + private let _dueTime: RxTimeInterval + private let _scheduler: SchedulerType + + init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { + _source = source + _dueTime = dueTime + _scheduler = scheduler + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = DelaySink(observer: observer, dueTime: _dueTime, scheduler: _scheduler, cancel: cancel) + let subscription = sink.run(source: _source) + return (sink: sink, subscription: subscription) + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift index 3dc62ac..20207d2 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift @@ -8,20 +8,19 @@ import Foundation -class DelaySubscriptionSink - : Sink - , ObserverType { - typealias Parent = DelaySubscription +class DelaySubscriptionSink + : Sink, ObserverType { typealias E = O.E + typealias Parent = DelaySubscription private let _parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { forwardOn(event) if event.isStopEvent { dispose() @@ -41,12 +40,12 @@ class DelaySubscription: Producer { _scheduler = scheduler } - override func run(observer: O) -> Disposable { - let sink = DelaySubscriptionSink(parent: self, observer: observer) - sink.disposable = _scheduler.scheduleRelative((), dueTime: _dueTime) { _ in + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = DelaySubscriptionSink(parent: self, observer: observer, cancel: cancel) + let subscription = _scheduler.scheduleRelative((), dueTime: _dueTime) { _ in return self._source.subscribe(sink) } - return sink + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift index 9f03da4..a54f6cf 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift @@ -1,6 +1,6 @@ // // DistinctUntilChanged.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -14,14 +14,14 @@ class DistinctUntilChangedSink: Sink, ObserverType { private let _parent: DistinctUntilChanged private var _currentKey: Key? = nil - init(parent: DistinctUntilChanged, observer: O) { + init(parent: DistinctUntilChanged, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): do { let key = try _parent._selector(value) var areEqual = false @@ -38,10 +38,10 @@ class DistinctUntilChangedSink: Sink, ObserverType { forwardOn(event) } catch let error { - forwardOn(.Error(error)) + forwardOn(.error(error)) dispose() } - case .Error, .Completed: + case .error, .completed: forwardOn(event) dispose() } @@ -52,19 +52,19 @@ class DistinctUntilChanged: Producer { typealias KeySelector = (Element) throws -> Key typealias EqualityComparer = (Key, Key) throws -> Bool - private let _source: Observable - private let _selector: KeySelector - private let _comparer: EqualityComparer + fileprivate let _source: Observable + fileprivate let _selector: KeySelector + fileprivate let _comparer: EqualityComparer - init(source: Observable, selector: KeySelector, comparer: EqualityComparer) { + init(source: Observable, selector: @escaping KeySelector, comparer: @escaping EqualityComparer) { _source = source _selector = selector _comparer = comparer } - override func run(observer: O) -> Disposable { - let sink = DistinctUntilChangedSink(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = DistinctUntilChangedSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift index 719f2bb..0e766dd 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift @@ -1,6 +1,6 @@ // // Do.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -14,12 +14,12 @@ class DoSink : Sink, ObserverType { private let _parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { do { try _parent._eventHandler(event) forwardOn(event) @@ -28,26 +28,36 @@ class DoSink : Sink, ObserverType { } } catch let error { - forwardOn(.Error(error)) + forwardOn(.error(error)) dispose() } } } class Do : Producer { - typealias EventHandler = Event throws -> Void + typealias EventHandler = (Event) throws -> Void - private let _source: Observable - private let _eventHandler: EventHandler + fileprivate let _source: Observable + fileprivate let _eventHandler: EventHandler + fileprivate let _onSubscribe: (() -> ())? + fileprivate let _onDispose: (() -> ())? - init(source: Observable, eventHandler: EventHandler) { + init(source: Observable, eventHandler: @escaping EventHandler, onSubscribe: (() -> ())?, onDispose: (() -> ())?) { _source = source _eventHandler = eventHandler + _onSubscribe = onSubscribe + _onDispose = onDispose } - override func run(observer: O) -> Disposable { - let sink = DoSink(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + _onSubscribe?() + let sink = DoSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + let onDispose = _onDispose + let allSubscriptions = Disposables.create { + subscription.dispose() + onDispose?() + } + return (sink: sink, subscription: allSubscriptions) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift index 4360afb..0c103a7 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift @@ -1,6 +1,6 @@ // // ElementAt.swift -// Rx +// RxSwift // // Created by Junior B. on 21/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,45 +9,46 @@ import Foundation -class ElementAtSink : Sink, ObserverType { +class ElementAtSink : Sink, ObserverType { + typealias SourceType = O.E typealias Parent = ElementAt let _parent: Parent var _i: Int - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent _i = parent._index - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(_): + case .next(_): if (_i == 0) { forwardOn(event) - forwardOn(.Completed) + forwardOn(.completed) self.dispose() } do { - try decrementChecked(&_i) + let _ = try decrementChecked(&_i) } catch(let e) { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() return } - case .Error(let e): - forwardOn(.Error(e)) + case .error(let e): + forwardOn(.error(e)) self.dispose() - case .Completed: + case .completed: if (_parent._throwOnEmpty) { - forwardOn(.Error(RxError.ArgumentOutOfRange)) + forwardOn(.error(RxError.argumentOutOfRange)) } else { - forwardOn(.Completed) + forwardOn(.completed) } self.dispose() @@ -71,9 +72,9 @@ class ElementAt : Producer { self._throwOnEmpty = throwOnEmpty } - override func run(observer: O) -> Disposable { - let sink = ElementAtSink(parent: self, observer: observer) - sink.disposable = _source.subscribeSafe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { + let sink = ElementAtSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribeSafe(sink) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift index d2ebb18..39861a7 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift @@ -1,6 +1,6 @@ // // Empty.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 8/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,8 +9,8 @@ import Foundation class Empty : Producer { - override func subscribe(observer: O) -> Disposable { - observer.on(.Completed) - return NopDisposable.instance + override func subscribe(_ observer: O) -> Disposable where O.E == Element { + observer.on(.completed) + return Disposables.create() } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift index 79f19c9..6ddae8b 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift @@ -1,6 +1,6 @@ // // Error.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 8/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,14 +9,14 @@ import Foundation class Error : Producer { - private let _error: ErrorType + private let _error: Swift.Error - init(error: ErrorType) { + init(error: Swift.Error) { _error = error } - override func subscribe(observer: O) -> Disposable { - observer.on(.Error(_error)) - return NopDisposable.instance + override func subscribe(_ observer: O) -> Disposable where O.E == Element { + observer.on(.error(_error)) + return Disposables.create() } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift index b78fafb..2f03135 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift @@ -1,6 +1,6 @@ // // Filter.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/17/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -12,29 +12,27 @@ class FilterSink: Sink, ObserverType { typealias Predicate = (Element) throws -> Bool typealias Element = O.E - typealias Parent = Filter - private let _predicate: Predicate - init(predicate: Predicate, observer: O) { + init(predicate: @escaping Predicate, observer: O, cancel: Cancelable) { _predicate = predicate - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): do { let satisfies = try _predicate(value) if satisfies { - forwardOn(.Next(value)) + forwardOn(.next(value)) } } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() } - case .Completed, .Error: + case .completed, .error: forwardOn(event) dispose() } @@ -47,14 +45,14 @@ class Filter : Producer { private let _source: Observable private let _predicate: Predicate - init(source: Observable, predicate: Predicate) { + init(source: Observable, predicate: @escaping Predicate) { _source = source _predicate = predicate } - override func run(observer: O) -> Disposable { - let sink = FilterSink(predicate: _predicate, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = FilterSink(predicate: _predicate, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift index 8321f94..aebfb95 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift @@ -1,6 +1,6 @@ // // Generate.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 9/2/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -15,10 +15,10 @@ class GenerateSink : Sink { private var _state: S - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent _state = parent._initialState - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { @@ -30,17 +30,17 @@ class GenerateSink : Sink { if try self._parent._condition(self._state) { let result = try self._parent._resultSelector(self._state) - self.forwardOn(.Next(result)) + self.forwardOn(.next(result)) recurse(false) } else { - self.forwardOn(.Completed) + self.forwardOn(.completed) self.dispose() } } catch let error { - self.forwardOn(.Error(error)) + self.forwardOn(.error(error)) self.dispose() } } @@ -48,13 +48,13 @@ class GenerateSink : Sink { } class Generate : Producer { - private let _initialState: S - private let _condition: S throws -> Bool - private let _iterate: S throws -> S - private let _resultSelector: S throws -> E - private let _scheduler: ImmediateSchedulerType + fileprivate let _initialState: S + fileprivate let _condition: (S) throws -> Bool + fileprivate let _iterate: (S) throws -> S + fileprivate let _resultSelector: (S) throws -> E + fileprivate let _scheduler: ImmediateSchedulerType - init(initialState: S, condition: S throws -> Bool, iterate: S throws -> S, resultSelector: S throws -> E, scheduler: ImmediateSchedulerType) { + init(initialState: S, condition: @escaping (S) throws -> Bool, iterate: @escaping (S) throws -> S, resultSelector: @escaping (S) throws -> E, scheduler: ImmediateSchedulerType) { _initialState = initialState _condition = condition _iterate = iterate @@ -63,9 +63,9 @@ class Generate : Producer { super.init() } - override func run(observer: O) -> Disposable { - let sink = GenerateSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = GenerateSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift index 280827a..08ef34c 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift @@ -1,6 +1,6 @@ // // Just.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 8/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -13,36 +13,36 @@ class JustScheduledSink : Sink { private let _parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { let scheduler = _parent._scheduler return scheduler.schedule(_parent._element) { element in - self.forwardOn(.Next(element)) + self.forwardOn(.next(element)) return scheduler.schedule(()) { _ in - self.forwardOn(.Completed) - return NopDisposable.instance + self.forwardOn(.completed) + return Disposables.create() } } } } class JustScheduled : Producer { - private let _scheduler: ImmediateSchedulerType - private let _element: Element + fileprivate let _scheduler: ImmediateSchedulerType + fileprivate let _element: Element init(element: Element, scheduler: ImmediateSchedulerType) { _scheduler = scheduler _element = element } - override func subscribe(observer: O) -> Disposable { - let sink = JustScheduledSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = JustScheduledSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -53,9 +53,9 @@ class Just : Producer { _element = element } - override func subscribe(observer: O) -> Disposable { - observer.on(.Next(_element)) - observer.on(.Completed) - return NopDisposable.instance + override func subscribe(_ observer: O) -> Disposable where O.E == Element { + observer.on(.next(_element)) + observer.on(.completed) + return Disposables.create() } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift index a4dc379..1a28fcb 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift @@ -1,6 +1,6 @@ // // Map.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,34 +9,34 @@ import Foundation class MapSink : Sink, ObserverType { - typealias Selector = (SourceType) throws -> ResultType + typealias Transform = (SourceType) throws -> ResultType typealias ResultType = O.E typealias Element = SourceType - private let _selector: Selector + private let _transform: Transform - init(selector: Selector, observer: O) { - _selector = selector - super.init(observer: observer) + init(transform: @escaping Transform, observer: O, cancel: Cancelable) { + _transform = transform + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let element): + case .next(let element): do { - let mappedElement = try _selector(element) - forwardOn(.Next(mappedElement)) + let mappedElement = try _transform(element) + forwardOn(.next(mappedElement)) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() } - case .Error(let error): - forwardOn(.Error(error)) + case .error(let error): + forwardOn(.error(error)) dispose() - case .Completed: - forwardOn(.Completed) + case .completed: + forwardOn(.completed) dispose() } } @@ -53,27 +53,27 @@ class MapWithIndexSink : Sink, ObserverType { private var _index = 0 - init(selector: Selector, observer: O) { + init(selector: @escaping Selector, observer: O, cancel: Cancelable) { _selector = selector - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let element): + case .next(let element): do { let mappedElement = try _selector(element, try incrementChecked(&_index)) - forwardOn(.Next(mappedElement)) + forwardOn(.next(mappedElement)) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() } - case .Error(let error): - forwardOn(.Error(error)) + case .error(let error): + forwardOn(.error(error)) dispose() - case .Completed: - forwardOn(.Completed) + case .completed: + forwardOn(.completed) dispose() } } @@ -86,55 +86,60 @@ class MapWithIndex : Producer { private let _selector: Selector - init(source: Observable, selector: Selector) { + init(source: Observable, selector: @escaping Selector) { _source = source _selector = selector } - override func run(observer: O) -> Disposable { - let sink = MapWithIndexSink(selector: _selector, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { + let sink = MapWithIndexSink(selector: _selector, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } } #if TRACE_RESOURCES -public var numberOfMapOperators: Int32 = 0 + var _numberOfMapOperators: AtomicInt = 0 + extension Resources { + public static var numberOfMapOperators: Int32 { + return _numberOfMapOperators.valueSnapshot() + } + } #endif class Map: Producer { - typealias Selector = (SourceType) throws -> ResultType + typealias Transform = (SourceType) throws -> ResultType private let _source: Observable - private let _selector: Selector + private let _transform: Transform - init(source: Observable, selector: Selector) { + init(source: Observable, transform: @escaping Transform) { _source = source - _selector = selector + _transform = transform #if TRACE_RESOURCES - AtomicIncrement(&numberOfMapOperators) + let _ = AtomicIncrement(&_numberOfMapOperators) #endif } - override func composeMap(selector: ResultType throws -> R) -> Observable { - let originalSelector = _selector - return Map(source: _source, selector: { (s: SourceType) throws -> R in + override func composeMap(_ selector: @escaping (ResultType) throws -> R) -> Observable { + let originalSelector = _transform + return Map(source: _source, transform: { (s: SourceType) throws -> R in let r: ResultType = try originalSelector(s) return try selector(r) }) } - override func run(observer: O) -> Disposable { - let sink = MapSink(selector: _selector, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { + let sink = MapSink(transform: _transform, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } #if TRACE_RESOURCES deinit { - AtomicDecrement(&numberOfMapOperators) + let _ = AtomicDecrement(&_numberOfMapOperators) } #endif -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift index a7b90bb..cd700ab 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift @@ -1,6 +1,6 @@ // // Merge.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/28/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -10,12 +10,12 @@ import Foundation // MARK: Limited concurrency version -class MergeLimitedSinkIter +class MergeLimitedSinkIter : ObserverType , LockOwnerType - , SynchronizedOnType { + , SynchronizedOnType where S.E == O.E { typealias E = O.E - typealias DisposeKey = Bag.KeyType + typealias DisposeKey = CompositeDisposable.DisposeKey typealias Parent = MergeLimitedSink private let _parent: Parent @@ -30,19 +30,19 @@ class MergeLimitedSinkIter) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next: + case .next: _parent.forwardOn(event) - case .Error: + case .error: _parent.forwardOn(event) _parent.dispose() - case .Completed: - _parent._group.removeDisposable(_disposeKey) + case .completed: + _parent._group.remove(for: _disposeKey) if let next = _parent._queue.dequeue() { _parent.subscribe(next, group: _parent._group) } @@ -50,7 +50,7 @@ class MergeLimitedSinkIter +class MergeLimitedSink : Sink , ObserverType , LockOwnerType - , SynchronizedOnType { + , SynchronizedOnType where S.E == O.E { typealias E = S typealias QueueType = Queue - private let _maxConcurrent: Int + fileprivate let _maxConcurrent: Int let _lock = NSRecursiveLock() // state - private var _stopped = false - private var _activeCount = 0 - private var _queue = QueueType(capacity: 2) + fileprivate var _stopped = false + fileprivate var _activeCount = 0 + fileprivate var _queue = QueueType(capacity: 2) - private let _sourceSubscription = SingleAssignmentDisposable() - private let _group = CompositeDisposable() + fileprivate let _sourceSubscription = SingleAssignmentDisposable() + fileprivate let _group = CompositeDisposable() - init(maxConcurrent: Int, observer: O) { + init(maxConcurrent: Int, observer: O, cancel: Cancelable) { _maxConcurrent = maxConcurrent - _group.addDisposable(_sourceSubscription) - super.init(observer: observer) + let _ = _group.insert(_sourceSubscription) + super.init(observer: observer, cancel: cancel) } - func run(source: Observable) -> Disposable { - _group.addDisposable(_sourceSubscription) + func run(_ source: Observable) -> Disposable { + let _ = _group.insert(_sourceSubscription) let disposable = source.subscribe(self) - _sourceSubscription.disposable = disposable + _sourceSubscription.setDisposable(disposable) return _group } - func subscribe(innerSource: E, group: CompositeDisposable) { + func subscribe(_ innerSource: E, group: CompositeDisposable) { let subscription = SingleAssignmentDisposable() - let key = group.addDisposable(subscription) + let key = group.insert(subscription) if let key = key { let observer = MergeLimitedSinkIter(parent: self, disposeKey: key) let disposable = innerSource.asObservable().subscribe(observer) - subscription.disposable = disposable + subscription.setDisposable(disposable) } } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): let subscribe: Bool if _activeCount < _maxConcurrent { _activeCount += 1 @@ -126,12 +126,12 @@ class MergeLimitedSink : Producer { _maxConcurrent = maxConcurrent } - override func run(observer: O) -> Disposable { - let sink = MergeLimitedSink(maxConcurrent: _maxConcurrent, observer: observer) - sink.disposable = sink.run(_source) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { + let sink = MergeLimitedSink(maxConcurrent: _maxConcurrent, observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) } } // MARK: Merge -final class MergeBasicSink : MergeSink { - override init(observer: O) { - super.init(observer: observer) +final class MergeBasicSink : MergeSink where O.E == S.E { + override init(observer: O, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) } - override func performMap(element: S) throws -> S { + override func performMap(_ element: S) throws -> S { return element } } // MARK: flatMap -final class FlatMapSink : MergeSink { +final class FlatMapSink : MergeSink where O.E == S.E { typealias Selector = (SourceType) throws -> S private let _selector: Selector - init(selector: Selector, observer: O) { + init(selector: @escaping Selector, observer: O, cancel: Cancelable) { _selector = selector - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - override func performMap(element: SourceType) throws -> S { + override func performMap(_ element: SourceType) throws -> S { return try _selector(element) } } -final class FlatMapWithIndexSink : MergeSink { +final class FlatMapWithIndexSink : MergeSink where O.E == S.E { typealias Selector = (SourceType, Int) throws -> S private var _index = 0 private let _selector: Selector - init(selector: Selector, observer: O) { + init(selector: @escaping Selector, observer: O, cancel: Cancelable) { _selector = selector - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - override func performMap(element: SourceType) throws -> S { + override func performMap(_ element: SourceType) throws -> S { return try _selector(element, try incrementChecked(&_index)) } } // MARK: FlatMapFirst -final class FlatMapFirstSink : MergeSink { +final class FlatMapFirstSink : MergeSink where O.E == S.E { typealias Selector = (SourceType) throws -> S private let _selector: Selector @@ -215,12 +215,12 @@ final class FlatMapFirstSink S { + override func performMap(_ element: SourceType) throws -> S { return try _selector(element) } } @@ -228,7 +228,7 @@ final class FlatMapFirstSink : ObserverType { +class MergeSinkIter : ObserverType where O.E == S.E { typealias Parent = MergeSink typealias DisposeKey = CompositeDisposable.DisposeKey typealias E = O.E @@ -241,19 +241,19 @@ class MergeSinkIter) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): _parent._lock.lock(); defer { _parent._lock.unlock() } // lock { - _parent.forwardOn(.Next(value)) + _parent.forwardOn(.next(value)) // } - case .Error(let error): + case .error(let error): _parent._lock.lock(); defer { _parent._lock.unlock() } // lock { - _parent.forwardOn(.Error(error)) + _parent.forwardOn(.error(error)) _parent.dispose() // } - case .Completed: - _parent._group.removeDisposable(_disposeKey) + case .completed: + _parent._group.remove(for: _disposeKey) // If this has returned true that means that `Completed` should be sent. // In case there is a race who will sent first completed, // lock will sort it out. When first Completed message is sent @@ -261,7 +261,7 @@ class MergeSinkIter +class MergeSink : Sink - , ObserverType { + , ObserverType where O.E == S.E { typealias ResultType = O.E typealias Element = SourceType - private let _lock = NSRecursiveLock() + fileprivate let _lock = NSRecursiveLock() - private var subscribeNext: Bool { + fileprivate var subscribeNext: Bool { return true } // state - private let _group = CompositeDisposable() - private let _sourceSubscription = SingleAssignmentDisposable() + fileprivate let _group = CompositeDisposable() + fileprivate let _sourceSubscription = SingleAssignmentDisposable() - private var _stopped = false + fileprivate var _stopped = false - override init(observer: O) { - super.init(observer: observer) + override init(observer: O, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) } - func performMap(element: SourceType) throws -> S { + func performMap(_ element: SourceType) throws -> S { abstractMethod() } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let element): + case .next(let element): if !subscribeNext { return } @@ -307,19 +307,19 @@ class MergeSink) { + func subscribeInner(_ source: Observable) { let iterDisposable = SingleAssignmentDisposable() - if let disposeKey = _group.addDisposable(iterDisposable) { + if let disposeKey = _group.insert(iterDisposable) { let iter = MergeSinkIter(parent: self, disposeKey: disposeKey) let subscription = source.subscribe(iter) - iterDisposable.disposable = subscription + iterDisposable.setDisposable(subscription) } } - func run(source: Observable) -> Disposable { - _group.addDisposable(_sourceSubscription) + func run(_ source: Observable) -> Disposable { + let _ = _group.insert(_sourceSubscription) let subscription = source.subscribe(self) - _sourceSubscription.disposable = subscription + _sourceSubscription.setDisposable(subscription) return _group } @@ -357,15 +357,15 @@ final class FlatMap: Producer { private let _selector: Selector - init(source: Observable, selector: Selector) { + init(source: Observable, selector: @escaping Selector) { _source = source _selector = selector } - override func run(observer: O) -> Disposable { - let sink = FlatMapSink(selector: _selector, observer: observer) - sink.disposable = sink.run(_source) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { + let sink = FlatMapSink(selector: _selector, observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) } } @@ -376,15 +376,15 @@ final class FlatMapWithIndex: Producer private let _selector: Selector - init(source: Observable, selector: Selector) { + init(source: Observable, selector: @escaping Selector) { _source = source _selector = selector } - override func run(observer: O) -> Disposable { - let sink = FlatMapWithIndexSink(selector: _selector, observer: observer) - sink.disposable = sink.run(_source) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { + let sink = FlatMapWithIndexSink(selector: _selector, observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) } } @@ -396,15 +396,15 @@ final class FlatMapFirst: Producer, selector: Selector) { + init(source: Observable, selector: @escaping Selector) { _source = source _selector = selector } - override func run(observer: O) -> Disposable { - let sink = FlatMapFirstSink(selector: _selector, observer: observer) - sink.disposable = sink.run(_source) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { + let sink = FlatMapFirstSink(selector: _selector, observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) } } @@ -415,10 +415,10 @@ final class Merge : Producer { _source = source } - override func run(observer: O) -> Disposable { - let sink = MergeBasicSink(observer: observer) - sink.disposable = sink.run(_source) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { + let sink = MergeBasicSink(observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift index fd8bfd6..fe4ec2d 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift @@ -1,6 +1,6 @@ // // Multicast.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/27/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -15,9 +15,9 @@ class MulticastSink: Sink, ObserverType { private let _parent: MutlicastType - init(parent: MutlicastType, observer: O) { + init(parent: MutlicastType, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { @@ -30,20 +30,20 @@ class MulticastSink: Sink, ObserverType { let subscription = observable.subscribe(self) let connection = connectable.connect() - return BinaryDisposable(subscription, connection) + return Disposables.create(subscription, connection) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() - return NopDisposable.instance + return Disposables.create() } } - func on(event: Event) { + func on(_ event: Event) { forwardOn(event) switch event { - case .Next: break - case .Error, .Completed: + case .next: break + case .error, .completed: dispose() } } @@ -53,19 +53,19 @@ class Multicast: Producer { typealias SubjectSelectorType = () throws -> S typealias SelectorType = (Observable) throws -> Observable - private let _source: Observable - private let _subjectSelector: SubjectSelectorType - private let _selector: SelectorType + fileprivate let _source: Observable + fileprivate let _subjectSelector: SubjectSelectorType + fileprivate let _selector: SelectorType - init(source: Observable, subjectSelector: SubjectSelectorType, selector: SelectorType) { + init(source: Observable, subjectSelector: @escaping SubjectSelectorType, selector: @escaping SelectorType) { _source = source _subjectSelector = subjectSelector _selector = selector } - override func run(observer: O) -> Disposable { - let sink = MulticastSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = MulticastSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift index 1b20b27..2e1df69 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift @@ -1,6 +1,6 @@ // // Never.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 8/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,7 +9,7 @@ import Foundation class Never : Producer { - override func subscribe(observer: O) -> Disposable { - return NopDisposable.instance + override func subscribe(_ observer: O) -> Disposable where O.E == Element { + return Disposables.create() } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift index c0fb46d..9c561b1 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift @@ -17,28 +17,28 @@ class ObserveOn : Producer { self.source = source #if TRACE_RESOURCES - AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif } - override func run(observer: O) -> Disposable { - let sink = ObserveOnSink(scheduler: scheduler, observer: observer) - sink._subscription.disposable = source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = ObserveOnSink(scheduler: scheduler, observer: observer, cancel: cancel) + let subscription = source.subscribe(sink) + return (sink: sink, subscription: subscription) } #if TRACE_RESOURCES deinit { - AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() } #endif } enum ObserveOnState : Int32 { // pump is not running - case Stopped = 0 + case stopped = 0 // pump is running - case Running = 1 + case running = 1 } class ObserveOnSink : ObserverBase { @@ -47,29 +47,30 @@ class ObserveOnSink : ObserverBase { let _scheduler: ImmediateSchedulerType var _lock = SpinLock() + let _observer: O // state - var _state = ObserveOnState.Stopped - var _observer: O? + var _state = ObserveOnState.stopped var _queue = Queue>(capacity: 10) let _scheduleDisposable = SerialDisposable() - let _subscription = SingleAssignmentDisposable() + let _cancel: Cancelable - init(scheduler: ImmediateSchedulerType, observer: O) { + init(scheduler: ImmediateSchedulerType, observer: O, cancel: Cancelable) { _scheduler = scheduler _observer = observer + _cancel = cancel } - override func onCore(event: Event) { + override func onCore(_ event: Event) { let shouldStart = _lock.calculateLocked { () -> Bool in self._queue.enqueue(event) switch self._state { - case .Stopped: - self._state = .Running + case .stopped: + self._state = .running return true - case .Running: + case .running: return false } } @@ -79,19 +80,19 @@ class ObserveOnSink : ObserverBase { } } - func run(state: Void, recurse: Void -> Void) { - let (nextEvent, observer) = self._lock.calculateLocked { () -> (Event?, O?) in + func run(_ state: Void, recurse: (Void) -> Void) { + let (nextEvent, observer) = self._lock.calculateLocked { () -> (Event?, O) in if self._queue.count > 0 { return (self._queue.dequeue(), self._observer) } else { - self._state = .Stopped + self._state = .stopped return (nil, self._observer) } } - if let nextEvent = nextEvent { - observer?.on(nextEvent) + if let nextEvent = nextEvent, !_cancel.isDisposed { + observer.on(nextEvent) if nextEvent.isStopEvent { dispose() } @@ -113,7 +114,7 @@ class ObserveOnSink : ObserverBase { return true } else { - self._state = .Stopped + self._state = .stopped return false } // } @@ -122,12 +123,7 @@ class ObserveOnSink : ObserverBase { override func dispose() { super.dispose() - _subscription.dispose() + _cancel.dispose() _scheduleDisposable.dispose() - - _lock.lock(); defer { _lock.unlock() } // { - _observer = nil - - // } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift index f051f82..7f4ab9c 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift @@ -9,25 +9,31 @@ import Foundation #if TRACE_RESOURCES -/** -Counts number of `SerialDispatchQueueObservables`. + fileprivate var _numberOfSerialDispatchQueueObservables: AtomicInt = 0 + extension Resources { + /** + Counts number of `SerialDispatchQueueObservables`. -Purposed for unit tests. -*/ -public var numberOfSerialDispatchQueueObservables: AtomicInt = 0 + Purposed for unit tests. + */ + public static var numberOfSerialDispatchQueueObservables: Int32 { + return _numberOfSerialDispatchQueueObservables.valueSnapshot() + } + } #endif class ObserveOnSerialDispatchQueueSink : ObserverBase { let scheduler: SerialDispatchQueueScheduler let observer: O - let subscription = SingleAssignmentDisposable() + let cancel: Cancelable var cachedScheduleLambda: ((ObserveOnSerialDispatchQueueSink, Event) -> Disposable)! - init(scheduler: SerialDispatchQueueScheduler, observer: O) { + init(scheduler: SerialDispatchQueueScheduler, observer: O, cancel: Cancelable) { self.scheduler = scheduler self.observer = observer + self.cancel = cancel super.init() cachedScheduleLambda = { sink, event in @@ -37,18 +43,18 @@ class ObserveOnSerialDispatchQueueSink : ObserverBase { sink.dispose() } - return NopDisposable.instance + return Disposables.create() } } - override func onCore(event: Event) { - self.scheduler.schedule((self, event), action: cachedScheduleLambda) + override func onCore(_ event: Event) { + let _ = self.scheduler.schedule((self, event), action: cachedScheduleLambda) } override func dispose() { super.dispose() - subscription.dispose() + cancel.dispose() } } @@ -61,21 +67,21 @@ class ObserveOnSerialDispatchQueue : Producer { self.source = source #if TRACE_RESOURCES - AtomicIncrement(&resourceCount) - AtomicIncrement(&numberOfSerialDispatchQueueObservables) + let _ = Resources.incrementTotal() + let _ = AtomicIncrement(&_numberOfSerialDispatchQueueObservables) #endif } - override func run(observer: O) -> Disposable { - let sink = ObserveOnSerialDispatchQueueSink(scheduler: scheduler, observer: observer) - sink.subscription.disposable = source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = ObserveOnSerialDispatchQueueSink(scheduler: scheduler, observer: observer, cancel: cancel) + let subscription = source.subscribe(sink) + return (sink: sink, subscription: subscription) } #if TRACE_RESOURCES deinit { - AtomicDecrement(&resourceCount) - AtomicDecrement(&numberOfSerialDispatchQueueObservables) + let _ = Resources.decrementTotal() + let _ = AtomicDecrement(&_numberOfSerialDispatchQueueObservables) } #endif -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Optional.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Optional.swift new file mode 100644 index 0000000..b05f7ea --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Optional.swift @@ -0,0 +1,68 @@ +// +// Optional.swift +// RxSwift +// +// Created by tarunon on 2016/12/13. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +class ObservableOptionalScheduledSink : Sink { + typealias E = O.E + typealias Parent = ObservableOptionalScheduled + + private let _parent: Parent + + init(parent: Parent, observer: O, cancel: Cancelable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func run() -> Disposable { + return _parent._scheduler.schedule(_parent._optional) { (optional: E?) -> Disposable in + if let next = optional { + self.forwardOn(.next(next)) + return self._parent._scheduler.schedule(()) { _ in + self.forwardOn(.completed) + return Disposables.create() + } + } else { + self.forwardOn(.completed) + return Disposables.create() + } + } + } +} + +class ObservableOptionalScheduled : Producer { + fileprivate let _optional: E? + fileprivate let _scheduler: ImmediateSchedulerType + + init(optional: E?, scheduler: ImmediateSchedulerType) { + _optional = optional + _scheduler = scheduler + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = ObservableOptionalScheduledSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) + } +} + +class ObservableOptional: Producer { + private let _optional: E? + + init(optional: E?) { + _optional = optional + } + + override func subscribe(_ observer: O) -> Disposable where O.E == E { + if let element = _optional { + observer.on(.next(element)) + } + observer.on(.completed) + return Disposables.create() + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift index 0a3048a..ca20f8a 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift @@ -1,6 +1,6 @@ // // Producer.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/20/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -13,18 +13,107 @@ class Producer : Observable { super.init() } - override func subscribe(observer: O) -> Disposable { + override func subscribe(_ observer: O) -> Disposable where O.E == Element { if !CurrentThreadScheduler.isScheduleRequired { - return run(observer) + // The returned disposable needs to release all references once it was disposed. + let disposer = SinkDisposer() + let sinkAndSubscription = run(observer, cancel: disposer) + disposer.setSinkAndSubscription(sink: sinkAndSubscription.sink, subscription: sinkAndSubscription.subscription) + + return disposer } else { return CurrentThreadScheduler.instance.schedule(()) { _ in - return self.run(observer) + let disposer = SinkDisposer() + let sinkAndSubscription = self.run(observer, cancel: disposer) + disposer.setSinkAndSubscription(sink: sinkAndSubscription.sink, subscription: sinkAndSubscription.subscription) + + return disposer } } } - func run(observer: O) -> Disposable { + func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { abstractMethod() } -} \ No newline at end of file +} + +fileprivate class SinkDisposer: Cancelable { + #if os(Linux) + fileprivate let _lock = SpinLock() + #endif + + fileprivate enum DisposeState: UInt32 { + case disposed = 1 + case sinkAndSubscriptionSet = 2 + } + + // Jeej, swift API consistency rules + fileprivate enum DisposeStateInt32: Int32 { + case disposed = 1 + case sinkAndSubscriptionSet = 2 + } + + private var _state: UInt32 = 0 + private var _sink: Disposable? = nil + private var _subscription: Disposable? = nil + + var isDisposed: Bool { + return (_state & DisposeState.disposed.rawValue) != 0 + } + + func setSinkAndSubscription(sink: Disposable, subscription: Disposable) { + _sink = sink + _subscription = subscription + + #if os(Linux) + _lock.lock() + let previousState = Int32(_state) + _state = _state | DisposeState.sinkAndSubscriptionSet.rawValue + // We know about `defer { _lock.unlock() }`, but this resolves Swift compiler bugs. Using `defer` here causes anomaly. + _lock.unlock() + #else + let previousState = OSAtomicOr32OrigBarrier(DisposeState.sinkAndSubscriptionSet.rawValue, &_state) + #endif + if (previousState & DisposeStateInt32.sinkAndSubscriptionSet.rawValue) != 0 { + rxFatalError("Sink and subscription were already set") + } + + if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { + sink.dispose() + subscription.dispose() + _sink = nil + _subscription = nil + } + } + + func dispose() { + #if os(Linux) + _lock.lock() + let previousState = Int32(_state) + _state = _state | DisposeState.disposed.rawValue + // We know about `defer { _lock.unlock() }`, but this resolves Swift compiler bugs. Using `defer` here causes anomaly. + _lock.unlock() + #else + let previousState = OSAtomicOr32OrigBarrier(DisposeState.disposed.rawValue, &_state) + #endif + if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { + return + } + + if (previousState & DisposeStateInt32.sinkAndSubscriptionSet.rawValue) != 0 { + guard let sink = _sink else { + rxFatalError("Sink not set") + } + guard let subscription = _subscription else { + rxFatalError("Subscription not set") + } + + sink.dispose() + subscription.dispose() + + _sink = nil + _subscription = nil + } + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift index 8295c59..74ece4d 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift @@ -1,6 +1,6 @@ // // Range.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 9/13/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,10 +8,10 @@ import Foundation -class RangeProducer : Producer { - private let _start: E - private let _count: E - private let _scheduler: ImmediateSchedulerType +class RangeProducer : Producer { + fileprivate let _start: E + fileprivate let _count: E + fileprivate let _scheduler: ImmediateSchedulerType init(start: E, count: E, scheduler: ImmediateSchedulerType) { if count < 0 { @@ -27,33 +27,33 @@ class RangeProducer : Producer { _scheduler = scheduler } - override func run(observer: O) -> Disposable { - let sink = RangeSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = RangeSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } -class RangeSink : Sink { +class RangeSink : Sink where O.E: SignedInteger { typealias Parent = RangeProducer private let _parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { return _parent._scheduler.scheduleRecursive(0 as O.E) { i, recurse in if i < self._parent._count { - self.forwardOn(.Next(self._parent._start + i)) + self.forwardOn(.next(self._parent._start + i)) recurse(i + 1) } else { - self.forwardOn(.Completed) + self.forwardOn(.completed) self.dispose() } } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift index 10e03b8..f203709 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift @@ -1,6 +1,6 @@ // // Reduce.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 4/1/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -15,35 +15,35 @@ class ReduceSink : Sink, Observe private let _parent: Parent private var _accumulation: AccumulateType - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent _accumulation = parent._seed - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): do { _accumulation = try _parent._accumulator(_accumulation, value) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() } - case .Error(let e): - forwardOn(.Error(e)) + case .error(let e): + forwardOn(.error(e)) dispose() - case .Completed: + case .completed: do { let result = try _parent._mapResult(_accumulation) - forwardOn(.Next(result)) - forwardOn(.Completed) + forwardOn(.next(result)) + forwardOn(.completed) dispose() } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() } } @@ -54,21 +54,21 @@ class Reduce : Producer { typealias AccumulatorType = (AccumulateType, SourceType) throws -> AccumulateType typealias ResultSelectorType = (AccumulateType) throws -> ResultType - private let _source: Observable - private let _seed: AccumulateType - private let _accumulator: AccumulatorType - private let _mapResult: ResultSelectorType + fileprivate let _source: Observable + fileprivate let _seed: AccumulateType + fileprivate let _accumulator: AccumulatorType + fileprivate let _mapResult: ResultSelectorType - init(source: Observable, seed: AccumulateType, accumulator: AccumulatorType, mapResult: ResultSelectorType) { + init(source: Observable, seed: AccumulateType, accumulator: @escaping AccumulatorType, mapResult: @escaping ResultSelectorType) { _source = source _seed = seed _accumulator = accumulator _mapResult = mapResult } - - override func run(observer: O) -> Disposable { - let sink = ReduceSink(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { + let sink = ReduceSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift index 1649dda..1c5e88c 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift @@ -1,6 +1,6 @@ // // RefCount.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/5/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,17 +8,17 @@ import Foundation -class RefCountSink +class RefCountSink : Sink - , ObserverType { + , ObserverType where CO.E == O.E { typealias Element = O.E typealias Parent = RefCount private let _parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { @@ -34,7 +34,7 @@ class RefCountSink) { + func on(_ event: Event) { switch event { - case .Next: + case .next: forwardOn(event) - case .Error, .Completed: + case .error, .completed: forwardOn(event) dispose() } @@ -64,21 +64,21 @@ class RefCountSink: Producer { - private let _lock = NSRecursiveLock() + fileprivate let _lock = NSRecursiveLock() // state - private var _count = 0 - private var _connectableSubscription = nil as Disposable? + fileprivate var _count = 0 + fileprivate var _connectableSubscription = nil as Disposable? - private let _source: CO + fileprivate let _source: CO init(source: CO) { _source = source } - override func run(observer: O) -> Disposable { - let sink = RefCountSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == CO.E { + let sink = RefCountSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift index 13b9cc7..90b850b 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift @@ -1,6 +1,6 @@ // // Repeat.swift -// RxExample +// RxSwift // // Created by Krunoslav Zaher on 9/13/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,19 +9,19 @@ import Foundation class RepeatElement : Producer { - private let _element: Element - private let _scheduler: ImmediateSchedulerType + fileprivate let _element: Element + fileprivate let _scheduler: ImmediateSchedulerType init(element: Element, scheduler: ImmediateSchedulerType) { _element = element _scheduler = scheduler } - override func run(observer: O) -> Disposable { - let sink = RepeatElementSink(parent: self, observer: observer) - sink.disposable = sink.run() + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = RepeatElementSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() - return sink + return (sink: sink, subscription: subscription) } } @@ -30,15 +30,15 @@ class RepeatElementSink : Sink { private let _parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { return _parent._scheduler.scheduleRecursive(_parent._element) { e, recurse in - self.forwardOn(.Next(e)) + self.forwardOn(.next(e)) recurse(e) } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift index 724218e..00cba3d 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift @@ -1,6 +1,6 @@ // // RetryWhen.swift -// Rx +// RxSwift // // Created by Junior B. on 06/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,51 +8,51 @@ import Foundation -class RetryTriggerSink - : ObserverType { +class RetryTriggerSink + : ObserverType where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { typealias E = TriggerObservable.E typealias Parent = RetryWhenSequenceSinkIter - private let _parent: Parent + fileprivate let _parent: Parent init(parent: Parent) { _parent = parent } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next: + case .next: _parent._parent._lastError = nil - _parent._parent.schedule(.MoveNext) - case .Error(let e): - _parent._parent.forwardOn(.Error(e)) + _parent._parent.schedule(.moveNext) + case .error(let e): + _parent._parent.forwardOn(.error(e)) _parent._parent.dispose() - case .Completed: - _parent._parent.forwardOn(.Completed) + case .completed: + _parent._parent.forwardOn(.completed) _parent._parent.dispose() } } } -class RetryWhenSequenceSinkIter +class RetryWhenSequenceSinkIter : SingleAssignmentDisposable - , ObserverType { + , ObserverType where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { typealias E = O.E typealias Parent = RetryWhenSequenceSink - private let _parent: Parent - private let _errorHandlerSubscription = SingleAssignmentDisposable() + fileprivate let _parent: Parent + fileprivate let _errorHandlerSubscription = SingleAssignmentDisposable() init(parent: Parent) { _parent = parent } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next: + case .next: _parent.forwardOn(event) - case .Error(let error): + case .error(let error): _parent._lastError = error if let failedWith = error as? Error { @@ -60,14 +60,14 @@ class RetryWhenSequenceSinkIter - : TailRecursiveSink { +class RetryWhenSequenceSink + : TailRecursiveSink where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { typealias Element = O.E typealias Parent = RetryWhenSequence let _lock = NSRecursiveLock() - private let _parent: Parent + fileprivate let _parent: Parent - private var _lastError: ErrorType? - private let _errorSubject = PublishSubject() - private let _handler: Observable - private let _notifier = PublishSubject() + fileprivate var _lastError: Swift.Error? + fileprivate let _errorSubject = PublishSubject() + fileprivate let _handler: Observable + fileprivate let _notifier = PublishSubject() - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent _handler = parent._notificationHandler(_errorSubject).asObservable() - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } override func done() { if let lastError = _lastError { - forwardOn(.Error(lastError)) + forwardOn(.error(lastError)) _lastError = nil } else { - forwardOn(.Completed) + forwardOn(.completed) } dispose() } - override func extract(observable: Observable) -> SequenceGenerator? { + override func extract(_ observable: Observable) -> SequenceGenerator? { // It is important to always return `nil` here because there are sideffects in the `run` method // that are dependant on particular `retryWhen` operator so single operator stack can't be reused in this // case. return nil } - override func subscribeToNext(source: Observable) -> Disposable { + override func subscribeToNext(_ source: Observable) -> Disposable { let iter = RetryWhenSequenceSinkIter(parent: self) - iter.disposable = source.subscribe(iter) + iter.setDisposable(source.subscribe(iter)) return iter } - override func run(sources: SequenceGenerator) -> Disposable { + override func run(_ sources: SequenceGenerator) -> Disposable { let triggerSubscription = _handler.subscribe(_notifier.asObserver()) let superSubscription = super.run(sources) - return StableCompositeDisposable.create(superSubscription, triggerSubscription) + return Disposables.create(superSubscription, triggerSubscription) } } -class RetryWhenSequence : Producer { - typealias Element = S.Generator.Element.E +class RetryWhenSequence : Producer where S.Iterator.Element : ObservableType { + typealias Element = S.Iterator.Element.E - private let _sources: S - private let _notificationHandler: Observable -> TriggerObservable + fileprivate let _sources: S + fileprivate let _notificationHandler: (Observable) -> TriggerObservable - init(sources: S, notificationHandler: Observable -> TriggerObservable) { + init(sources: S, notificationHandler: @escaping (Observable) -> TriggerObservable) { _sources = sources _notificationHandler = notificationHandler } - override func run(observer: O) -> Disposable { - let sink = RetryWhenSequenceSink(parent: self, observer: observer) - sink.disposable = sink.run((self._sources.generate(), nil)) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = RetryWhenSequenceSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run((self._sources.makeIterator(), nil)) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift index a8f0ad4..107dfec 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift @@ -8,7 +8,7 @@ import Foundation -class SamplerSink +class SamplerSink : ObserverType , LockOwnerType , SynchronizedOnType { @@ -16,7 +16,7 @@ class SamplerSink - private let _parent: Parent + fileprivate let _parent: Parent var _lock: NSRecursiveLock { return _parent._lock @@ -26,35 +26,32 @@ class SamplerSink) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next: + case .next: if let element = _parent._element { - if _parent._parent._onlyNew { - _parent._element = nil - } - - _parent.forwardOn(.Next(element)) + _parent._element = nil + _parent.forwardOn(.next(element)) } if _parent._atEnd { - _parent.forwardOn(.Completed) + _parent.forwardOn(.completed) _parent.dispose() } - case .Error(let e): - _parent.forwardOn(.Error(e)) + case .error(let e): + _parent.forwardOn(.error(e)) _parent.dispose() - case .Completed: + case .completed: if let element = _parent._element { _parent._element = nil - _parent.forwardOn(.Next(element)) + _parent.forwardOn(.next(element)) } if _parent._atEnd { - _parent.forwardOn(.Completed) + _parent.forwardOn(.completed) _parent.dispose() } } @@ -69,40 +66,40 @@ class SampleSequenceSink typealias Element = O.E typealias Parent = Sample - private let _parent: Parent + fileprivate let _parent: Parent let _lock = NSRecursiveLock() // state - private var _element = nil as Element? - private var _atEnd = false + fileprivate var _element = nil as Element? + fileprivate var _atEnd = false - private let _sourceSubscription = SingleAssignmentDisposable() + fileprivate let _sourceSubscription = SingleAssignmentDisposable() - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { - _sourceSubscription.disposable = _parent._source.subscribe(self) + _sourceSubscription.setDisposable(_parent._source.subscribe(self)) let samplerSubscription = _parent._sampler.subscribe(SamplerSink(parent: self)) - return StableCompositeDisposable.create(_sourceSubscription, samplerSubscription) + return Disposables.create(_sourceSubscription, samplerSubscription) } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next(let element): + case .next(let element): _element = element - case .Error: + case .error: forwardOn(event) dispose() - case .Completed: + case .completed: _atEnd = true _sourceSubscription.dispose() } @@ -111,19 +108,17 @@ class SampleSequenceSink } class Sample : Producer { - private let _source: Observable - private let _sampler: Observable - private let _onlyNew: Bool + fileprivate let _source: Observable + fileprivate let _sampler: Observable - init(source: Observable, sampler: Observable, onlyNew: Bool) { + init(source: Observable, sampler: Observable) { _source = source _sampler = sampler - _onlyNew = onlyNew } - override func run(observer: O) -> Disposable { - let sink = SampleSequenceSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = SampleSequenceSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift index 958dd69..e381ae3 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift @@ -8,35 +8,36 @@ import Foundation -class ScanSink : Sink, ObserverType { +class ScanSink : Sink, ObserverType { + typealias Accumulate = O.E typealias Parent = Scan typealias E = ElementType - private let _parent: Parent - private var _accumulate: Accumulate + fileprivate let _parent: Parent + fileprivate var _accumulate: Accumulate - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent _accumulate = parent._seed - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let element): + case .next(let element): do { _accumulate = try _parent._accumulator(_accumulate, element) - forwardOn(.Next(_accumulate)) + forwardOn(.next(_accumulate)) } catch let error { - forwardOn(.Error(error)) + forwardOn(.error(error)) dispose() } - case .Error(let error): - forwardOn(.Error(error)) + case .error(let error): + forwardOn(.error(error)) dispose() - case .Completed: - forwardOn(.Completed) + case .completed: + forwardOn(.completed) dispose() } } @@ -46,19 +47,19 @@ class ScanSink class Scan: Producer { typealias Accumulator = (Accumulate, Element) throws -> Accumulate - private let _source: Observable - private let _seed: Accumulate - private let _accumulator: Accumulator + fileprivate let _source: Observable + fileprivate let _seed: Accumulate + fileprivate let _accumulator: Accumulator - init(source: Observable, seed: Accumulate, accumulator: Accumulator) { + init(source: Observable, seed: Accumulate, accumulator: @escaping Accumulator) { _source = source _seed = seed _accumulator = accumulator } - override func run(observer: O) -> Disposable { - let sink = ScanSink(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Accumulate { + let sink = ScanSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift index 63ee713..b5f972d 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift @@ -1,6 +1,6 @@ // // Sequence.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 11/14/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,51 +8,42 @@ import Foundation -class SequenceSink : Sink { - typealias Parent = Sequence +class ObservableSequenceSink : Sink where S.Iterator.Element == O.E { + typealias Parent = ObservableSequence private let _parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { - return _parent._scheduler!.scheduleRecursive((0, _parent._elements)) { (state, recurse) in - if state.0 < state.1.count { - self.forwardOn(.Next(state.1[state.0])) - recurse((state.0 + 1, state.1)) + return _parent._scheduler.scheduleRecursive((_parent._elements.makeIterator(), _parent._elements)) { (iterator, recurse) in + var mutableIterator = iterator + if let next = mutableIterator.0.next() { + self.forwardOn(.next(next)) + recurse(mutableIterator) } else { - self.forwardOn(.Completed) + self.forwardOn(.completed) } } } } -class Sequence : Producer { - private let _elements: [E] - private let _scheduler: ImmediateSchedulerType? +class ObservableSequence : Producer { + fileprivate let _elements: S + fileprivate let _scheduler: ImmediateSchedulerType - init(elements: [E], scheduler: ImmediateSchedulerType?) { + init(elements: S, scheduler: ImmediateSchedulerType) { _elements = elements _scheduler = scheduler } - override func subscribe(observer: O) -> Disposable { - // optimized version without scheduler - guard _scheduler != nil else { - for element in _elements { - observer.on(.Next(element)) - } - - observer.on(.Completed) - return NopDisposable.instance - } - - let sink = SequenceSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = ObservableSequenceSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift index 52cb5eb..6f7497b 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift @@ -1,6 +1,6 @@ // // ShareReplay1.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -30,19 +30,19 @@ final class ShareReplay1 self._source = source } - override func subscribe(observer: O) -> Disposable { + override func subscribe(_ observer: O) -> Disposable where O.E == E { _lock.lock(); defer { _lock.unlock() } return _synchronized_subscribe(observer) } - func _synchronized_subscribe(observer: O) -> Disposable { + func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == E { if let element = self._element { - observer.on(.Next(element)) + observer.on(.next(element)) } if let stopEvent = self._stopEvent { observer.on(stopEvent) - return NopDisposable.instance + return Disposables.create() } let initialCount = self._observers.count @@ -53,18 +53,18 @@ final class ShareReplay1 let connection = SingleAssignmentDisposable() _connection = connection - connection.disposable = self._source.subscribe(self) + connection.setDisposable(self._source.subscribe(self)) } return SubscriptionDisposable(owner: self, key: disposeKey) } - func synchronizedUnsubscribe(disposeKey: DisposeKey) { + func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { _lock.lock(); defer { _lock.unlock() } _synchronized_unsubscribe(disposeKey) } - func _synchronized_unsubscribe(disposeKey: DisposeKey) { + func _synchronized_unsubscribe(_ disposeKey: DisposeKey) { // if already unsubscribed, just return if self._observers.removeKey(disposeKey) == nil { return @@ -76,26 +76,26 @@ final class ShareReplay1 } } - func on(event: Event) { - _lock.lock(); defer { _lock.unlock() } - _synchronized_on(event) + func on(_ event: Event) { + _synchronized_on(event).on(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) -> Bag> { + _lock.lock(); defer { _lock.unlock() } if _stopped { - return + return Bag() } switch event { - case .Next(let element): + case .next(let element): _element = element - case .Error, .Completed: + case .error, .completed: _stopEvent = event _stopped = true _connection?.dispose() _connection = nil } - _observers.on(event) + return _observers } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift index af776b1..fa8c252 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift @@ -1,6 +1,6 @@ // // ShareReplay1WhileConnected.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 12/6/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -28,14 +28,14 @@ final class ShareReplay1WhileConnected self._source = source } - override func subscribe(observer: O) -> Disposable { + override func subscribe(_ observer: O) -> Disposable where O.E == E { _lock.lock(); defer { _lock.unlock() } return _synchronized_subscribe(observer) } - func _synchronized_subscribe(observer: O) -> Disposable { + func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == E { if let element = self._element { - observer.on(.Next(element)) + observer.on(.next(element)) } let initialCount = self._observers.count @@ -46,18 +46,18 @@ final class ShareReplay1WhileConnected let connection = SingleAssignmentDisposable() _connection = connection - connection.disposable = self._source.subscribe(self) + connection.setDisposable(self._source.subscribe(self)) } return SubscriptionDisposable(owner: self, key: disposeKey) } - func synchronizedUnsubscribe(disposeKey: DisposeKey) { + func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { _lock.lock(); defer { _lock.unlock() } _synchronized_unsubscribe(disposeKey) } - func _synchronized_unsubscribe(disposeKey: DisposeKey) { + func _synchronized_unsubscribe(_ disposeKey: DisposeKey) { // if already unsubscribed, just return if self._observers.removeKey(disposeKey) == nil { return @@ -70,23 +70,23 @@ final class ShareReplay1WhileConnected } } - func on(event: Event) { - _lock.lock(); defer { _lock.unlock() } - _synchronized_on(event) + func on(_ event: Event) { + _synchronized_on(event).on(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) -> Bag> { + _lock.lock(); defer { _lock.unlock() } switch event { - case .Next(let element): + case .next(let element): _element = element - _observers.on(event) - case .Error, .Completed: + return _observers + case .error, .completed: _element = nil _connection?.dispose() _connection = nil let observers = _observers _observers = Bag() - observers.on(event) + return observers } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift index af7a09a..988677d 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift @@ -1,6 +1,6 @@ // // SingleAsync.swift -// Rx +// RxSwift // // Created by Junior B. on 09/11/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,21 +8,22 @@ import Foundation -class SingleAsyncSink : Sink, ObserverType { +class SingleAsyncSink : Sink, ObserverType { + typealias ElementType = O.E typealias Parent = SingleAsync typealias E = ElementType private let _parent: Parent private var _seenValue: Bool = false - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): do { let forward = try _parent._predicate?(value) ?? true if !forward { @@ -30,27 +31,27 @@ class SingleAsyncSink : S } } catch let error { - forwardOn(.Error(error as ErrorType)) + forwardOn(.error(error as Swift.Error)) dispose() return } if _seenValue == false { _seenValue = true - forwardOn(.Next(value)) + forwardOn(.next(value)) } else { - forwardOn(.Error(RxError.MoreThanOneElement)) + forwardOn(.error(RxError.moreThanOneElement)) dispose() } - case .Error: + case .error: forwardOn(event) dispose() - case .Completed: + case .completed: if (!_seenValue) { - forwardOn(.Error(RxError.NoElements)) + forwardOn(.error(RxError.noElements)) } else { - forwardOn(.Completed) + forwardOn(.completed) } dispose() } @@ -60,17 +61,17 @@ class SingleAsyncSink : S class SingleAsync: Producer { typealias Predicate = (Element) throws -> Bool - private let _source: Observable - private let _predicate: Predicate? + fileprivate let _source: Observable + fileprivate let _predicate: Predicate? init(source: Observable, predicate: Predicate? = nil) { _source = source _predicate = predicate } - override func run(observer: O) -> Disposable { - let sink = SingleAsyncSink(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = SingleAsyncSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift index dff961f..21e1d78 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift @@ -1,6 +1,6 @@ // // Sink.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/19/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,18 +8,22 @@ import Foundation -class Sink : SingleAssignmentDisposable { - private let _observer: O +class Sink : Disposable { + fileprivate let _observer: O + fileprivate let _cancel: Cancelable + fileprivate var _disposed: Bool - init(observer: O) { + init(observer: O, cancel: Cancelable) { #if TRACE_RESOURCES - AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif _observer = observer + _cancel = cancel + _disposed = false } - final func forwardOn(event: Event) { - if disposed { + final func forwardOn(_ event: Event) { + if _disposed { return } _observer.on(event) @@ -29,9 +33,18 @@ class Sink : SingleAssignmentDisposable { return SinkForward(forward: self) } + var disposed: Bool { + return _disposed + } + + func dispose() { + _disposed = true + _cancel.dispose() + } + deinit { #if TRACE_RESOURCES - AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() #endif } } @@ -45,13 +58,13 @@ class SinkForward: ObserverType { _forward = forward } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next: + case .next: _forward._observer.on(event) - case .Error, .Completed: + case .error, .completed: _forward._observer.on(event) - _forward.dispose() + _forward._cancel.dispose() } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift index 2c1bf40..66d4165 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift @@ -10,34 +10,34 @@ import Foundation // count version -class SkipCountSink : Sink, ObserverType { - typealias Parent = SkipCount - typealias Element = ElementType +class SkipCountSink : Sink, ObserverType { + typealias Element = O.E + typealias Parent = SkipCount let parent: Parent var remaining: Int - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { self.parent = parent self.remaining = parent.count - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): if remaining <= 0 { - forwardOn(.Next(value)) + forwardOn(.next(value)) } else { remaining -= 1 } - case .Error: + case .error: forwardOn(event) self.dispose() - case .Completed: + case .completed: forwardOn(event) self.dispose() } @@ -54,17 +54,17 @@ class SkipCount: Producer { self.count = count } - override func run(observer: O) -> Disposable { - let sink = SkipCountSink(parent: self, observer: observer) - sink.disposable = source.subscribe(sink) + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = SkipCountSink(parent: self, observer: observer, cancel: cancel) + let subscription = source.subscribe(sink) - return sink + return (sink: sink, subscription: subscription) } } // time version -class SkipTimeSink : Sink, ObserverType { +class SkipTimeSink : Sink, ObserverType where O.E == ElementType { typealias Parent = SkipTime typealias Element = ElementType @@ -73,21 +73,21 @@ class SkipTimeSink : Sink // state var open = false - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { self.parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): if open { - forwardOn(.Next(value)) + forwardOn(.next(value)) } - case .Error: + case .error: forwardOn(event) self.dispose() - case .Completed: + case .completed: forwardOn(event) self.dispose() } @@ -100,12 +100,12 @@ class SkipTimeSink : Sink func run() -> Disposable { let disposeTimer = parent.scheduler.scheduleRelative((), dueTime: self.parent.duration) { self.tick() - return NopDisposable.instance + return Disposables.create() } let disposeSubscription = parent.source.subscribe(self) - return BinaryDisposable(disposeTimer, disposeSubscription) + return Disposables.create(disposeTimer, disposeSubscription) } } @@ -120,9 +120,9 @@ class SkipTime: Producer { self.duration = duration } - override func run(observer: O) -> Disposable { - let sink = SkipTimeSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = SkipTimeSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift index 97c7680..d7c4c73 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift @@ -1,6 +1,6 @@ // // SkipUntil.swift -// Rx +// RxSwift // // Created by Yury Korolev on 10/3/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,14 +8,14 @@ import Foundation -class SkipUntilSinkOther +class SkipUntilSinkOther : ObserverType , LockOwnerType , SynchronizedOnType { - typealias Parent = SkipUntilSink + typealias Parent = SkipUntilSink typealias E = Other - private let _parent: Parent + fileprivate let _parent: Parent var _lock: NSRecursiveLock { return _parent._lock @@ -26,69 +26,69 @@ class SkipUntilSinkOther) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next: + case .next: _parent._forwardElements = true _subscription.dispose() - case .Error(let e): - _parent.forwardOn(.Error(e)) + case .error(let e): + _parent.forwardOn(.error(e)) _parent.dispose() - case .Completed: + case .completed: _subscription.dispose() } } #if TRACE_RESOURCES deinit { - AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() } #endif } -class SkipUntilSink +class SkipUntilSink : Sink , ObserverType , LockOwnerType , SynchronizedOnType { - typealias E = ElementType + typealias E = O.E typealias Parent = SkipUntil let _lock = NSRecursiveLock() - private let _parent: Parent - private var _forwardElements = false + fileprivate let _parent: Parent + fileprivate var _forwardElements = false - private let _sourceSubscription = SingleAssignmentDisposable() + fileprivate let _sourceSubscription = SingleAssignmentDisposable() - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next: + case .next: if _forwardElements { forwardOn(event) } - case .Error: + case .error: forwardOn(event) dispose() - case .Completed: + case .completed: if _forwardElements { forwardOn(event) } @@ -100,26 +100,26 @@ class SkipUntilSink: Producer { - private let _source: Observable - private let _other: Observable + fileprivate let _source: Observable + fileprivate let _other: Observable init(source: Observable, other: Observable) { _source = source _other = other } - override func run(observer: O) -> Disposable { - let sink = SkipUntilSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = SkipUntilSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift index d16304a..a6c1665 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift @@ -1,79 +1,79 @@ // // SkipWhile.swift -// Rx +// RxSwift // // Created by Yury Korolev on 10/9/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -class SkipWhileSink : Sink, ObserverType { +class SkipWhileSink : Sink, ObserverType { - typealias Parent = SkipWhile - typealias Element = ElementType + typealias Element = O.E + typealias Parent = SkipWhile - private let _parent: Parent - private var _running = false + fileprivate let _parent: Parent + fileprivate var _running = false - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): if !_running { do { _running = try !_parent._predicate(value) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() return } } if _running { - forwardOn(.Next(value)) + forwardOn(.next(value)) } - case .Error, .Completed: + case .error, .completed: forwardOn(event) dispose() } } } -class SkipWhileSinkWithIndex : Sink, ObserverType { +class SkipWhileSinkWithIndex : Sink, ObserverType { - typealias Parent = SkipWhile - typealias Element = ElementType + typealias Element = O.E + typealias Parent = SkipWhile - private let _parent: Parent - private var _index = 0 - private var _running = false + fileprivate let _parent: Parent + fileprivate var _index = 0 + fileprivate var _running = false - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): if !_running { do { _running = try !_parent._predicateWithIndex(value, _index) - try incrementChecked(&_index) + let _ = try incrementChecked(&_index) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() return } } if _running { - forwardOn(.Next(value)) + forwardOn(.next(value)) } - case .Error, .Completed: + case .error, .completed: forwardOn(event) dispose() } @@ -84,32 +84,32 @@ class SkipWhile: Producer { typealias Predicate = (Element) throws -> Bool typealias PredicateWithIndex = (Element, Int) throws -> Bool - private let _source: Observable - private let _predicate: Predicate! - private let _predicateWithIndex: PredicateWithIndex! + fileprivate let _source: Observable + fileprivate let _predicate: Predicate! + fileprivate let _predicateWithIndex: PredicateWithIndex! - init(source: Observable, predicate: Predicate) { + init(source: Observable, predicate: @escaping Predicate) { _source = source _predicate = predicate _predicateWithIndex = nil } - init(source: Observable, predicate: PredicateWithIndex) { + init(source: Observable, predicate: @escaping PredicateWithIndex) { _source = source _predicate = nil _predicateWithIndex = predicate } - override func run(observer: O) -> Disposable { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { if let _ = _predicate { - let sink = SkipWhileSink(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + let sink = SkipWhileSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } else { - let sink = SkipWhileSinkWithIndex(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + let sink = SkipWhileSinkWithIndex(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift index c60cb36..a5ac927 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift @@ -1,6 +1,6 @@ // // StartWith.swift -// RxCocoa +// RxSwift // // Created by Krunoslav Zaher on 4/6/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -18,11 +18,11 @@ class StartWith: Producer { super.init() } - override func run(observer: O) -> Disposable { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { for e in elements { - observer.on(.Next(e)) + observer.on(.next(e)) } - return source.subscribe(observer) + return (sink: Disposables.create(), subscription: source.subscribe(observer)) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift index 1f16760..b2f871c 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift @@ -8,18 +8,18 @@ import Foundation -class SubscribeOnSink : Sink, ObserverType { +class SubscribeOnSink : Sink, ObserverType where Ob.E == O.E { typealias Element = O.E typealias Parent = SubscribeOn let parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { self.parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { forwardOn(event) if event.isStopEvent { @@ -33,11 +33,13 @@ class SubscribeOnSink : S disposeEverything.disposable = cancelSchedule - cancelSchedule.disposable = parent.scheduler.schedule(()) { (_) -> Disposable in + let disposeSchedule = parent.scheduler.schedule(()) { (_) -> Disposable in let subscription = self.parent.source.subscribe(self) disposeEverything.disposable = ScheduledDisposable(scheduler: self.parent.scheduler, disposable: subscription) - return NopDisposable.instance + return Disposables.create() } + + cancelSchedule.setDisposable(disposeSchedule) return disposeEverything } @@ -52,9 +54,9 @@ class SubscribeOn : Producer { self.scheduler = scheduler } - override func run(observer: O) -> Disposable { - let sink = SubscribeOnSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Ob.E { + let sink = SubscribeOnSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift index ca31c0f..5b8e34f 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift @@ -1,6 +1,6 @@ // // Switch.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/12/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,44 +8,44 @@ import Foundation -class SwitchSink +class SwitchSink : Sink , ObserverType , LockOwnerType - , SynchronizedOnType { + , SynchronizedOnType where S.E == O.E { typealias E = SourceType - private let _subscriptions: SingleAssignmentDisposable = SingleAssignmentDisposable() - private let _innerSubscription: SerialDisposable = SerialDisposable() + fileprivate let _subscriptions: SingleAssignmentDisposable = SingleAssignmentDisposable() + fileprivate let _innerSubscription: SerialDisposable = SerialDisposable() let _lock = NSRecursiveLock() // state - private var _stopped = false - private var _latest = 0 - private var _hasLatest = false + fileprivate var _stopped = false + fileprivate var _latest = 0 + fileprivate var _hasLatest = false - override init(observer: O) { - super.init(observer: observer) + override init(observer: O, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) } - func run(source: Observable) -> Disposable { + func run(_ source: Observable) -> Disposable { let subscription = source.subscribe(self) - _subscriptions.disposable = subscription - return StableCompositeDisposable.create(_subscriptions, _innerSubscription) + _subscriptions.setDisposable(subscription) + return Disposables.create(_subscriptions, _innerSubscription) } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func performMap(element: SourceType) throws -> S { + func performMap(_ element: SourceType) throws -> S { abstractMethod() } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next(let element): + case .next(let element): do { let observable = try performMap(element).asObservable() _hasLatest = true @@ -57,38 +57,38 @@ class SwitchSink +class SwitchSinkIter : ObserverType , LockOwnerType - , SynchronizedOnType { + , SynchronizedOnType where S.E == O.E { typealias E = S.E typealias Parent = SwitchSink - private let _parent: Parent - private let _id: Int - private let _self: Disposable + fileprivate let _parent: Parent + fileprivate let _id: Int + fileprivate let _self: Disposable var _lock: NSRecursiveLock { return _parent._lock @@ -100,14 +100,14 @@ class SwitchSinkIter) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next: break - case .Error, .Completed: + case .next: break + case .error, .completed: _self.dispose() } @@ -116,12 +116,12 @@ class SwitchSinkIter : SwitchSink { - override init(observer: O) { - super.init(observer: observer) +final class SwitchIdentitySink : SwitchSink where O.E == S.E { + override init(observer: O, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) } - override func performMap(element: S) throws -> S { + override func performMap(_ element: S) throws -> S { return element } } -final class MapSwitchSink : SwitchSink { - typealias Selector = SourceType throws -> S +final class MapSwitchSink : SwitchSink where O.E == S.E { + typealias Selector = (SourceType) throws -> S - private let _selector: Selector + fileprivate let _selector: Selector - init(selector: Selector, observer: O) { + init(selector: @escaping Selector, observer: O, cancel: Cancelable) { _selector = selector - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - override func performMap(element: SourceType) throws -> S { + override func performMap(_ element: SourceType) throws -> S { return try _selector(element) } } @@ -161,33 +161,33 @@ final class MapSwitchSink : Producer { - private let _source: Observable + fileprivate let _source: Observable init(source: Observable) { _source = source } - override func run(observer: O) -> Disposable { - let sink = SwitchIdentitySink(observer: observer) - sink.disposable = sink.run(_source) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { + let sink = SwitchIdentitySink(observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) } } final class FlatMapLatest : Producer { - typealias Selector = SourceType throws -> S + typealias Selector = (SourceType) throws -> S - private let _source: Observable - private let _selector: Selector + fileprivate let _source: Observable + fileprivate let _selector: Selector - init(source: Observable, selector: Selector) { + init(source: Observable, selector: @escaping Selector) { _source = source _selector = selector } - override func run(observer: O) -> Disposable { - let sink = MapSwitchSink(selector: _selector, observer: observer) - sink.disposable = sink.run(_source) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { + let sink = MapSwitchSink(selector: _selector, observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift index 10d1b30..9ff6c78 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift @@ -10,38 +10,38 @@ import Foundation // count version -class TakeCountSink : Sink, ObserverType { - typealias Parent = TakeCount - typealias E = ElementType +class TakeCountSink : Sink, ObserverType { + typealias E = O.E + typealias Parent = TakeCount private let _parent: Parent private var _remaining: Int - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent _remaining = parent._count - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): if _remaining > 0 { _remaining -= 1 - forwardOn(.Next(value)) + forwardOn(.next(value)) if _remaining == 0 { - forwardOn(.Completed) + forwardOn(.completed) dispose() } } - case .Error: + case .error: forwardOn(event) dispose() - case .Completed: + case .completed: forwardOn(event) dispose() } @@ -50,8 +50,8 @@ class TakeCountSink : Sin } class TakeCount: Producer { - private let _source: Observable - private let _count: Int + fileprivate let _source: Observable + fileprivate let _count: Int init(source: Observable, count: Int) { if count < 0 { @@ -61,44 +61,44 @@ class TakeCount: Producer { _count = count } - override func run(observer: O) -> Disposable { - let sink = TakeCountSink(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = TakeCountSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } } // time version -class TakeTimeSink +class TakeTimeSink : Sink , LockOwnerType , ObserverType - , SynchronizedOnType { + , SynchronizedOnType where O.E == ElementType { typealias Parent = TakeTime typealias E = ElementType - private let _parent: Parent + fileprivate let _parent: Parent let _lock = NSRecursiveLock() - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next(let value): - forwardOn(.Next(value)) - case .Error: + case .next(let value): + forwardOn(.next(value)) + case .error: forwardOn(event) dispose() - case .Completed: + case .completed: forwardOn(event) dispose() } @@ -107,28 +107,28 @@ class TakeTimeSink func tick() { _lock.lock(); defer { _lock.unlock() } - forwardOn(.Completed) + forwardOn(.completed) dispose() } func run() -> Disposable { let disposeTimer = _parent._scheduler.scheduleRelative((), dueTime: _parent._duration) { self.tick() - return NopDisposable.instance + return Disposables.create() } let disposeSubscription = _parent._source.subscribe(self) - return BinaryDisposable(disposeTimer, disposeSubscription) + return Disposables.create(disposeTimer, disposeSubscription) } } class TakeTime : Producer { typealias TimeInterval = RxTimeInterval - private let _source: Observable - private let _duration: TimeInterval - private let _scheduler: SchedulerType + fileprivate let _source: Observable + fileprivate let _duration: TimeInterval + fileprivate let _scheduler: SchedulerType init(source: Observable, duration: TimeInterval, scheduler: SchedulerType) { _source = source @@ -136,9 +136,9 @@ class TakeTime : Producer { _duration = duration } - override func run(observer: O) -> Disposable { - let sink = TakeTimeSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = TakeTimeSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift index c5dd8a9..4159d09 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift @@ -1,6 +1,6 @@ // // TakeLast.swift -// Rx +// RxSwift // // Created by Tomi Koskinen on 25/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,43 +9,43 @@ import Foundation -class TakeLastSink : Sink, ObserverType { - typealias Parent = TakeLast - typealias E = ElementType +class TakeLastSink : Sink, ObserverType { + typealias E = O.E + typealias Parent = TakeLast private let _parent: Parent - private var _elements: Queue + private var _elements: Queue - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - _elements = Queue(capacity: parent._count + 1) - super.init(observer: observer) + _elements = Queue(capacity: parent._count + 1) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): _elements.enqueue(value) if _elements.count > self._parent._count { - _elements.dequeue() + let _ = _elements.dequeue() } - case .Error: + case .error: forwardOn(event) dispose() - case .Completed: + case .completed: for e in _elements { - forwardOn(.Next(e)) + forwardOn(.next(e)) } - forwardOn(.Completed) + forwardOn(.completed) dispose() } } } class TakeLast: Producer { - private let _source: Observable - private let _count: Int + fileprivate let _source: Observable + fileprivate let _count: Int init(source: Observable, count: Int) { if count < 0 { @@ -55,9 +55,9 @@ class TakeLast: Producer { _count = count } - override func run(observer: O) -> Disposable { - let sink = TakeLastSink(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = TakeLastSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift index c806e23..18bbd55 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift @@ -8,41 +8,41 @@ import Foundation -class TakeUntilSinkOther +class TakeUntilSinkOther : ObserverType , LockOwnerType , SynchronizedOnType { - typealias Parent = TakeUntilSink + typealias Parent = TakeUntilSink typealias E = Other - private let _parent: Parent + fileprivate let _parent: Parent var _lock: NSRecursiveLock { return _parent._lock } - private let _subscription = SingleAssignmentDisposable() + fileprivate let _subscription = SingleAssignmentDisposable() init(parent: Parent) { _parent = parent #if TRACE_RESOURCES - AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next: - _parent.forwardOn(.Completed) + case .next: + _parent.forwardOn(.completed) _parent.dispose() - case .Error(let e): - _parent.forwardOn(.Error(e)) + case .error(let e): + _parent.forwardOn(.error(e)) _parent.dispose() - case .Completed: + case .completed: _parent._open = true _subscription.dispose() } @@ -50,43 +50,43 @@ class TakeUntilSinkOther +class TakeUntilSink : Sink , LockOwnerType , ObserverType , SynchronizedOnType { - typealias E = ElementType + typealias E = O.E typealias Parent = TakeUntil - private let _parent: Parent + fileprivate let _parent: Parent let _lock = NSRecursiveLock() // state - private var _open = false + fileprivate var _open = false - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next: + case .next: forwardOn(event) - case .Error: + case .error: forwardOn(event) dispose() - case .Completed: + case .completed: forwardOn(event) dispose() } @@ -95,26 +95,26 @@ class TakeUntilSink Disposable { let otherObserver = TakeUntilSinkOther(parent: self) let otherSubscription = _parent._other.subscribe(otherObserver) - otherObserver._subscription.disposable = otherSubscription + otherObserver._subscription.setDisposable(otherSubscription) let sourceSubscription = _parent._source.subscribe(self) - return StableCompositeDisposable.create(sourceSubscription, otherObserver._subscription) + return Disposables.create(sourceSubscription, otherObserver._subscription) } } class TakeUntil: Producer { - private let _source: Observable - private let _other: Observable + fileprivate let _source: Observable + fileprivate let _other: Observable init(source: Observable, other: Observable) { _source = source _other = other } - override func run(observer: O) -> Disposable { - let sink = TakeUntilSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = TakeUntilSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift index 7db0752..a5a0651 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift @@ -8,24 +8,24 @@ import Foundation -class TakeWhileSink +class TakeWhileSink : Sink , ObserverType { - typealias Parent = TakeWhile - typealias Element = ElementType + typealias Element = O.E + typealias Parent = TakeWhile - private let _parent: Parent + fileprivate let _parent: Parent - private var _running = true + fileprivate var _running = true - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): if !_running { return } @@ -33,18 +33,18 @@ class TakeWhileSink do { _running = try _parent._predicate(value) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() return } if _running { - forwardOn(.Next(value)) + forwardOn(.next(value)) } else { - forwardOn(.Completed) + forwardOn(.completed) dispose() } - case .Error, .Completed: + case .error, .completed: forwardOn(event) dispose() } @@ -52,45 +52,45 @@ class TakeWhileSink } -class TakeWhileSinkWithIndex +class TakeWhileSinkWithIndex : Sink , ObserverType { - typealias Parent = TakeWhile - typealias Element = ElementType + typealias Element = O.E + typealias Parent = TakeWhile - private let _parent: Parent + fileprivate let _parent: Parent - private var _running = true - private var _index = 0 + fileprivate var _running = true + fileprivate var _index = 0 - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): if !_running { return } do { _running = try _parent._predicateWithIndex(value, _index) - try incrementChecked(&_index) + let _ = try incrementChecked(&_index) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() return } if _running { - forwardOn(.Next(value)) + forwardOn(.next(value)) } else { - forwardOn(.Completed) + forwardOn(.completed) dispose() } - case .Error, .Completed: + case .error, .completed: forwardOn(event) dispose() } @@ -102,31 +102,31 @@ class TakeWhile: Producer { typealias Predicate = (Element) throws -> Bool typealias PredicateWithIndex = (Element, Int) throws -> Bool - private let _source: Observable - private let _predicate: Predicate! - private let _predicateWithIndex: PredicateWithIndex! + fileprivate let _source: Observable + fileprivate let _predicate: Predicate! + fileprivate let _predicateWithIndex: PredicateWithIndex! - init(source: Observable, predicate: Predicate) { + init(source: Observable, predicate: @escaping Predicate) { _source = source _predicate = predicate _predicateWithIndex = nil } - init(source: Observable, predicate: PredicateWithIndex) { + init(source: Observable, predicate: @escaping PredicateWithIndex) { _source = source _predicate = nil _predicateWithIndex = predicate } - override func run(observer: O) -> Disposable { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { if let _ = _predicate { - let sink = TakeWhileSink(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + let sink = TakeWhileSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } else { - let sink = TakeWhileSinkWithIndex(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + let sink = TakeWhileSinkWithIndex(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift index b0db576..f9683fe 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift @@ -1,6 +1,6 @@ // // Throttle.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/22/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -21,84 +21,123 @@ class ThrottleSink let _lock = NSRecursiveLock() // state - private var _id = 0 as UInt64 - private var _value: Element? = nil - + private var _lastUnsentElement: Element? = nil + private var _lastSentTime: Date? = nil + private var _completed: Bool = false + let cancellable = SerialDisposable() - init(parent: ParentType, observer: O) { + init(parent: ParentType, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { let subscription = _parent._source.subscribe(self) - return StableCompositeDisposable.create(subscription, cancellable) + return Disposables.create(subscription, cancellable) } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case .Next(let element): - _id = _id &+ 1 - let currentId = _id - _value = element + case .next(let element): + let now = _parent._scheduler.now + + let timeIntervalSinceLast: RxTimeInterval + + if let lastSendingTime = _lastSentTime { + timeIntervalSinceLast = now.timeIntervalSince(lastSendingTime) + } + else { + timeIntervalSinceLast = _parent._dueTime + } + let couldSendNow = timeIntervalSinceLast >= _parent._dueTime + + if couldSendNow { + self.sendNow(element: element) + return + } + + if !_parent._latest { + return + } + + let isThereAlreadyInFlightRequest = _lastUnsentElement != nil + _lastUnsentElement = element + + if isThereAlreadyInFlightRequest { + return + } + let scheduler = _parent._scheduler let dueTime = _parent._dueTime let d = SingleAssignmentDisposable() self.cancellable.disposable = d - d.disposable = scheduler.scheduleRelative(currentId, dueTime: dueTime, action: self.propagate) - case .Error: - _value = nil + + d.setDisposable(scheduler.scheduleRelative(0, dueTime: dueTime - timeIntervalSinceLast, action: self.propagate)) + case .error: + _lastUnsentElement = nil forwardOn(event) dispose() - case .Completed: - if let value = _value { - _value = nil - forwardOn(.Next(value)) + case .completed: + if let _ = _lastUnsentElement { + _completed = true + } + else { + forwardOn(.completed) + dispose() } - forwardOn(.Completed) - dispose() } } + + private func sendNow(element: Element) { + _lastUnsentElement = nil + self.forwardOn(.next(element)) + // in case element processing takes a while, this should give some more room + _lastSentTime = _parent._scheduler.now + } - func propagate(currentId: UInt64) -> Disposable { + func propagate(_: Int) -> Disposable { _lock.lock(); defer { _lock.unlock() } // { - let originalValue = _value + if let lastUnsentElement = _lastUnsentElement { + sendNow(element: lastUnsentElement) + } - if let value = originalValue where _id == currentId { - _value = nil - forwardOn(.Next(value)) + if _completed { + forwardOn(.completed) + dispose() } // } - return NopDisposable.instance + return Disposables.create() } } class Throttle : Producer { - private let _source: Observable - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { + fileprivate let _source: Observable + fileprivate let _dueTime: RxTimeInterval + fileprivate let _latest: Bool + fileprivate let _scheduler: SchedulerType + + init(source: Observable, dueTime: RxTimeInterval, latest: Bool, scheduler: SchedulerType) { _source = source _dueTime = dueTime + _latest = latest _scheduler = scheduler } - override func run(observer: O) -> Disposable { - let sink = ThrottleSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = ThrottleSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift index db210ca..bf5d31f 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift @@ -1,6 +1,6 @@ // // Timeout.swift -// Rx +// RxSwift // // Created by Tomi Koskinen on 13/11/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,8 +8,8 @@ import Foundation -class TimeoutSink: Sink, LockOwnerType, ObserverType { - typealias E = ElementType +class TimeoutSink: Sink, LockOwnerType, ObserverType { + typealias E = O.E typealias Parent = Timeout private let _parent: Parent @@ -22,9 +22,9 @@ class TimeoutSink: Sink Disposable { @@ -33,14 +33,14 @@ class TimeoutSink: Sink) { + func on(_ event: Event) { switch event { - case .Next: + case .next: var onNextWins = false _lock.performLocked() { @@ -54,7 +54,7 @@ class TimeoutSink: Sink: Sink: Sink : Producer { - private let _source: Observable - private let _dueTime: RxTimeInterval - private let _other: Observable - private let _scheduler: SchedulerType + fileprivate let _source: Observable + fileprivate let _dueTime: RxTimeInterval + fileprivate let _other: Observable + fileprivate let _scheduler: SchedulerType init(source: Observable, dueTime: RxTimeInterval, other: Observable, scheduler: SchedulerType) { _source = source @@ -112,9 +114,9 @@ class Timeout : Producer { _scheduler = scheduler } - override func run(observer: O) -> Disposable { - let sink = TimeoutSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = TimeoutSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift index a395bad..1b55719 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift @@ -8,48 +8,49 @@ import Foundation -class TimerSink : Sink { +class TimerSink : Sink where O.E : SignedInteger { typealias Parent = Timer private let _parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { return _parent._scheduler.schedulePeriodic(0 as O.E, startAfter: _parent._dueTime, period: _parent._period!) { state in - self.forwardOn(.Next(state)) + self.forwardOn(.next(state)) return state &+ 1 } } } -class TimerOneOffSink : Sink { +class TimerOneOffSink : Sink where O.E : SignedInteger { typealias Parent = Timer private let _parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { - return _parent._scheduler.scheduleRelative((), dueTime: _parent._dueTime) { (_) -> Disposable in - self.forwardOn(.Next(0)) - self.forwardOn(.Completed) - - return NopDisposable.instance + return _parent._scheduler.scheduleRelative(self, dueTime: _parent._dueTime) { (`self`) -> Disposable in + self.forwardOn(.next(0)) + self.forwardOn(.completed) + self.dispose() + + return Disposables.create() } } } -class Timer: Producer { - private let _scheduler: SchedulerType - private let _dueTime: RxTimeInterval - private let _period: RxTimeInterval? +class Timer: Producer { + fileprivate let _scheduler: SchedulerType + fileprivate let _dueTime: RxTimeInterval + fileprivate let _period: RxTimeInterval? init(dueTime: RxTimeInterval, period: RxTimeInterval?, scheduler: SchedulerType) { _scheduler = scheduler @@ -57,16 +58,16 @@ class Timer: Producer { _period = period } - override func run(observer: O) -> Disposable { + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { if let _ = _period { - let sink = TimerSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + let sink = TimerSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } else { - let sink = TimerOneOffSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + let sink = TimerOneOffSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift index bac43db..623d6e2 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift @@ -1,6 +1,6 @@ // // ToArray.swift -// Rx +// RxSwift // // Created by Junior B. on 20/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,28 +8,28 @@ import Foundation -class ToArraySink : Sink, ObserverType { +class ToArraySink : Sink, ObserverType where O.E == [SourceType] { typealias Parent = ToArray let _parent: Parent var _list = Array() - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next(let value): + case .next(let value): self._list.append(value) - case .Error(let e): - forwardOn(.Error(e)) + case .error(let e): + forwardOn(.error(e)) self.dispose() - case .Completed: - forwardOn(.Next(_list)) - forwardOn(.Completed) + case .completed: + forwardOn(.next(_list)) + forwardOn(.completed) self.dispose() } } @@ -42,9 +42,9 @@ class ToArray : Producer<[SourceType]> { _source = source } - override func run(observer: O) -> Disposable { - let sink = ToArraySink(parent: self, observer: observer) - sink.disposable = _source.subscribe(sink) - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [SourceType] { + let sink = ToArraySink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift index 84e7633..19b6e00 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift @@ -1,6 +1,6 @@ // // Using.swift -// Rx +// RxSwift // // Created by Yury Korolev on 10/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,47 +8,46 @@ import Foundation -class UsingSink : Sink, ObserverType { - +class UsingSink : Sink, ObserverType { + typealias SourceType = O.E typealias Parent = Using - typealias E = O.E private let _parent: Parent - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { - var disposable = NopDisposable.instance + var disposable = Disposables.create() do { let resource = try _parent._resourceFactory() disposable = resource let source = try _parent._observableFactory(resource) - return StableCompositeDisposable.create( + return Disposables.create( source.subscribe(self), disposable ) } catch let error { - return StableCompositeDisposable.create( + return Disposables.create( Observable.error(error).subscribe(self), disposable ) } } - func on(event: Event) { + func on(_ event: Event) { switch event { - case let .Next(value): - forwardOn(.Next(value)) - case let .Error(error): - forwardOn(.Error(error)) + case let .next(value): + forwardOn(.next(value)) + case let .error(error): + forwardOn(.error(error)) dispose() - case .Completed: - forwardOn(.Completed) + case .completed: + forwardOn(.completed) dispose() } } @@ -59,20 +58,20 @@ class Using: Producer { typealias E = SourceType typealias ResourceFactory = () throws -> ResourceType - typealias ObservableFactory = ResourceType throws -> Observable + typealias ObservableFactory = (ResourceType) throws -> Observable - private let _resourceFactory: ResourceFactory - private let _observableFactory: ObservableFactory + fileprivate let _resourceFactory: ResourceFactory + fileprivate let _observableFactory: ObservableFactory - init(resourceFactory: ResourceFactory, observableFactory: ObservableFactory) { + init(resourceFactory: @escaping ResourceFactory, observableFactory: @escaping ObservableFactory) { _resourceFactory = resourceFactory _observableFactory = observableFactory } - override func run(observer: O) -> Disposable { - let sink = UsingSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = UsingSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift index 7001338..4ca7ac4 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift @@ -1,6 +1,6 @@ // // Window.swift -// Rx +// RxSwift // // Created by Junior B. on 29/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,11 +8,11 @@ import Foundation -class WindowTimeCountSink> +class WindowTimeCountSink : Sink , ObserverType , LockOwnerType - , SynchronizedOnType { + , SynchronizedOnType where O.E == Observable { typealias Parent = WindowTimeCount typealias E = Element @@ -28,47 +28,47 @@ class WindowTimeCountSink Disposable { - forwardOn(.Next(AddRef(source: _subject, refCount: _refCountDisposable).asObservable())) + forwardOn(.next(AddRef(source: _subject, refCount: _refCountDisposable).asObservable())) createTimer(_windowId) - _groupDisposable.addDisposable(_parent._source.subscribeSafe(self)) + let _ = _groupDisposable.insert(_parent._source.subscribeSafe(self)) return _refCountDisposable } func startNewWindowAndCompleteCurrentOne() { - _subject.on(.Completed) + _subject.on(.completed) _subject = PublishSubject() - forwardOn(.Next(AddRef(source: _subject, refCount: _refCountDisposable).asObservable())) + forwardOn(.next(AddRef(source: _subject, refCount: _refCountDisposable).asObservable())) } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { var newWindow = false var newId = 0 switch event { - case .Next(let element): - _subject.on(.Next(element)) + case .next(let element): + _subject.on(.next(element)) do { - try incrementChecked(&_count) + let _ = try incrementChecked(&_count) } catch (let e) { - _subject.on(.Error(e as ErrorType)) + _subject.on(.error(e as Swift.Error)) dispose() } @@ -80,13 +80,13 @@ class WindowTimeCountSink : Producer> { - private let _timeSpan: RxTimeInterval - private let _count: Int - private let _scheduler: SchedulerType - private let _source: Observable + fileprivate let _timeSpan: RxTimeInterval + fileprivate let _count: Int + fileprivate let _scheduler: SchedulerType + fileprivate let _source: Observable init(source: Observable, timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) { _source = source @@ -144,9 +146,9 @@ class WindowTimeCount : Producer> { _scheduler = scheduler } - override func run>(observer: O) -> Disposable { - let sink = WindowTimeCountSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Observable { + let sink = WindowTimeCountSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift index 0ac25f7..c10bf69 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift @@ -1,6 +1,6 @@ // // WithLatestFrom.swift -// RxExample +// RxSwift // // Created by Yury Korolev on 10/19/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,68 +8,69 @@ import Foundation -class WithLatestFromSink +class WithLatestFromSink : Sink , ObserverType , LockOwnerType , SynchronizedOnType { - + typealias ResultType = O.E typealias Parent = WithLatestFrom typealias E = FirstType - private let _parent: Parent + fileprivate let _parent: Parent var _lock = NSRecursiveLock() - private var _latest: SecondType? + fileprivate var _latest: SecondType? - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func run() -> Disposable { let sndSubscription = SingleAssignmentDisposable() let sndO = WithLatestFromSecond(parent: self, disposable: sndSubscription) - sndSubscription.disposable = _parent._second.subscribe(sndO) + sndSubscription.setDisposable(_parent._second.subscribe(sndO)) let fstSubscription = _parent._first.subscribe(self) - - return StableCompositeDisposable.create(fstSubscription, sndSubscription) + + return Disposables.create(fstSubscription, sndSubscription) } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case let .Next(value): + case let .next(value): guard let latest = _latest else { return } do { let res = try _parent._resultSelector(value, latest) - forwardOn(.Next(res)) + forwardOn(.next(res)) } catch let e { - forwardOn(.Error(e)) + forwardOn(.error(e)) dispose() } - case .Completed: - forwardOn(.Completed) + case .completed: + forwardOn(.completed) dispose() - case let .Error(error): - forwardOn(.Error(error)) + case let .error(error): + forwardOn(.error(error)) dispose() } } } -class WithLatestFromSecond +class WithLatestFromSecond : ObserverType , LockOwnerType , SynchronizedOnType { - typealias Parent = WithLatestFromSink + typealias ResultType = O.E + typealias Parent = WithLatestFromSink typealias E = SecondType private let _parent: Parent @@ -84,18 +85,18 @@ class WithLatestFromSecond) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { switch event { - case let .Next(value): + case let .next(value): _parent._latest = value - case .Completed: + case .completed: _disposable.dispose() - case let .Error(error): - _parent.forwardOn(.Error(error)) + case let .error(error): + _parent.forwardOn(.error(error)) _parent.dispose() } } @@ -104,19 +105,19 @@ class WithLatestFromSecond: Producer { typealias ResultSelector = (FirstType, SecondType) throws -> ResultType - private let _first: Observable - private let _second: Observable - private let _resultSelector: ResultSelector + fileprivate let _first: Observable + fileprivate let _second: Observable + fileprivate let _resultSelector: ResultSelector - init(first: Observable, second: Observable, resultSelector: ResultSelector) { + init(first: Observable, second: Observable, resultSelector: @escaping ResultSelector) { _first = first _second = second _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = WithLatestFromSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { + let sink = WithLatestFromSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+CollectionType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+Collection.swift similarity index 64% rename from RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+CollectionType.swift rename to RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+Collection.swift index 20d10de..60474fd 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+CollectionType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+Collection.swift @@ -1,6 +1,6 @@ // -// Zip+CollectionType.swift -// Rx +// Zip+Collection.swift +// RxSwift // // Created by Krunoslav Zaher on 8/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,10 +8,11 @@ import Foundation -class ZipCollectionTypeSink - : Sink { +class ZipCollectionTypeSink + : Sink where C.Iterator.Element : ObservableConvertibleType { + typealias R = O.E typealias Parent = ZipCollectionType - typealias SourceElement = C.Generator.Element.E + typealias SourceElement = C.Iterator.Element.E private let _parent: Parent @@ -24,10 +25,10 @@ class ZipCollectionTypeSink](count: parent.count, repeatedValue: Queue(capacity: 4)) - _isDone = [Bool](count: parent.count, repeatedValue: false) + _values = [Queue](repeating: Queue(capacity: 4), count: parent.count) + _isDone = [Bool](repeating: false, count: parent.count) _subscriptions = Array() _subscriptions.reserveCapacity(parent.count) @@ -35,13 +36,13 @@ class ZipCollectionTypeSink, atIndex: Int) { + func on(_ event: Event, atIndex: Int) { _lock.lock(); defer { _lock.unlock() } // { switch event { - case .Next(let element): + case .next(let element): _values[atIndex].enqueue(element) if _values[atIndex].count == 1 { @@ -51,7 +52,7 @@ class ZipCollectionTypeSink Disposable { var j = 0 - for i in _parent.sources.startIndex ..< _parent.sources.endIndex { + for i in _parent.sources { let index = j - let source = _parent.sources[i].asObservable() - _subscriptions[j].disposable = source.subscribe(AnyObserver { event in + let source = i.asObservable() + + let disposable = source.subscribe(AnyObserver { event in self.on(event, atIndex: index) }) + _subscriptions[j].setDisposable(disposable) j += 1 } - return CompositeDisposable(disposables: _subscriptions.map { $0 }) + return Disposables.create(_subscriptions) } } -class ZipCollectionType : Producer { - typealias ResultSelector = [C.Generator.Element.E] throws -> R +class ZipCollectionType : Producer where C.Iterator.Element : ObservableConvertibleType { + typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R let sources: C let resultSelector: ResultSelector let count: Int - init(sources: C, resultSelector: ResultSelector) { + init(sources: C, resultSelector: @escaping ResultSelector) { self.sources = sources self.resultSelector = resultSelector self.count = Int(self.sources.count.toIntMax()) } - override func run(observer: O) -> Disposable { - let sink = ZipCollectionTypeSink(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = ZipCollectionTypeSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift index 36679bf..b74464f 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift @@ -22,9 +22,8 @@ extension Observable { - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func zip - (source1: O1, _ source2: O2, resultSelector: (O1.E, O2.E) throws -> E) + (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) -> Observable { return Zip2( source1: source1.asObservable(), source2: source2.asObservable(), @@ -42,12 +41,12 @@ class ZipSink2_ : ZipSink { var _values1: Queue = Queue(capacity: 2) var _values2: Queue = Queue(capacity: 2) - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 2, observer: observer) + super.init(arity: 2, observer: observer, cancel: cancel) } - override func hasElements(index: Int) -> Bool { + override func hasElements(_ index: Int) -> Bool { switch (index) { case 0: return _values1.count > 0 case 1: return _values2.count > 0 @@ -66,10 +65,10 @@ class ZipSink2_ : ZipSink { let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - subscription1.disposable = _parent.source1.subscribe(observer1) - subscription2.disposable = _parent.source2.subscribe(observer2) + subscription1.setDisposable(_parent.source1.subscribe(observer1)) + subscription2.setDisposable(_parent.source2.subscribe(observer2)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2 ]) @@ -88,17 +87,17 @@ class Zip2 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, resultSelector: @escaping ResultSelector) { self.source1 = source1 self.source2 = source2 _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = ZipSink2_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = ZipSink2_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -115,9 +114,8 @@ extension Observable { - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func zip - (source1: O1, _ source2: O2, _ source3: O3, resultSelector: (O1.E, O2.E, O3.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) -> Observable { return Zip3( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), @@ -136,12 +134,12 @@ class ZipSink3_ : ZipSink { var _values2: Queue = Queue(capacity: 2) var _values3: Queue = Queue(capacity: 2) - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 3, observer: observer) + super.init(arity: 3, observer: observer, cancel: cancel) } - override func hasElements(index: Int) -> Bool { + override func hasElements(_ index: Int) -> Bool { switch (index) { case 0: return _values1.count > 0 case 1: return _values2.count > 0 @@ -163,11 +161,11 @@ class ZipSink3_ : ZipSink { let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - subscription1.disposable = _parent.source1.subscribe(observer1) - subscription2.disposable = _parent.source2.subscribe(observer2) - subscription3.disposable = _parent.source3.subscribe(observer3) + subscription1.setDisposable(_parent.source1.subscribe(observer1)) + subscription2.setDisposable(_parent.source2.subscribe(observer2)) + subscription3.setDisposable(_parent.source3.subscribe(observer3)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3 @@ -188,7 +186,7 @@ class Zip3 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, resultSelector: @escaping ResultSelector) { self.source1 = source1 self.source2 = source2 self.source3 = source3 @@ -196,10 +194,10 @@ class Zip3 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = ZipSink3_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = ZipSink3_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -216,9 +214,8 @@ extension Observable { - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func zip - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: (O1.E, O2.E, O3.E, O4.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) -> Observable { return Zip4( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), @@ -238,12 +235,12 @@ class ZipSink4_ : ZipSink { var _values3: Queue = Queue(capacity: 2) var _values4: Queue = Queue(capacity: 2) - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 4, observer: observer) + super.init(arity: 4, observer: observer, cancel: cancel) } - override func hasElements(index: Int) -> Bool { + override func hasElements(_ index: Int) -> Bool { switch (index) { case 0: return _values1.count > 0 case 1: return _values2.count > 0 @@ -268,12 +265,12 @@ class ZipSink4_ : ZipSink { let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - subscription1.disposable = _parent.source1.subscribe(observer1) - subscription2.disposable = _parent.source2.subscribe(observer2) - subscription3.disposable = _parent.source3.subscribe(observer3) - subscription4.disposable = _parent.source4.subscribe(observer4) + subscription1.setDisposable(_parent.source1.subscribe(observer1)) + subscription2.setDisposable(_parent.source2.subscribe(observer2)) + subscription3.setDisposable(_parent.source3.subscribe(observer3)) + subscription4.setDisposable(_parent.source4.subscribe(observer4)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3, @@ -296,7 +293,7 @@ class Zip4 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: @escaping ResultSelector) { self.source1 = source1 self.source2 = source2 self.source3 = source3 @@ -305,10 +302,10 @@ class Zip4 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = ZipSink4_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = ZipSink4_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -325,9 +322,8 @@ extension Observable { - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func zip - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) -> Observable { return Zip5( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), @@ -348,12 +344,12 @@ class ZipSink5_ : ZipSink { var _values4: Queue = Queue(capacity: 2) var _values5: Queue = Queue(capacity: 2) - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 5, observer: observer) + super.init(arity: 5, observer: observer, cancel: cancel) } - override func hasElements(index: Int) -> Bool { + override func hasElements(_ index: Int) -> Bool { switch (index) { case 0: return _values1.count > 0 case 1: return _values2.count > 0 @@ -381,13 +377,13 @@ class ZipSink5_ : ZipSink { let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) let observer5 = ZipObserver(lock: _lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - subscription1.disposable = _parent.source1.subscribe(observer1) - subscription2.disposable = _parent.source2.subscribe(observer2) - subscription3.disposable = _parent.source3.subscribe(observer3) - subscription4.disposable = _parent.source4.subscribe(observer4) - subscription5.disposable = _parent.source5.subscribe(observer5) + subscription1.setDisposable(_parent.source1.subscribe(observer1)) + subscription2.setDisposable(_parent.source2.subscribe(observer2)) + subscription3.setDisposable(_parent.source3.subscribe(observer3)) + subscription4.setDisposable(_parent.source4.subscribe(observer4)) + subscription5.setDisposable(_parent.source5.subscribe(observer5)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3, @@ -412,7 +408,7 @@ class Zip5 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: @escaping ResultSelector) { self.source1 = source1 self.source2 = source2 self.source3 = source3 @@ -422,10 +418,10 @@ class Zip5 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = ZipSink5_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = ZipSink5_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -442,9 +438,8 @@ extension Observable { - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func zip - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) -> Observable { return Zip6( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), @@ -466,12 +461,12 @@ class ZipSink6_ : ZipSink { var _values5: Queue = Queue(capacity: 2) var _values6: Queue = Queue(capacity: 2) - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 6, observer: observer) + super.init(arity: 6, observer: observer, cancel: cancel) } - override func hasElements(index: Int) -> Bool { + override func hasElements(_ index: Int) -> Bool { switch (index) { case 0: return _values1.count > 0 case 1: return _values2.count > 0 @@ -502,14 +497,14 @@ class ZipSink6_ : ZipSink { let observer5 = ZipObserver(lock: _lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) let observer6 = ZipObserver(lock: _lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - subscription1.disposable = _parent.source1.subscribe(observer1) - subscription2.disposable = _parent.source2.subscribe(observer2) - subscription3.disposable = _parent.source3.subscribe(observer3) - subscription4.disposable = _parent.source4.subscribe(observer4) - subscription5.disposable = _parent.source5.subscribe(observer5) - subscription6.disposable = _parent.source6.subscribe(observer6) + subscription1.setDisposable(_parent.source1.subscribe(observer1)) + subscription2.setDisposable(_parent.source2.subscribe(observer2)) + subscription3.setDisposable(_parent.source3.subscribe(observer3)) + subscription4.setDisposable(_parent.source4.subscribe(observer4)) + subscription5.setDisposable(_parent.source5.subscribe(observer5)) + subscription6.setDisposable(_parent.source6.subscribe(observer6)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3, @@ -536,7 +531,7 @@ class Zip6 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, resultSelector: @escaping ResultSelector) { self.source1 = source1 self.source2 = source2 self.source3 = source3 @@ -547,10 +542,10 @@ class Zip6 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = ZipSink6_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = ZipSink6_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -567,9 +562,8 @@ extension Observable { - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func zip - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) -> Observable { return Zip7( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), @@ -592,12 +586,12 @@ class ZipSink7_ : ZipSink { var _values6: Queue = Queue(capacity: 2) var _values7: Queue = Queue(capacity: 2) - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 7, observer: observer) + super.init(arity: 7, observer: observer, cancel: cancel) } - override func hasElements(index: Int) -> Bool { + override func hasElements(_ index: Int) -> Bool { switch (index) { case 0: return _values1.count > 0 case 1: return _values2.count > 0 @@ -631,15 +625,15 @@ class ZipSink7_ : ZipSink { let observer6 = ZipObserver(lock: _lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) let observer7 = ZipObserver(lock: _lock, parent: self, index: 6, setNextValue: { self._values7.enqueue($0) }, this: subscription7) - subscription1.disposable = _parent.source1.subscribe(observer1) - subscription2.disposable = _parent.source2.subscribe(observer2) - subscription3.disposable = _parent.source3.subscribe(observer3) - subscription4.disposable = _parent.source4.subscribe(observer4) - subscription5.disposable = _parent.source5.subscribe(observer5) - subscription6.disposable = _parent.source6.subscribe(observer6) - subscription7.disposable = _parent.source7.subscribe(observer7) + subscription1.setDisposable(_parent.source1.subscribe(observer1)) + subscription2.setDisposable(_parent.source2.subscribe(observer2)) + subscription3.setDisposable(_parent.source3.subscribe(observer3)) + subscription4.setDisposable(_parent.source4.subscribe(observer4)) + subscription5.setDisposable(_parent.source5.subscribe(observer5)) + subscription6.setDisposable(_parent.source6.subscribe(observer6)) + subscription7.setDisposable(_parent.source7.subscribe(observer7)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3, @@ -668,7 +662,7 @@ class Zip7 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, resultSelector: @escaping ResultSelector) { self.source1 = source1 self.source2 = source2 self.source3 = source3 @@ -680,10 +674,10 @@ class Zip7 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = ZipSink7_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = ZipSink7_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } @@ -700,9 +694,8 @@ extension Observable { - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func zip - (source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) -> Observable { return Zip8( source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), @@ -726,12 +719,12 @@ class ZipSink8_ : ZipSink { var _values7: Queue = Queue(capacity: 2) var _values8: Queue = Queue(capacity: 2) - init(parent: Parent, observer: O) { + init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - super.init(arity: 8, observer: observer) + super.init(arity: 8, observer: observer, cancel: cancel) } - override func hasElements(index: Int) -> Bool { + override func hasElements(_ index: Int) -> Bool { switch (index) { case 0: return _values1.count > 0 case 1: return _values2.count > 0 @@ -768,16 +761,16 @@ class ZipSink8_ : ZipSink { let observer7 = ZipObserver(lock: _lock, parent: self, index: 6, setNextValue: { self._values7.enqueue($0) }, this: subscription7) let observer8 = ZipObserver(lock: _lock, parent: self, index: 7, setNextValue: { self._values8.enqueue($0) }, this: subscription8) - subscription1.disposable = _parent.source1.subscribe(observer1) - subscription2.disposable = _parent.source2.subscribe(observer2) - subscription3.disposable = _parent.source3.subscribe(observer3) - subscription4.disposable = _parent.source4.subscribe(observer4) - subscription5.disposable = _parent.source5.subscribe(observer5) - subscription6.disposable = _parent.source6.subscribe(observer6) - subscription7.disposable = _parent.source7.subscribe(observer7) - subscription8.disposable = _parent.source8.subscribe(observer8) + subscription1.setDisposable(_parent.source1.subscribe(observer1)) + subscription2.setDisposable(_parent.source2.subscribe(observer2)) + subscription3.setDisposable(_parent.source3.subscribe(observer3)) + subscription4.setDisposable(_parent.source4.subscribe(observer4)) + subscription5.setDisposable(_parent.source5.subscribe(observer5)) + subscription6.setDisposable(_parent.source6.subscribe(observer6)) + subscription7.setDisposable(_parent.source7.subscribe(observer7)) + subscription8.setDisposable(_parent.source8.subscribe(observer8)) - return CompositeDisposable(disposables: [ + return Disposables.create([ subscription1, subscription2, subscription3, @@ -808,7 +801,7 @@ class Zip8 : Producer { let _resultSelector: ResultSelector - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, source8: Observable, resultSelector: ResultSelector) { + init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, source8: Observable, resultSelector: @escaping ResultSelector) { self.source1 = source1 self.source2 = source2 self.source3 = source3 @@ -821,10 +814,11 @@ class Zip8 : Producer { _resultSelector = resultSelector } - override func run(observer: O) -> Disposable { - let sink = ZipSink8_(parent: self, observer: observer) - sink.disposable = sink.run() - return sink + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = ZipSink8_(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) } } + diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift index 4590236..0cd273c 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift @@ -10,9 +10,9 @@ import Foundation protocol ZipSinkProtocol : class { - func next(index: Int) - func fail(error: ErrorType) - func done(index: Int) + func next(_ index: Int) + func fail(_ error: Swift.Error) + func done(_ index: Int) } class ZipSink : Sink, ZipSinkProtocol { @@ -25,22 +25,22 @@ class ZipSink : Sink, ZipSinkProtocol { // state private var _isDone: [Bool] - init(arity: Int, observer: O) { - _isDone = [Bool](count: arity, repeatedValue: false) + init(arity: Int, observer: O, cancel: Cancelable) { + _isDone = [Bool](repeating: false, count: arity) _arity = arity - super.init(observer: observer) + super.init(observer: observer, cancel: cancel) } func getResult() throws -> Element { abstractMethod() } - func hasElements(index: Int) -> Bool { + func hasElements(_ index: Int) -> Bool { abstractMethod() } - func next(index: Int) { + func next(_ index: Int) { var hasValueAll = true for i in 0 ..< _arity { @@ -53,10 +53,10 @@ class ZipSink : Sink, ZipSinkProtocol { if hasValueAll { do { let result = try getResult() - self.forwardOn(.Next(result)) + self.forwardOn(.next(result)) } catch let e { - self.forwardOn(.Error(e)) + self.forwardOn(.error(e)) dispose() } } @@ -72,18 +72,18 @@ class ZipSink : Sink, ZipSinkProtocol { } if allOthersDone { - forwardOn(.Completed) + forwardOn(.completed) self.dispose() } } } - func fail(error: ErrorType) { - forwardOn(.Error(error)) + func fail(_ error: Swift.Error) { + forwardOn(.error(error)) dispose() } - func done(index: Int) { + func done(_ index: Int) { _isDone[index] = true var allDone = true @@ -96,7 +96,7 @@ class ZipSink : Sink, ZipSinkProtocol { } if allDone { - forwardOn(.Completed) + forwardOn(.completed) dispose() } } @@ -118,7 +118,7 @@ class ZipObserver private let _this: Disposable private let _setNextValue: ValueSetter - init(lock: NSRecursiveLock, parent: ZipSinkProtocol, index: Int, setNextValue: ValueSetter, this: Disposable) { + init(lock: NSRecursiveLock, parent: ZipSinkProtocol, index: Int, setNextValue: @escaping ValueSetter, this: Disposable) { _lock = lock _parent = parent _index = index @@ -126,30 +126,30 @@ class ZipObserver _setNextValue = setNextValue } - func on(event: Event) { + func on(_ event: Event) { synchronizedOn(event) } - func _synchronized_on(event: Event) { + func _synchronized_on(_ event: Event) { if let _ = _parent { switch event { - case .Next(_): + case .next(_): break - case .Error(_): + case .error(_): _this.dispose() - case .Completed: + case .completed: _this.dispose() } } if let parent = _parent { switch event { - case .Next(let value): + case .next(let value): _setNextValue(value) parent.next(_index) - case .Error(let error): + case .error(let error): parent.fail(error) - case .Completed: + case .completed: parent.done(_index) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift index 0acdce6..8e7a29d 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift @@ -1,6 +1,6 @@ // // Observable+Aggregate.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/22/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -24,8 +24,7 @@ extension ObservableType { - parameter mapResult: A function to transform the final accumulator value into the result value. - returns: An observable sequence containing a single element with the final accumulator value. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func reduce(seed: A, accumulator: (A, E) throws -> A, mapResult: (A) throws -> R) + public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A, mapResult: @escaping (A) throws -> R) -> Observable { return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: mapResult) } @@ -41,8 +40,7 @@ extension ObservableType { - parameter accumulator: A accumulator function to be invoked on each element. - returns: An observable sequence containing a single element with the final accumulator value. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func reduce
(seed: A, accumulator: (A, E) throws -> A) + public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A) -> Observable { return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: { $0 }) } @@ -56,7 +54,6 @@ extension ObservableType { - returns: An observable sequence containing all the emitted elements as array. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func toArray() -> Observable<[E]> { return ToArray(source: self.asObservable()) diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift index ee941b1..dd4a75e 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift @@ -1,6 +1,6 @@ // // Observable+Binding.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/1/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -24,9 +24,8 @@ extension ObservableType { - parameter subject: Subject to push source elements into. - returns: A connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func multicast(subject: S) - -> ConnectableObservable { + public func multicast(_ subject: S) + -> ConnectableObservable where S.SubjectObserverType.E == E { return ConnectableObservableAdapter(source: self.asObservable(), subject: subject) } @@ -43,9 +42,8 @@ extension ObservableType { - parameter selector: Selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func multicast(subjectSelector: () throws -> S, selector: (Observable) throws -> Observable) - -> Observable { + public func multicast(_ subjectSelector: @escaping () throws -> S, selector: @escaping (Observable) throws -> Observable) + -> Observable where S.SubjectObserverType.E == E { return Multicast( source: self.asObservable(), subjectSelector: subjectSelector, @@ -67,7 +65,6 @@ extension ObservableType { - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func publish() -> ConnectableObservable { return self.multicast(PublishSubject()) } @@ -87,8 +84,7 @@ extension ObservableType { - parameter bufferSize: Maximum element count of the replay buffer. - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func replay(bufferSize: Int) + public func replay(_ bufferSize: Int) -> ConnectableObservable { return self.multicast(ReplaySubject.create(bufferSize: bufferSize)) } @@ -102,7 +98,6 @@ extension ObservableType { - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func replayAll() -> ConnectableObservable { return self.multicast(ReplaySubject.createUnbounded()) @@ -120,7 +115,6 @@ extension ConnectableObservableType { - returns: An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func refCount() -> Observable { return RefCount(source: self) } @@ -139,7 +133,6 @@ extension ObservableType { - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func share() -> Observable { return self.publish().refCount() } @@ -159,8 +152,7 @@ extension ObservableType { - parameter bufferSize: Maximum element count of the replay buffer. - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func shareReplay(bufferSize: Int) + public func shareReplay(_ bufferSize: Int) -> Observable { if bufferSize == 1 { return ShareReplay1(source: self.asObservable()) @@ -182,9 +174,8 @@ extension ObservableType { - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func shareReplayLatestWhileConnected() -> Observable { return ShareReplay1WhileConnected(source: self.asObservable()) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift index 8af9111..ce66ae9 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift @@ -1,6 +1,6 @@ // // Observable+Concurrency.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -23,8 +23,7 @@ extension ObservableType { - parameter scheduler: Scheduler to notify observers on. - returns: The source sequence whose observations happen on the specified scheduler. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func observeOn(scheduler: ImmediateSchedulerType) + public func observeOn(_ scheduler: ImmediateSchedulerType) -> Observable { if let scheduler = scheduler as? SerialDispatchQueueScheduler { return ObserveOnSerialDispatchQueue(source: self.asObservable(), scheduler: scheduler) @@ -54,9 +53,8 @@ extension ObservableType { - parameter scheduler: Scheduler to perform subscription and unsubscription actions on. - returns: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func subscribeOn(scheduler: ImmediateSchedulerType) + public func subscribeOn(_ scheduler: ImmediateSchedulerType) -> Observable { return SubscribeOn(source: self, scheduler: scheduler) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift index ff57d38..2f3987b 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift @@ -1,6 +1,6 @@ // // Observable+Creation.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -19,8 +19,7 @@ extension Observable { - parameter subscribe: Implementation of the resulting observable sequence's `subscribe` method. - returns: The observable sequence with the specified implementation for the `subscribe` method. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func create(subscribe: (AnyObserver) -> Disposable) -> Observable { + public static func create(_ subscribe: @escaping (AnyObserver) -> Disposable) -> Observable { return AnonymousObservable(subscribe) } @@ -33,7 +32,6 @@ extension Observable { - returns: An observable sequence with no elements. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func empty() -> Observable { return Empty() } @@ -47,7 +45,6 @@ extension Observable { - returns: An observable sequence whose observers will never get called. */ - @warn_unused_result(message="http://git.io/rxs.uo") public static func never() -> Observable { return Never() } @@ -62,22 +59,20 @@ extension Observable { - parameter element: Single element in the resulting observable sequence. - returns: An observable sequence containing the single specified element. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func just(element: E) -> Observable { + public static func just(_ element: E) -> Observable { return Just(element: element) } /** - Returns an observable sequence that contains a single element. + Returns an observable sequence that contains a single element. - - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) + - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) - - parameter element: Single element in the resulting observable sequence. - - parameter: Scheduler to send the single element on. - - returns: An observable sequence containing the single specified element. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func just(element: E, scheduler: ImmediateSchedulerType) -> Observable { + - parameter element: Single element in the resulting observable sequence. + - parameter: Scheduler to send the single element on. + - returns: An observable sequence containing the single specified element. + */ + public static func just(_ element: E, scheduler: ImmediateSchedulerType) -> Observable { return JustScheduled(element: element, scheduler: scheduler) } @@ -90,8 +85,7 @@ extension Observable { - returns: The observable sequence that terminates with specified error. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func error(error: ErrorType) -> Observable { + public static func error(_ error: Swift.Error) -> Observable { return Error(error: error) } @@ -106,9 +100,8 @@ extension Observable { - parameter scheduler: Scheduler to send elements on. If `nil`, elements are sent immediatelly on subscription. - returns: The observable sequence whose elements are pulled from the given arguments. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func of(elements: E ..., scheduler: ImmediateSchedulerType? = nil) -> Observable { - return Sequence(elements: elements, scheduler: scheduler) + public static func of(_ elements: E ..., scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { + return ObservableSequence(elements: elements, scheduler: scheduler) } // MARK: defer @@ -121,8 +114,7 @@ extension Observable { - parameter observableFactory: Observable factory function to invoke for each observer that subscribes to the resulting sequence. - returns: An observable sequence whose observers trigger an invocation of the given observable factory function. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func deferred(observableFactory: () throws -> Observable) + public static func deferred(_ observableFactory: @escaping () throws -> Observable) -> Observable { return Deferred(observableFactory: observableFactory) } @@ -139,8 +131,7 @@ extension Observable { - parameter scheduler: Scheduler on which to run the generator loop. - returns: The generated sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func generate(initialState initialState: E, condition: E throws -> Bool, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance, iterate: E throws -> E) -> Observable { + public static func generate(initialState: E, condition: @escaping (E) throws -> Bool, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance, iterate: @escaping (E) throws -> E) -> Observable { return Generate(initialState: initialState, condition: condition, iterate: iterate, resultSelector: { $0 }, scheduler: scheduler) } @@ -153,8 +144,7 @@ extension Observable { - parameter scheduler: Scheduler to run the producer loop on. - returns: An observable sequence that repeats the given element infinitely. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func repeatElement(element: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { + public static func repeatElement(_ element: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { return RepeatElement(element: element, scheduler: scheduler) } @@ -167,13 +157,12 @@ extension Observable { - parameter observableFactory: Factory function to obtain an observable sequence that depends on the obtained resource. - returns: An observable sequence whose lifetime controls the lifetime of the dependent resource object. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func using(resourceFactory: () throws -> R, observableFactory: R throws -> Observable) -> Observable { + public static func using(_ resourceFactory: @escaping () throws -> R, observableFactory: @escaping (R) throws -> Observable) -> Observable { return Using(resourceFactory: resourceFactory, observableFactory: observableFactory) } } -extension Observable where Element : SignedIntegerType { +extension Observable where Element : SignedInteger { /** Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to generate and send out observer messages. @@ -184,36 +173,56 @@ extension Observable where Element : SignedIntegerType { - parameter scheduler: Scheduler to run the generator loop on. - returns: An observable sequence that contains a range of sequential integral numbers. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func range(start start: E, count: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { + public static func range(start: E, count: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { return RangeProducer(start: start, count: count, scheduler: scheduler) } } -extension SequenceType { +extension Observable { /** - Converts a sequence to an observable sequence. + Converts an array to an observable sequence. - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func toObservable(scheduler: ImmediateSchedulerType? = nil) -> Observable { - return Sequence(elements: Array(self), scheduler: scheduler) + - returns: The observable sequence whose elements are pulled from the given enumerable sequence. + */ + public static func from(_ array: [E], scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { + return ObservableSequence(elements: array, scheduler: scheduler) } -} -extension Array { /** - Converts a sequence to an observable sequence. + Converts a sequence to an observable sequence. - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func toObservable(scheduler: ImmediateSchedulerType? = nil) -> Observable { - return Sequence(elements: self, scheduler: scheduler) + - returns: The observable sequence whose elements are pulled from the given enumerable sequence. + */ + public static func from(_ sequence: S, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable where S.Iterator.Element == E { + return ObservableSequence(elements: sequence, scheduler: scheduler) + } + + /** + Converts a optional to an observable sequence. + + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + + - parameter optional: Optional element in the resulting observable sequence. + - returns: An observable sequence containing the wrapped value or not from given optional. + */ + public static func from(_ optional: E?) -> Observable { + return ObservableOptional(optional: optional) } -} \ No newline at end of file + + /** + Converts a optional to an observable sequence. + + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + + - parameter optional: Optional element in the resulting observable sequence. + - parameter: Scheduler to send the optional element on. + - returns: An observable sequence containing the wrapped value or not from given optional. + */ + public static func from(_ optional: E?, scheduler: ImmediateSchedulerType) -> Observable { + return ObservableOptionalScheduled(optional: optional, scheduler: scheduler) + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift index 2aa355c..e0f1c71 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift @@ -18,11 +18,11 @@ extension ObservableType { - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - parameter identifier: Identifier that is printed together with event description to standard output. + - parameter trimOutput: Should output be trimmed to max 40 characters. - returns: An observable sequence whose events are printed to standard output. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func debug(identifier: String? = nil, file: String = #file, line: UInt = #line, function: String = #function) + public func debug(_ identifier: String? = nil, trimOutput: Bool = false, file: String = #file, line: UInt = #line, function: String = #function) -> Observable { - return Debug(source: self.asObservable(), identifier: identifier, file: file, line: line, function: function) + return Debug(source: self, identifier: identifier, trimOutput: trimOutput, file: file, line: line, function: function) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift index 072ee40..c679683 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift @@ -1,6 +1,6 @@ // // Observable+Multiple.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/12/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -10,37 +10,35 @@ import Foundation // MARK: combineLatest -extension CollectionType where Generator.Element : ObservableType { - +extension Observable { /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. + Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func combineLatest(resultSelector: [Generator.Element.E] throws -> R) -> Observable { - return CombineLatestCollectionType(sources: self, resultSelector: resultSelector) + - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - parameter resultSelector: Function to invoke whenever any of the sources produces an element. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func combineLatest(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> Element) -> Observable + where C.Iterator.Element: ObservableType { + return CombineLatestCollectionType(sources: collection, resultSelector: resultSelector) } } // MARK: zip -extension CollectionType where Generator.Element : ObservableType { - +extension Observable { /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. + Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func zip(resultSelector: [Generator.Element.E] throws -> R) -> Observable { - return ZipCollectionType(sources: self, resultSelector: resultSelector) + - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) + + - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. + - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + public static func zip(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> Element) -> Observable + where C.Iterator.Element: ObservableType { + return ZipCollectionType(sources: collection, resultSelector: resultSelector) } } @@ -59,7 +57,6 @@ extension ObservableType where E : ObservableConvertibleType { - returns: The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func switchLatest() -> Observable { return Switch(source: asObservable()) } @@ -77,54 +74,46 @@ extension ObservableType { - parameter second: Second observable sequence. - returns: An observable sequence that contains the elements of `self`, followed by those of the second sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func concat(second: O) -> Observable { - return [asObservable(), second.asObservable()].concat() + public func concat(_ second: O) -> Observable where O.E == E { + return Observable.concat([self.asObservable(), second.asObservable()]) } } -extension SequenceType where Generator.Element : ObservableType { - +extension Observable { /** - Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() + Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) + This operator has tail recursive optimizations that will prevent stack overflow. - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func concat() - -> Observable { - return Concat(sources: self, count: nil) + Optimizations will be performed in cases equivalent to following: + + [1, [2, [3, .....].concat()].concat].concat() + + - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) + + - returns: An observable sequence that contains the elements of each given sequence, in sequential order. + */ + public static func concat(_ sequence: S) -> Observable + where S.Iterator.Element == Observable { + return Concat(sources: sequence, count: nil) } -} -extension CollectionType where Generator.Element : ObservableType { - /** - Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. + Concatenates all observable sequences in the given collection, as long as the previous observable sequence terminated successfully. - This operator has tail recursive optimizations that will prevent stack overflow and enable generating - infinite observable sequences while using limited amount of memory during generation. + This operator has tail recursive optimizations that will prevent stack overflow. - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() + Optimizations will be performed in cases equivalent to following: - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func concat() - -> Observable { - return Concat(sources: self, count: self.count.toIntMax()) + [1, [2, [3, .....].concat()].concat].concat() + + - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) + + - returns: An observable sequence that contains the elements of each given sequence, in sequential order. + */ + public static func concat(_ collection: S) -> Observable + where S.Iterator.Element == Observable { + return Concat(sources: collection, count: collection.count.toIntMax()) } } @@ -137,7 +126,6 @@ extension ObservableType where E : ObservableConvertibleType { - returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func concat() -> Observable { return merge(maxConcurrent: 1) } @@ -154,7 +142,6 @@ extension ObservableType where E : ObservableConvertibleType { - returns: The observable sequence that merges the elements of the observable sequences. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func merge() -> Observable { return Merge(source: asObservable()) } @@ -167,8 +154,7 @@ extension ObservableType where E : ObservableConvertibleType { - parameter maxConcurrent: Maximum number of inner observable sequences being subscribed to concurrently. - returns: The observable sequence that merges the elements of the inner sequences. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func merge(maxConcurrent maxConcurrent: Int) + public func merge(maxConcurrent: Int) -> Observable { return MergeLimited(source: asObservable(), maxConcurrent: maxConcurrent) } @@ -186,8 +172,7 @@ extension ObservableType { - parameter handler: Error handler function, producing another observable sequence. - returns: An observable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting observable sequence in case an error occurred. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func catchError(handler: (ErrorType) throws -> Observable) + public func catchError(_ handler: @escaping (Swift.Error) throws -> Observable) -> Observable { return Catch(source: asObservable(), handler: handler) } @@ -200,26 +185,24 @@ extension ObservableType { - parameter element: Last element in an observable sequence in case error occurs. - returns: An observable sequence containing the source sequence's elements, followed by the `element` in case an error occurred. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func catchErrorJustReturn(element: E) + public func catchErrorJustReturn(_ element: E) -> Observable { return Catch(source: asObservable(), handler: { _ in Observable.just(element) }) } } -extension SequenceType where Generator.Element : ObservableType { +extension Observable { /** - Continues an observable sequence that is terminated by an error with the next observable sequence. + Continues an observable sequence that is terminated by an error with the next observable sequence. - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - returns: An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func catchError() - -> Observable { - return CatchSequence(sources: self) + - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) + + - returns: An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. + */ + public static func catchError(_ sequence: S) -> Observable + where S.Iterator.Element == Observable { + return CatchSequence(sources: sequence) } } @@ -235,8 +218,7 @@ extension ObservableType { - parameter other: Observable sequence that terminates propagation of elements of the source sequence. - returns: An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func takeUntil(other: O) + public func takeUntil(_ other: O) -> Observable { return TakeUntil(source: asObservable(), other: other.asObservable()) } @@ -254,8 +236,7 @@ extension ObservableType { - parameter other: Observable sequence that starts propagation of elements of the source sequence. - returns: An observable sequence containing the elements of the source sequence that are emitted after the other sequence emits an item. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func skipUntil(other: O) + public func skipUntil(_ other: O) -> Observable { return SkipUntil(source: asObservable(), other: other.asObservable()) } @@ -273,27 +254,24 @@ extension ObservableType { - parameter right: Second observable sequence. - returns: An observable sequence that surfaces either of the given sequences, whichever reacted first. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func amb - (right: O2) - -> Observable { + public func amb + (_ right: O2) + -> Observable where O2.E == E { return Amb(left: asObservable(), right: right.asObservable()) } } -extension SequenceType where Generator.Element : ObservableType { - +extension Observable { /** - Propagates the observable sequence that reacts first. + Propagates the observable sequence that reacts first. - - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) - - - returns: An observable sequence that surfaces any of the given sequences, whichever reacted first. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func amb() - -> Observable { - return self.reduce(Observable.never()) { a, o in + - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) + + - returns: An observable sequence that surfaces any of the given sequences, whichever reacted first. + */ + public static func amb(_ sequence: S) -> Observable + where S.Iterator.Element == Observable { + return sequence.reduce(Observable.never()) { a, o in return a.amb(o.asObservable()) } } @@ -312,7 +290,7 @@ extension ObservableType { - parameter resultSelector: Function to invoke for each element from the self combined with the latest element from the second source, if any. - returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function. */ - public func withLatestFrom(second: SecondO, resultSelector: (E, SecondO.E) throws -> ResultType) -> Observable { + public func withLatestFrom(_ second: SecondO, resultSelector: @escaping (E, SecondO.E) throws -> ResultType) -> Observable { return WithLatestFrom(first: asObservable(), second: second.asObservable(), resultSelector: resultSelector) } @@ -324,7 +302,7 @@ extension ObservableType { - parameter second: Second observable source. - returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function. */ - public func withLatestFrom(second: SecondO) -> Observable { + public func withLatestFrom(_ second: SecondO) -> Observable { return WithLatestFrom(first: asObservable(), second: second.asObservable(), resultSelector: { $1 }) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift index 969f641..d0e38bb 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift @@ -1,6 +1,6 @@ // // Observable+Single.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/14/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -19,7 +19,6 @@ extension ObservableType where E: Equatable { - returns: An observable sequence only containing the distinct contiguous elements, based on equality operator, from the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func distinctUntilChanged() -> Observable { return self.distinctUntilChanged({ $0 }, comparer: { ($0 == $1) }) @@ -35,8 +34,7 @@ extension ObservableType { - parameter keySelector: A function to compute the comparison key for each element. - returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func distinctUntilChanged(keySelector: (E) throws -> K) + public func distinctUntilChanged(_ keySelector: @escaping (E) throws -> K) -> Observable { return self.distinctUntilChanged(keySelector, comparer: { $0 == $1 }) } @@ -49,8 +47,7 @@ extension ObservableType { - parameter comparer: Equality comparer for computed key values. - returns: An observable sequence only containing the distinct contiguous elements, based on `comparer`, from the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func distinctUntilChanged(comparer: (lhs: E, rhs: E) throws -> Bool) + public func distinctUntilChanged(_ comparer: @escaping (E, E) throws -> Bool) -> Observable { return self.distinctUntilChanged({ $0 }, comparer: comparer) } @@ -64,8 +61,7 @@ extension ObservableType { - parameter comparer: Equality comparer for computed key values. - returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value and the comparer, from the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func distinctUntilChanged(keySelector: (E) throws -> K, comparer: (lhs: K, rhs: K) throws -> Bool) + public func distinctUntilChanged(_ keySelector: @escaping (E) throws -> K, comparer: @escaping (K, K) throws -> Bool) -> Observable { return DistinctUntilChanged(source: self.asObservable(), selector: keySelector, comparer: comparer) } @@ -74,80 +70,30 @@ extension ObservableType { // MARK: doOn extension ObservableType { - /** - Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - parameter eventHandler: Action to invoke for each event in the observable sequence. - - returns: The source sequence with the side-effecting behavior applied. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func doOn(eventHandler: (Event) throws -> Void) - -> Observable { - return Do(source: self.asObservable(), eventHandler: eventHandler) - } - - /** - Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - returns: The source sequence with the side-effecting behavior applied. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func doOn(onNext onNext: (E throws -> Void)? = nil, onError: (ErrorType throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil) - -> Observable { - return Do(source: self.asObservable()) { e in - switch e { - case .Next(let element): - try onNext?(element) - case .Error(let e): - try onError?(e) - case .Completed: - try onCompleted?() - } - } - } + Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - /** - Invokes an action for each Next event in the observable sequence, and propagates all observer messages through the result sequence. + - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - parameter onNext: Action to invoke for each element in the observable sequence. - - returns: The source sequence with the side-effecting behavior applied. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func doOnNext(onNext: (E throws -> Void)) - -> Observable { - return self.doOn(onNext: onNext) - } - - /** - Invokes an action for the Error event in the observable sequence, and propagates all observer messages through the result sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - returns: The source sequence with the side-effecting behavior applied. - */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func doOnError(onError: (ErrorType throws -> Void)) - -> Observable { - return self.doOn(onError: onError) - } - - /** - Invokes an action for the Completed event in the observable sequence, and propagates all observer messages through the result sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - returns: The source sequence with the side-effecting behavior applied. + - parameter onSubscribe: Action to invoke before subscribing to source observable sequence. + - parameter onDispose: Action to invoke after subscription to source observable has been disposed for any reason. It can be either because sequence terminates for some reason or observer subscription being disposed. + - returns: The source sequence with the side-effecting behavior applied. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func doOnCompleted(onCompleted: (() throws -> Void)) + public func `do`(onNext: ((E) throws -> Void)? = nil, onError: ((Swift.Error) throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil, onSubscribe: (() -> ())? = nil, onDispose: (() -> ())? = nil) -> Observable { - return self.doOn(onCompleted: onCompleted) + return Do(source: self.asObservable(), eventHandler: { e in + switch e { + case .next(let element): + try onNext?(element) + case .error(let e): + try onError?(e) + case .completed: + try onCompleted?() + } + }, onSubscribe: onSubscribe, onDispose: onDispose) } } @@ -163,8 +109,7 @@ extension ObservableType { - parameter elements: Elements to prepend to the specified sequence. - returns: The source sequence prepended with the specified values. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func startWith(elements: E ...) + public func startWith(_ elements: E ...) -> Observable { return StartWith(source: self.asObservable(), elements: elements) } @@ -183,7 +128,6 @@ extension ObservableType { - returns: Observable sequence to repeat until it successfully terminates. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func retry() -> Observable { return CatchSequence(sources: InfiniteSequence(repeatedValue: self.asObservable())) } @@ -198,10 +142,9 @@ extension ObservableType { - parameter maxAttemptCount: Maximum number of times to repeat the sequence. - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func retry(maxAttemptCount: Int) + public func retry(_ maxAttemptCount: Int) -> Observable { - return CatchSequence(sources: Repeat(count: maxAttemptCount, repeatedValue: self.asObservable())) + return CatchSequence(sources: repeatElement(self.asObservable(), count: maxAttemptCount)) } /** @@ -213,8 +156,7 @@ extension ObservableType { - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func retryWhen(notificationHandler: Observable -> TriggerObservable) + public func retryWhen(_ notificationHandler: @escaping (Observable) -> TriggerObservable) -> Observable { return RetryWhenSequence(sources: InfiniteSequence(repeatedValue: self.asObservable()), notificationHandler: notificationHandler) } @@ -228,8 +170,7 @@ extension ObservableType { - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func retryWhen(notificationHandler: Observable -> TriggerObservable) + public func retryWhen(_ notificationHandler: @escaping (Observable) -> TriggerObservable) -> Observable { return RetryWhenSequence(sources: InfiniteSequence(repeatedValue: self.asObservable()), notificationHandler: notificationHandler) } @@ -250,9 +191,8 @@ extension ObservableType { - parameter accumulator: An accumulator function to be invoked on each element. - returns: An observable sequence containing the accumulated values. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func scan(seed: A, accumulator: (A, E) throws -> A) + public func scan(_ seed: A, accumulator: @escaping (A, E) throws -> A) -> Observable { return Scan(source: self.asObservable(), seed: seed, accumulator: accumulator) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift index 2fa425a..4dd53f8 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift @@ -1,6 +1,6 @@ // // Observable+StandardSequenceOperators.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/17/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -20,8 +20,7 @@ extension ObservableType { - parameter predicate: A function to test each source element for a condition. - returns: An observable sequence that contains elements from the input sequence that satisfy the condition. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func filter(predicate: (E) throws -> Bool) + public func filter(_ predicate: @escaping (E) throws -> Bool) -> Observable { return Filter(source: asObservable(), predicate: predicate) } @@ -39,8 +38,7 @@ extension ObservableType { - parameter predicate: A function to test each element for a condition. - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func takeWhile(predicate: (E) throws -> Bool) + public func takeWhile(_ predicate: @escaping (E) throws -> Bool) -> Observable { return TakeWhile(source: asObservable(), predicate: predicate) } @@ -55,8 +53,7 @@ extension ObservableType { - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func takeWhileWithIndex(predicate: (E, Int) throws -> Bool) + public func takeWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) -> Observable { return TakeWhile(source: asObservable(), predicate: predicate) } @@ -74,8 +71,7 @@ extension ObservableType { - parameter count: The number of elements to return. - returns: An observable sequence that contains the specified number of elements from the start of the input sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func take(count: Int) + public func take(_ count: Int) -> Observable { if count == 0 { return Observable.empty() @@ -100,8 +96,7 @@ extension ObservableType { - parameter count: Number of elements to take from the end of the source sequence. - returns: An observable sequence containing the specified number of elements from the end of the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func takeLast(count: Int) + public func takeLast(_ count: Int) -> Observable { return TakeLast(source: asObservable(), count: count) } @@ -120,8 +115,7 @@ extension ObservableType { - parameter count: The number of elements to skip before returning the remaining elements. - returns: An observable sequence that contains the elements that occur after the specified index in the input sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func skip(count: Int) + public func skip(_ count: Int) -> Observable { return SkipCount(source: asObservable(), count: count) } @@ -139,8 +133,7 @@ extension ObservableType { - parameter predicate: A function to test each element for a condition. - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func skipWhile(predicate: (E) throws -> Bool) -> Observable { + public func skipWhile(_ predicate: @escaping (E) throws -> Bool) -> Observable { return SkipWhile(source: asObservable(), predicate: predicate) } @@ -153,8 +146,7 @@ extension ObservableType { - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func skipWhileWithIndex(predicate: (E, Int) throws -> Bool) -> Observable { + public func skipWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) -> Observable { return SkipWhile(source: asObservable(), predicate: predicate) } } @@ -168,14 +160,13 @@ extension ObservableType { - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) - - parameter selector: A transform function to apply to each source element. + - parameter transform: A transform function to apply to each source element. - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func map(selector: E throws -> R) + public func map(_ transform: @escaping (E) throws -> R) -> Observable { - return self.asObservable().composeMap(selector) + return self.asObservable().composeMap(transform) } /** @@ -186,8 +177,7 @@ extension ObservableType { - parameter selector: A transform function to apply to each source element; the second parameter of the function represents the index of the source element. - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func mapWithIndex(selector: (E, Int) throws -> R) + public func mapWithIndex(_ selector: @escaping (E, Int) throws -> R) -> Observable { return MapWithIndex(source: asObservable(), selector: selector) } @@ -205,8 +195,7 @@ extension ObservableType { - parameter selector: A transform function to apply to each element. - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func flatMap(selector: (E) throws -> O) + public func flatMap(_ selector: @escaping (E) throws -> O) -> Observable { return FlatMap(source: asObservable(), selector: selector) } @@ -219,8 +208,7 @@ extension ObservableType { - parameter selector: A transform function to apply to each element; the second parameter of the function represents the index of the source element. - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func flatMapWithIndex(selector: (E, Int) throws -> O) + public func flatMapWithIndex(_ selector: @escaping (E, Int) throws -> O) -> Observable { return FlatMapWithIndex(source: asObservable(), selector: selector) } @@ -239,8 +227,7 @@ extension ObservableType { - parameter selector: A transform function to apply to element that was observed while no observable is executing in parallel. - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence that was received while no other sequence was being calculated. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func flatMapFirst(selector: (E) throws -> O) + public func flatMapFirst(_ selector: @escaping (E) throws -> O) -> Observable { return FlatMapFirst(source: asObservable(), selector: selector) } @@ -261,8 +248,7 @@ extension ObservableType { - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func flatMapLatest(selector: (E) throws -> O) + public func flatMapLatest(_ selector: @escaping (E) throws -> O) -> Observable { return FlatMapLatest(source: asObservable(), selector: selector) } @@ -280,8 +266,7 @@ extension ObservableType { - parameter index: The index of the required item (starting from 0). - returns: An observable sequence that emits the desired item as its own sole emission. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func elementAt(index: Int) + public func elementAt(_ index: Int) -> Observable { return ElementAt(source: asObservable(), index: index, throwOnEmpty: true) } @@ -299,7 +284,6 @@ extension ObservableType { - returns: An observable sequence that emits a single item or throws an exception if more (or none) of them are emitted. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func single() -> Observable { return SingleAsync(source: asObservable()) @@ -314,10 +298,9 @@ extension ObservableType { - parameter predicate: A function to test each source element for a condition. - returns: An observable sequence that emits a single item or throws an exception if more (or none) of them are emitted. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func single(predicate: (E) throws -> Bool) + public func single(_ predicate: @escaping (E) throws -> Bool) -> Observable { return SingleAsync(source: asObservable(), predicate: predicate) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift index 9050ce5..b4b86c7 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift @@ -1,6 +1,6 @@ // // Observable+Time.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/22/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -12,37 +12,34 @@ import Foundation extension ObservableType { /** - Ignores elements from an observable sequence which are followed by another element within a specified relative time duration, using the specified scheduler to run throttling timers. - - `throttle` and `debounce` are synonyms. - + Returns an Observable that emits the first and the latest item emitted by the source Observable during sequential time windows of a specified duration. + + This operator makes sure that no two elements are emitted in less then dueTime. + - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) - parameter dueTime: Throttling duration for each element. + - parameter latest: Should latest element received in a dueTime wide time window since last element emission be emitted. - parameter scheduler: Scheduler to run the throttle timers and send events on. - returns: The throttled sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func throttle(dueTime: RxTimeInterval, scheduler: SchedulerType) + public func throttle(_ dueTime: RxTimeInterval, latest: Bool = true, scheduler: SchedulerType) -> Observable { - return Throttle(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) + return Throttle(source: self.asObservable(), dueTime: dueTime, latest: latest, scheduler: scheduler) } /** Ignores elements from an observable sequence which are followed by another element within a specified relative time duration, using the specified scheduler to run throttling timers. - `throttle` and `debounce` are synonyms. - - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) - parameter dueTime: Throttling duration for each element. - parameter scheduler: Scheduler to run the throttle timers and send events on. - returns: The throttled sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func debounce(dueTime: RxTimeInterval, scheduler: SchedulerType) + public func debounce(_ dueTime: RxTimeInterval, scheduler: SchedulerType) -> Observable { - return Throttle(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) + return Debounce(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) } } @@ -51,7 +48,7 @@ extension ObservableType { extension ObservableType { /** - Samples the source observable sequence using a samper observable sequence producing sampling ticks. + Samples the source observable sequence using a sampler observable sequence producing sampling ticks. Upon each sampling tick, the latest element (if any) in the source sequence during the last sampling interval is sent to the resulting sequence. @@ -62,14 +59,13 @@ extension ObservableType { - parameter sampler: Sampling tick sequence. - returns: Sampled observable sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func sample(sampler: O) + public func sample(_ sampler: O) -> Observable { - return Sample(source: self.asObservable(), sampler: sampler.asObservable(), onlyNew: true) + return Sample(source: self.asObservable(), sampler: sampler.asObservable()) } } -extension Observable where Element : SignedIntegerType { +extension Observable where Element : SignedInteger { /** Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages. @@ -79,8 +75,7 @@ extension Observable where Element : SignedIntegerType { - parameter scheduler: Scheduler to run the timer on. - returns: An observable sequence that produces a value after each period. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func interval(period: RxTimeInterval, scheduler: SchedulerType) + public static func interval(_ period: RxTimeInterval, scheduler: SchedulerType) -> Observable { return Timer(dueTime: period, period: period, @@ -91,7 +86,7 @@ extension Observable where Element : SignedIntegerType { // MARK: timer -extension Observable where Element: SignedIntegerType { +extension Observable where Element: SignedInteger { /** Returns an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the specified scheduler to run timers. @@ -102,8 +97,7 @@ extension Observable where Element: SignedIntegerType { - parameter scheduler: Scheduler to run timers on. - returns: An observable sequence that produces a value after due time has elapsed and then each period. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public static func timer(dueTime: RxTimeInterval, period: RxTimeInterval? = nil, scheduler: SchedulerType) + public static func timer(_ dueTime: RxTimeInterval, period: RxTimeInterval? = nil, scheduler: SchedulerType) -> Observable { return Timer( dueTime: dueTime, @@ -126,8 +120,7 @@ extension ObservableType { - parameter scheduler: Scheduler to run the timer on. - returns: An observable sequence with the elements taken during the specified duration from the start of the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func take(duration: RxTimeInterval, scheduler: SchedulerType) + public func take(_ duration: RxTimeInterval, scheduler: SchedulerType) -> Observable { return TakeTime(source: self.asObservable(), duration: duration, scheduler: scheduler) } @@ -146,8 +139,7 @@ extension ObservableType { - parameter scheduler: Scheduler to run the timer on. - returns: An observable sequence with the elements skipped during the specified duration from the start of the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func skip(duration: RxTimeInterval, scheduler: SchedulerType) + public func skip(_ duration: RxTimeInterval, scheduler: SchedulerType) -> Observable { return SkipTime(source: self.asObservable(), duration: duration, scheduler: scheduler) } @@ -164,7 +156,6 @@ extension ObservableType { - returns: An observable sequence that skips all elements of the source sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") public func ignoreElements() -> Observable { return filter { _ -> Bool in @@ -186,8 +177,7 @@ extension ObservableType { - parameter scheduler: Scheduler to run the subscription delay timer on. - returns: Time-shifted sequence. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func delaySubscription(dueTime: RxTimeInterval, scheduler: SchedulerType) + public func delaySubscription(_ dueTime: RxTimeInterval, scheduler: SchedulerType) -> Observable { return DelaySubscription(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) } @@ -209,8 +199,7 @@ extension ObservableType { - parameter scheduler: Scheduler to run buffering timers on. - returns: An observable sequence of buffers. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func buffer(timeSpan timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) + public func buffer(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) -> Observable<[E]> { return BufferTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) } @@ -230,8 +219,7 @@ extension ObservableType { - parameter scheduler: Scheduler to run windowing timers on. - returns: An observable sequence of windows (instances of `Observable`). */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func window(timeSpan timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) + public func window(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) -> Observable> { return WindowTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) } @@ -250,10 +238,9 @@ extension ObservableType { - parameter scheduler: Scheduler to run the timeout timer on. - returns: An observable sequence with a TimeoutError in case of a timeout. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func timeout(dueTime: RxTimeInterval, scheduler: SchedulerType) + public func timeout(_ dueTime: RxTimeInterval, scheduler: SchedulerType) -> Observable { - return Timeout(source: self.asObservable(), dueTime: dueTime, other: Observable.error(RxError.Timeout), scheduler: scheduler) + return Timeout(source: self.asObservable(), dueTime: dueTime, other: Observable.error(RxError.timeout), scheduler: scheduler) } /** @@ -266,9 +253,27 @@ extension ObservableType { - parameter scheduler: Scheduler to run the timeout timer on. - returns: The source sequence switching to the other sequence in case of a timeout. */ - @warn_unused_result(message="http://git.io/rxs.uo") - public func timeout(dueTime: RxTimeInterval, other: O, scheduler: SchedulerType) - -> Observable { + public func timeout(_ dueTime: RxTimeInterval, other: O, scheduler: SchedulerType) + -> Observable where E == O.E { return Timeout(source: self.asObservable(), dueTime: dueTime, other: other.asObservable(), scheduler: scheduler) } } + +// MARK: delay + +extension ObservableType { + + /** + Returns an observable sequence by the source observable sequence shifted forward in time by a specified delay. Error events from the source observable sequence are not delayed. + + - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) + + - parameter dueTime: Relative time shift of the source by. + - parameter scheduler: Scheduler to run the subscription delay timer on. + - returns: the source Observable shifted in time by the specified delay. + */ + public func delay(_ dueTime: RxTimeInterval, scheduler: SchedulerType) + -> Observable { + return Delay(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/ObserverType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/ObserverType.swift index 396d167..3447e5e 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/ObserverType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/ObserverType.swift @@ -1,6 +1,6 @@ // // ObserverType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,49 +8,35 @@ import Foundation -/** -Supports push-style iteration over an observable sequence. -*/ +/// Supports push-style iteration over an observable sequence. public protocol ObserverType { - /** - The type of elements in sequence that observer can observe. - */ + /// The type of elements in sequence that observer can observe. associatedtype E - /** - Notify observer about sequence event. - - - parameter event: Event that occured. - */ - func on(event: Event) + /// Notify observer about sequence event. + /// + /// - parameter event: Event that occured. + func on(_ event: Event) } -/** -Convenience API extensions to provide alternate next, error, completed events -*/ -public extension ObserverType { - - /** - Convenience method equivalent to `on(.Next(element: E))` +/// Convenience API extensions to provide alternate next, error, completed events +extension ObserverType { - - parameter element: Next element to send to observer(s) - */ - final func onNext(element: E) { - on(.Next(element)) + /// Convenience method equivalent to `on(.next(element: E))` + /// + /// - parameter element: Next element to send to observer(s) + public final func onNext(_ element: E) { + on(.next(element)) } - /** - Convenience method equivalent to `on(.Completed)` - */ - final func onCompleted() { - on(.Completed) + /// Convenience method equivalent to `on(.completed)` + public final func onCompleted() { + on(.completed) } - /** - Convenience method equivalent to `on(.Error(error: ErrorType))` - - parameter error: ErrorType to send to observer(s) - */ - final func onError(error: ErrorType) { - on(.Error(error)) + /// Convenience method equivalent to `on(.error(Swift.Error))` + /// - parameter error: Swift.Error to send to observer(s) + public final func onError(_ error: Swift.Error) { + on(.error(error)) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift index 6090fef..4abc816 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift @@ -1,6 +1,6 @@ // // AnonymousObserver.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -11,24 +11,24 @@ import Foundation class AnonymousObserver : ObserverBase { typealias Element = ElementType - typealias EventHandler = Event -> Void + typealias EventHandler = (Event) -> Void private let _eventHandler : EventHandler - init(_ eventHandler: EventHandler) { + init(_ eventHandler: @escaping EventHandler) { #if TRACE_RESOURCES - AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif _eventHandler = eventHandler } - override func onCore(event: Event) { + override func onCore(_ event: Event) { return _eventHandler(event) } #if TRACE_RESOURCES deinit { - AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() } #endif } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift index 0795952..7a6ebe6 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift @@ -1,6 +1,6 @@ // // ObserverBase.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -13,13 +13,13 @@ class ObserverBase : Disposable, ObserverType { private var _isStopped: AtomicInt = 0 - func on(event: Event) { + func on(_ event: Event) { switch event { - case .Next: + case .next: if _isStopped == 0 { onCore(event) } - case .Error, .Completed: + case .error, .completed: if !AtomicCompareAndSwap(0, 1, &_isStopped) { return @@ -29,11 +29,11 @@ class ObserverBase : Disposable, ObserverType { } } - func onCore(event: Event) { + func onCore(_ event: Event) { abstractMethod() } func dispose() { - _isStopped = 1 + _ = AtomicCompareAndSwap(0, 1, &_isStopped) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift index f8f800e..2f9464d 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift @@ -1,6 +1,6 @@ // // TailRecursiveSink.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,8 +9,8 @@ import Foundation enum TailRecursiveSinkCommand { - case MoveNext - case Dispose + case moveNext + case dispose } #if DEBUG || TRACE_RESOURCES @@ -18,52 +18,52 @@ enum TailRecursiveSinkCommand { #endif /// This class is usually used with `Generator` version of the operators. -class TailRecursiveSink +class TailRecursiveSink : Sink - , InvocableWithValueType { + , InvocableWithValueType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { typealias Value = TailRecursiveSinkCommand typealias E = O.E - typealias SequenceGenerator = (generator: S.Generator, remaining: IntMax?) + typealias SequenceGenerator = (generator: S.Iterator, remaining: IntMax?) var _generators: [SequenceGenerator] = [] - var _disposed = false + var _isDisposed = false var _subscription = SerialDisposable() // this is thread safe object var _gate = AsyncLock>>() - override init(observer: O) { - super.init(observer: observer) + override init(observer: O, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) } - func run(sources: SequenceGenerator) -> Disposable { + func run(_ sources: SequenceGenerator) -> Disposable { _generators.append(sources) - schedule(.MoveNext) + schedule(.moveNext) return _subscription } - func invoke(command: TailRecursiveSinkCommand) { + func invoke(_ command: TailRecursiveSinkCommand) { switch command { - case .Dispose: + case .dispose: disposeCommand() - case .MoveNext: + case .moveNext: moveNextCommand() } } // simple implementation for now - func schedule(command: TailRecursiveSinkCommand) { + func schedule(_ command: TailRecursiveSinkCommand) { _gate.invoke(InvocableScheduledItem(invocable: self, state: command)) } func done() { - forwardOn(.Completed) + forwardOn(.completed) dispose() } - func extract(observable: Observable) -> SequenceGenerator? { + func extract(_ observable: Observable) -> SequenceGenerator? { abstractMethod() } @@ -73,17 +73,17 @@ class TailRecursiveSink? = nil repeat { - if _generators.count == 0 { + guard let (g, left) = _generators.last else { break } - - if _disposed { + + if _isDisposed { return } - var (e, left) = _generators.last! - _generators.removeLast() + + var e = g guard let nextCandidate = e.next()?.asObservable() else { continue @@ -129,16 +129,16 @@ class TailRecursiveSink) -> Disposable { + func subscribeToNext(_ source: Observable) -> Disposable { abstractMethod() } func disposeCommand() { - _disposed = true - _generators.removeAll(keepCapacity: false) + _isDisposed = true + _generators.removeAll(keepingCapacity: false) } override func dispose() { @@ -146,7 +146,7 @@ class TailRecursiveSink(value: T?, forKey key: protocol) { - let currentThread = NSThread.currentThread() - let threadDictionary = currentThread.threadDictionary - - if let newValue = value { - threadDictionary.setObject(newValue, forKey: key) - } - else { - threadDictionary.removeObjectForKey(key) - } - - } - static func getThreadLocalStorageValueForKey(key: protocol) -> T? { - let currentThread = NSThread.currentThread() - let threadDictionary = currentThread.threadDictionary - - return threadDictionary[key] as? T - } - } - -#endif diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Platform/Platform.Linux.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Platform/Platform.Linux.swift deleted file mode 100644 index f5b9368..0000000 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Platform/Platform.Linux.swift +++ /dev/null @@ -1,222 +0,0 @@ -// -// Platform.Linux.swift -// Rx -// -// Created by Krunoslav Zaher on 12/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if os(Linux) - //////////////////////////////////////////////////////////////////////////////// - // This is not the greatest API in the world, this is just a tribute. - // !!! Proof of concept until libdispatch becomes operational. !!! - //////////////////////////////////////////////////////////////////////////////// - - import Foundation - import XCTest - import Glibc - import SwiftShims - - // MARK: CoreFoundation run loop mock - - public typealias CFRunLoopRef = Int - public let kCFRunLoopDefaultMode = "CFRunLoopDefaultMode" - - typealias Action = () -> () - - var queue = Queue(capacity: 100) - - var runLoopCounter = 0 - - extension NSThread { - public var isMainThread: Bool { - return true - } - } - - public func CFRunLoopWakeUp(runLoop: CFRunLoopRef) { - } - - public func CFRunLoopStop(runLoop: CFRunLoopRef) { - runLoopCounter -= 1 - } - - public func CFRunLoopPerformBlock(runLoop: CFRunLoopRef, _ mode: String, _ action: () -> ()) { - queue.enqueue(action) - } - - public func CFRunLoopRun() { - runLoopCounter += 1 - let currentValueOfCounter = runLoopCounter - while let front = queue.dequeue() { - front() - if runLoopCounter < currentValueOfCounter - 1 { - fatalError("called stop twice") - } - - if runLoopCounter == currentValueOfCounter - 1 { - break - } - } - } - - public func CFRunLoopGetCurrent() -> CFRunLoopRef { - return 0 - } - - // MARK: Atomic, just something that works for single thread case - - #if TRACE_RESOURCES - public typealias AtomicInt = Int64 - #else - typealias AtomicInt = Int64 - #endif - - func AtomicIncrement(increment: UnsafeMutablePointer) -> AtomicInt { - increment.memory = increment.memory + 1 - return increment.memory - } - - func AtomicDecrement(increment: UnsafeMutablePointer) -> AtomicInt { - increment.memory = increment.memory - 1 - return increment.memory - } - - func AtomicCompareAndSwap(l: AtomicInt, _ r: AtomicInt, _ target: UnsafeMutablePointer) -> Bool { - //return __sync_val_compare_and_swap(target, l, r) - if target.memory == l { - target.memory = r - return true - } - - return false - } - - extension NSThread { - static func setThreadLocalStorageValue(value: T?, forKey key: String) { - let currentThread = NSThread.currentThread() - var threadDictionary = currentThread.threadDictionary - - if let newValue = value { - threadDictionary[key] = newValue - } - else { - threadDictionary[key] = nil - } - - currentThread.threadDictionary = threadDictionary - } - - static func getThreadLocalStorageValueForKey(key: String) -> T? { - let currentThread = NSThread.currentThread() - let threadDictionary = currentThread.threadDictionary - - return threadDictionary[key] as? T - } - } - - // - - // MARK: objc mock - - public func objc_sync_enter(lock: AnyObject) { - } - - public func objc_sync_exit(lock: AnyObject) { - - } - - - // MARK: libdispatch - - public typealias dispatch_time_t = Int - public typealias dispatch_source_t = Int - public typealias dispatch_source_type_t = Int - public typealias dispatch_queue_t = Int - public typealias dispatch_object_t = Int - public typealias dispatch_block_t = () -> () - public typealias dispatch_queue_attr_t = Int - public typealias qos_class_t = Int - - public let DISPATCH_QUEUE_SERIAL = 0 - - public let DISPATCH_QUEUE_PRIORITY_HIGH = 1 - public let DISPATCH_QUEUE_PRIORITY_DEFAULT = 2 - public let DISPATCH_QUEUE_PRIORITY_LOW = 3 - - public let QOS_CLASS_USER_INTERACTIVE = 0 - public let QOS_CLASS_USER_INITIATED = 1 - public let QOS_CLASS_DEFAULT = 2 - public let QOS_CLASS_UTILITY = 3 - public let QOS_CLASS_BACKGROUND = 4 - - public let DISPATCH_SOURCE_TYPE_TIMER = 0 - public let DISPATCH_TIME_FOREVER = 1 as UInt64 - public let NSEC_PER_SEC = 1 - - public let DISPATCH_TIME_NOW = -1 - - public func dispatch_time(when: dispatch_time_t, _ delta: Int64) -> dispatch_time_t { - return when + Int(delta) - } - - public func dispatch_queue_create(label: UnsafePointer, _ attr: dispatch_queue_attr_t!) -> dispatch_queue_t! { - return 0 - } - - public func dispatch_set_target_queue(object: dispatch_object_t!, _ queue: dispatch_queue_t!) { - } - - public func dispatch_async(queue2: dispatch_queue_t, _ block: dispatch_block_t) { - queue.enqueue(block) - } - - public func dispatch_source_create(type: dispatch_source_type_t, _ handle: UInt, _ mask: UInt, _ queue: dispatch_queue_t!) -> dispatch_source_t! { - return 0 - } - - public func dispatch_source_set_timer(source: dispatch_source_t, _ start: dispatch_time_t, _ interval: UInt64, _ leeway: UInt64) { - - } - - public func dispatch_source_set_event_handler(source: dispatch_source_t, _ handler: dispatch_block_t!) { - queue.enqueue(handler) - } - - public func dispatch_resume(object: dispatch_object_t) { - } - - public func dispatch_source_cancel(source: dispatch_source_t) { - } - - public func dispatch_get_global_queue(identifier: Int, _ flags: UInt) -> dispatch_queue_t! { - return 0 - } - - public func dispatch_get_main_queue() -> dispatch_queue_t! { - return 0 - } - - // MARK: XCTest - - public class Expectation { - public func fulfill() { - } - } - - extension XCTestCase { - public func setUp() { - } - - public func tearDown() { - } - - public func expectationWithDescription(description: String) -> Expectation { - return Expectation() - } - - public func waitForExpectationsWithTimeout(time: NSTimeInterval, action: ErrorType? -> Void) { - } - } - -#endif diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Reactive.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Reactive.swift new file mode 100644 index 0000000..57ecab7 --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Reactive.swift @@ -0,0 +1,74 @@ +// +// Reactive.swift +// RxSwift +// +// Created by Yury Korolev on 5/2/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +/** + Use `Reactive` proxy as customization point for constrained protocol extensions. + + General pattern would be: + + // 1. Extend Reactive protocol with constrain on Base + // Read as: Reactive Extension where Base is a SomeType + extension Reactive where Base: SomeType { + // 2. Put any specific reactive extension for SomeType here + } + + With this approach we can have more specialized methods and properties using + `Base` and not just specialized on common base type. + + */ + +public struct Reactive { + /// Base object to extend. + public let base: Base + + /// Creates extensions with base object. + /// + /// - parameter base: Base object. + public init(_ base: Base) { + self.base = base + } +} + +/// A type that has reactive extensions. +public protocol ReactiveCompatible { + /// Extended type + associatedtype CompatibleType + + /// Reactive extensions. + static var rx: Reactive.Type { get set } + + /// Reactive extensions. + var rx: Reactive { get set } +} + +extension ReactiveCompatible { + /// Reactive extensions. + public static var rx: Reactive.Type { + get { + return Reactive.self + } + set { + // this enables using Reactive to "mutate" base type + } + } + + /// Reactive extensions. + public var rx: Reactive { + get { + return Reactive(self) + } + set { + // this enables using Reactive to "mutate" base object + } + } +} + +import Foundation + +/// Extend NSObject with `rx` proxy. +extension NSObject: ReactiveCompatible { } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Rx.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Rx.swift index 5b6d9ff..18a99b1 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Rx.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Rx.swift @@ -1,6 +1,6 @@ // // Rx.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/14/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -9,39 +9,53 @@ import Foundation #if TRACE_RESOURCES -/** -Counts internal Rx resources (Observables, Observers, Disposables ...). + fileprivate var resourceCount: AtomicInt = 0 -It provides a really simple way to detect leaks early during development. -*/ -public var resourceCount: AtomicInt = 0 + /// Resource utilization information + public struct Resources { + /// Counts internal Rx resource allocations (Observables, Observers, Disposables, etc.). This provides a simple way to detect leaks during development. + public static var total: Int32 { + return resourceCount.valueSnapshot() + } + + /// Increments `Resources.total` resource count. + /// + /// - returns: New resource count + public static func incrementTotal() -> Int32 { + return AtomicIncrement(&resourceCount) + } + + /// Decrements `Resources.total` resource count + /// + /// - returns: New resource count + public static func decrementTotal() -> Int32 { + return AtomicDecrement(&resourceCount) + } + } #endif -// Swift doesn't have a concept of abstract metods. -// This function is being used as a runtime check that abstract methods aren't being called. -@noreturn func abstractMethod() -> Void { +/// Swift does not implement abstract methods. This method is used as a runtime check to ensure that methods which intended to be abstract (i.e., they should be implemented in subclasses) are not called directly on the superclass. +func abstractMethod() -> Swift.Never { rxFatalError("Abstract method") } -@noreturn func rxFatalError(lastMessage: String) { +func rxFatalError(_ lastMessage: String) -> Swift.Never { // The temptation to comment this line is great, but please don't, it's for your own good. The choice is yours. fatalError(lastMessage) } -func incrementChecked(inout i: Int) throws -> Int { +func incrementChecked(_ i: inout Int) throws -> Int { if i == Int.max { - throw RxError.Overflow + throw RxError.overflow } - let result = i - i += 1 - return result + defer { i += 1 } + return i } -func decrementChecked(inout i: Int) throws -> Int { +func decrementChecked(_ i: inout Int) throws -> Int { if i == Int.min { - throw RxError.Overflow + throw RxError.overflow } - let result = i - i -= 1 - return result + defer { i -= 1 } + return i } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/RxMutableBox.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/RxMutableBox.swift index 83ff9f7..7606b99 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/RxMutableBox.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/RxMutableBox.swift @@ -8,29 +8,21 @@ import Foundation -/** -Creates mutable reference wrapper for any type. -*/ +/// Creates mutable reference wrapper for any type. class RxMutableBox : CustomDebugStringConvertible { - /** - Wrapped value - */ + /// Wrapped value var value : T - /** - Creates reference wrapper for `value`. - - - parameter value: Value to wrap. - */ + /// Creates reference wrapper for `value`. + /// + /// - parameter value: Value to wrap. init (_ value: T) { self.value = value } } extension RxMutableBox { - /** - - returns: Box description. - */ + /// - returns: Box description. var debugDescription: String { return "MutatingBox(\(self.value))" } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/SchedulerType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/SchedulerType.swift index eceea3e..3c329ba 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/SchedulerType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/SchedulerType.swift @@ -1,6 +1,6 @@ // // SchedulerType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,24 +8,16 @@ import Foundation -/** -Type that represents time interval in the context of RxSwift. -*/ -public typealias RxTimeInterval = NSTimeInterval +// Type that represents time interval in the context of RxSwift. +public typealias RxTimeInterval = TimeInterval -/** -Type that represents absolute time in the context of RxSwift. -*/ -public typealias RxTime = NSDate +/// Type that represents absolute time in the context of RxSwift. +public typealias RxTime = Date -/** -Represents an object that schedules units of work. -*/ +/// Represents an object that schedules units of work. public protocol SchedulerType: ImmediateSchedulerType { - /** - - returns: Current time. - */ + /// - returns: Current time. var now : RxTime { get } @@ -38,7 +30,7 @@ public protocol SchedulerType: ImmediateSchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - func scheduleRelative(state: StateType, dueTime: RxTimeInterval, action: (StateType) -> Disposable) -> Disposable + func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable /** Schedules a periodic piece of work. @@ -49,7 +41,7 @@ public protocol SchedulerType: ImmediateSchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - func schedulePeriodic(state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: (StateType) -> StateType) -> Disposable + func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable } extension SchedulerType { @@ -62,19 +54,17 @@ extension SchedulerType { - parameter period: Period for running the work periodically. - returns: The disposable object used to cancel the scheduled recurring action (best effort). */ - public func schedulePeriodic(state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: (StateType) -> StateType) -> Disposable { + public func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { let schedule = SchedulePeriodicRecursive(scheduler: self, startAfter: startAfter, period: period, action: action, state: state) return schedule.start() } - func scheduleRecursive(state: State, dueTime: RxTimeInterval, action: (state: State, scheduler: AnyRecursiveScheduler) -> ()) -> Disposable { + func scheduleRecursive(_ state: State, dueTime: RxTimeInterval, action: @escaping (State, AnyRecursiveScheduler) -> ()) -> Disposable { let scheduler = AnyRecursiveScheduler(scheduler: self, action: action) scheduler.schedule(state, dueTime: dueTime) - return AnonymousDisposable { - scheduler.dispose() - } + return Disposables.create(with: scheduler.dispose) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift index 41cebae..f4c202b 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift @@ -7,54 +7,42 @@ // import Foundation +import Dispatch -/** -Abstracts the work that needs to be performed on a specific `dispatch_queue_t`. You can also pass a serial dispatch queue, it shouldn't cause any problems. - -This scheduler is suitable when some work needs to be performed in background. -*/ +/// Abstracts the work that needs to be performed on a specific `dispatch_queue_t`. You can also pass a serial dispatch queue, it shouldn't cause any problems. +/// +/// This scheduler is suitable when some work needs to be performed in background. public class ConcurrentDispatchQueueScheduler: SchedulerType { - public typealias TimeInterval = NSTimeInterval - public typealias Time = NSDate - - private let _queue : dispatch_queue_t + public typealias TimeInterval = Foundation.TimeInterval + public typealias Time = Date - public var now : NSDate { - return NSDate() + public var now : Date { + return Date() } + + let configuration: DispatchQueueConfiguration - // leeway for scheduling timers - private var _leeway: Int64 = 0 - - /** - Constructs new `ConcurrentDispatchQueueScheduler` that wraps `queue`. - - - parameter queue: Target dispatch queue. - */ - public init(queue: dispatch_queue_t) { - _queue = queue + /// Constructs new `ConcurrentDispatchQueueScheduler` that wraps `queue`. + /// + /// - parameter queue: Target dispatch queue. + public init(queue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { + configuration = DispatchQueueConfiguration(queue: queue, leeway: leeway) } - /** - Convenience init for scheduler that wraps one of the global concurrent dispatch queues. - - - parameter globalConcurrentQueueQOS: Target global dispatch queue, by quality of service class. - */ + /// Convenience init for scheduler that wraps one of the global concurrent dispatch queues. + /// + /// - parameter qos: Target global dispatch queue, by quality of service class. @available(iOS 8, OSX 10.10, *) - public convenience init(globalConcurrentQueueQOS: DispatchQueueSchedulerQOS) { - let priority = globalConcurrentQueueQOS.QOSClass - self.init(queue: dispatch_get_global_queue(priority, UInt(0))) + public convenience init(qos: DispatchQoS, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { + self.init(queue: DispatchQueue( + label: "rxswift.queue.\(qos)", + qos: qos, + attributes: [DispatchQueue.Attributes.concurrent], + target: nil), + leeway: leeway + ) } - - class func convertTimeIntervalToDispatchInterval(timeInterval: NSTimeInterval) -> Int64 { - return Int64(timeInterval * Double(NSEC_PER_SEC)) - } - - class func convertTimeIntervalToDispatchTime(timeInterval: NSTimeInterval) -> dispatch_time_t { - return dispatch_time(DISPATCH_TIME_NOW, convertTimeIntervalToDispatchInterval(timeInterval)) - } - /** Schedules an action to be executed immediatelly. @@ -62,22 +50,8 @@ public class ConcurrentDispatchQueueScheduler: SchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public final func schedule(state: StateType, action: StateType -> Disposable) -> Disposable { - return self.scheduleInternal(state, action: action) - } - - func scheduleInternal(state: StateType, action: StateType -> Disposable) -> Disposable { - let cancel = SingleAssignmentDisposable() - - dispatch_async(_queue) { - if cancel.disposed { - return - } - - cancel.disposable = action(state) - } - - return cancel + public final func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { + return self.configuration.schedule(state, action: action) } /** @@ -88,27 +62,8 @@ public class ConcurrentDispatchQueueScheduler: SchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public final func scheduleRelative(state: StateType, dueTime: NSTimeInterval, action: (StateType) -> Disposable) -> Disposable { - let timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, _queue) - - let dispatchInterval = MainScheduler.convertTimeIntervalToDispatchTime(dueTime) - - let compositeDisposable = CompositeDisposable() - - dispatch_source_set_timer(timer, dispatchInterval, DISPATCH_TIME_FOREVER, 0) - dispatch_source_set_event_handler(timer, { - if compositeDisposable.disposed { - return - } - compositeDisposable.addDisposable(action(state)) - }) - dispatch_resume(timer) - - compositeDisposable.addDisposable(AnonymousDisposable { - dispatch_source_cancel(timer) - }) - - return compositeDisposable + public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { + return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) } /** @@ -120,28 +75,7 @@ public class ConcurrentDispatchQueueScheduler: SchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func schedulePeriodic(state: StateType, startAfter: TimeInterval, period: TimeInterval, action: (StateType) -> StateType) -> Disposable { - let timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, _queue) - - let initial = MainScheduler.convertTimeIntervalToDispatchTime(startAfter) - let dispatchInterval = MainScheduler.convertTimeIntervalToDispatchInterval(period) - - var timerState = state - - let validDispatchInterval = dispatchInterval < 0 ? 0 : UInt64(dispatchInterval) - - dispatch_source_set_timer(timer, initial, validDispatchInterval, 0) - let cancel = AnonymousDisposable { - dispatch_source_cancel(timer) - } - dispatch_source_set_event_handler(timer, { - if cancel.disposed { - return - } - timerState = action(timerState) - }) - dispatch_resume(timer) - - return cancel + public func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { + return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift index c26be80..6feaedd 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift @@ -1,12 +1,13 @@ // // ConcurrentMainScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/17/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // import Foundation +import Dispatch /** Abstracts work that needs to be performed on `MainThread`. In case `schedule` methods are called from main thread, it will perform action immediately without scheduling. @@ -15,27 +16,23 @@ This scheduler is optimized for `subscribeOn` operator. If you want to observe o `MainScheduler` is more suitable for that purpose. */ public final class ConcurrentMainScheduler : SchedulerType { - public typealias TimeInterval = NSTimeInterval - public typealias Time = NSDate + public typealias TimeInterval = Foundation.TimeInterval + public typealias Time = Date private let _mainScheduler: MainScheduler - private let _mainQueue: dispatch_queue_t + private let _mainQueue: DispatchQueue - /** - - returns: Current time. - */ - public var now : NSDate { - return _mainScheduler.now + /// - returns: Current time. + public var now : Date { + return _mainScheduler.now as Date } private init(mainScheduler: MainScheduler) { - _mainQueue = dispatch_get_main_queue() + _mainQueue = DispatchQueue.main _mainScheduler = mainScheduler } - /** - Singleton instance of `ConcurrentMainScheduler` - */ + /// Singleton instance of `ConcurrentMainScheduler` public static let instance = ConcurrentMainScheduler(mainScheduler: MainScheduler.instance) /** @@ -45,19 +42,19 @@ public final class ConcurrentMainScheduler : SchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func schedule(state: StateType, action: (StateType) -> Disposable) -> Disposable { - if NSThread.currentThread().isMainThread { + public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { + if DispatchQueue.isMain { return action(state) } let cancel = SingleAssignmentDisposable() - dispatch_async(_mainQueue) { - if cancel.disposed { + _mainQueue.async { + if cancel.isDisposed { return } - cancel.disposable = action(state) + cancel.setDisposable(action(state)) } return cancel @@ -71,7 +68,7 @@ public final class ConcurrentMainScheduler : SchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public final func scheduleRelative(state: StateType, dueTime: NSTimeInterval, action: (StateType) -> Disposable) -> Disposable { + public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { return _mainScheduler.scheduleRelative(state, dueTime: dueTime, action: action) } @@ -84,7 +81,7 @@ public final class ConcurrentMainScheduler : SchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func schedulePeriodic(state: StateType, startAfter: TimeInterval, period: TimeInterval, action: (StateType) -> StateType) -> Disposable { + public func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { return _mainScheduler.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift index 16882fe..8a49ce0 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift @@ -1,93 +1,49 @@ // // CurrentThreadScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 8/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // import Foundation +import Dispatch -#if os(Linux) - let CurrentThreadSchedulerKeyInstance = "RxSwift.CurrentThreadScheduler.SchedulerKey" - let CurrentThreadSchedulerQueueKeyInstance = "RxSwift.CurrentThreadScheduler.Queue" +let CurrentThreadSchedulerKeyInstance = "RxSwift.CurrentThreadScheduler.SchedulerKey" +let CurrentThreadSchedulerQueueKeyInstance = "RxSwift.CurrentThreadScheduler.Queue" - typealias CurrentThreadSchedulerValue = NSString - let CurrentThreadSchedulerValueInstance = "RxSwift.CurrentThreadScheduler.SchedulerKey" as NSString -#else - let CurrentThreadSchedulerKeyInstance = CurrentThreadSchedulerKey() - let CurrentThreadSchedulerQueueKeyInstance = CurrentThreadSchedulerQueueKey() +typealias CurrentThreadSchedulerValue = NSString +let CurrentThreadSchedulerValueInstance = "RxSwift.CurrentThreadScheduler.SchedulerKey" as NSString - typealias CurrentThreadSchedulerValue = CurrentThreadSchedulerKey - let CurrentThreadSchedulerValueInstance = CurrentThreadSchedulerKeyInstance - class CurrentThreadSchedulerKey : NSObject, NSCopying { - override func isEqual(object: AnyObject?) -> Bool { - return object === CurrentThreadSchedulerKeyInstance - } - - override var hash: Int { return -904739208 } - - override func copy() -> AnyObject { - return CurrentThreadSchedulerKeyInstance - } - - func copyWithZone(zone: NSZone) -> AnyObject { - return CurrentThreadSchedulerKeyInstance - } - } - - class CurrentThreadSchedulerQueueKey : NSObject, NSCopying { - override func isEqual(object: AnyObject?) -> Bool { - return object === CurrentThreadSchedulerQueueKeyInstance - } - - override var hash: Int { return -904739207 } - - override func copy() -> AnyObject { - return CurrentThreadSchedulerQueueKeyInstance - } - - func copyWithZone(zone: NSZone) -> AnyObject { - return CurrentThreadSchedulerQueueKeyInstance - } - } -#endif - -/** -Represents an object that schedules units of work on the current thread. - -This is the default scheduler for operators that generate elements. - -This scheduler is also sometimes called `trampoline scheduler`. -*/ +/// Represents an object that schedules units of work on the current thread. +/// +/// This is the default scheduler for operators that generate elements. +/// +/// This scheduler is also sometimes called `trampoline scheduler`. public class CurrentThreadScheduler : ImmediateSchedulerType { typealias ScheduleQueue = RxMutableBox> - /** - The singleton instance of the current thread scheduler. - */ + /// The singleton instance of the current thread scheduler. public static let instance = CurrentThreadScheduler() static var queue : ScheduleQueue? { get { - return NSThread.getThreadLocalStorageValueForKey(CurrentThreadSchedulerQueueKeyInstance) + return Thread.getThreadLocalStorageValueForKey(CurrentThreadSchedulerQueueKeyInstance) } set { - NSThread.setThreadLocalStorageValue(newValue, forKey: CurrentThreadSchedulerQueueKeyInstance) + Thread.setThreadLocalStorageValue(newValue, forKey: CurrentThreadSchedulerQueueKeyInstance) } } - /** - Gets a value that indicates whether the caller must call a `schedule` method. - */ - public static private(set) var isScheduleRequired: Bool { + /// Gets a value that indicates whether the caller must call a `schedule` method. + public static fileprivate(set) var isScheduleRequired: Bool { get { - let value: CurrentThreadSchedulerValue? = NSThread.getThreadLocalStorageValueForKey(CurrentThreadSchedulerKeyInstance) + let value: CurrentThreadSchedulerValue? = Thread.getThreadLocalStorageValueForKey(CurrentThreadSchedulerKeyInstance) return value == nil } set(isScheduleRequired) { - NSThread.setThreadLocalStorageValue(isScheduleRequired ? nil : CurrentThreadSchedulerValueInstance, forKey: CurrentThreadSchedulerKeyInstance) + Thread.setThreadLocalStorageValue(isScheduleRequired ? nil : CurrentThreadSchedulerValueInstance, forKey: CurrentThreadSchedulerKeyInstance) } } @@ -101,7 +57,7 @@ public class CurrentThreadScheduler : ImmediateSchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func schedule(state: StateType, action: (StateType) -> Disposable) -> Disposable { + public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { if CurrentThreadScheduler.isScheduleRequired { CurrentThreadScheduler.isScheduleRequired = false @@ -117,7 +73,7 @@ public class CurrentThreadScheduler : ImmediateSchedulerType { } while let latest = queue.value.dequeue() { - if latest.disposed { + if latest.isDisposed { continue } latest.invoke() @@ -139,11 +95,7 @@ public class CurrentThreadScheduler : ImmediateSchedulerType { let scheduledItem = ScheduledItem(action: action, state: state) queue.value.enqueue(scheduledItem) - - // In Xcode 7.3, `return scheduledItem` causes segmentation fault 11 on release build. - // To workaround this compiler issue, returns AnonymousDisposable that disposes scheduledItem. - return AnonymousDisposable { - scheduledItem.dispose() - } + + return scheduledItem } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/DispatchQueueSchedulerQOS.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/DispatchQueueSchedulerQOS.swift deleted file mode 100644 index 571f6bf..0000000 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/DispatchQueueSchedulerQOS.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// DispatchQueueSchedulerQOS.swift -// RxSwift -// -// Created by John C. "Hsoi" Daub on 12/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -/** -Identifies one of the global concurrent dispatch queues with specified quality of service class. -*/ -public enum DispatchQueueSchedulerQOS { - - /** - Identifies global dispatch queue with `QOS_CLASS_USER_INTERACTIVE` - */ - case UserInteractive - - /** - Identifies global dispatch queue with `QOS_CLASS_USER_INITIATED` - */ - case UserInitiated - - /** - Identifies global dispatch queue with `QOS_CLASS_DEFAULT` - */ - case Default - - /** - Identifies global dispatch queue with `QOS_CLASS_UTILITY` - */ - case Utility - - /** - Identifies global dispatch queue with `QOS_CLASS_BACKGROUND` - */ - case Background -} - - -@available(iOS 8, OSX 10.10, *) -extension DispatchQueueSchedulerQOS { - var QOSClass: qos_class_t { - switch self { - case .UserInteractive: return QOS_CLASS_USER_INTERACTIVE - case .UserInitiated: return QOS_CLASS_USER_INITIATED - case .Default: return QOS_CLASS_DEFAULT - case .Utility: return QOS_CLASS_UTILITY - case .Background: return QOS_CLASS_BACKGROUND - } - } -} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift index bcb15b5..fede60e 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift @@ -1,6 +1,6 @@ // // HistoricalScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 12/27/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,9 +8,7 @@ import Foundation -/** - Provides a virtual time scheduler that uses `NSDate` for absolute time and `NSTimeInterval` for relative time. -*/ +/// Provides a virtual time scheduler that uses `Date` for absolute time and `NSTimeInterval` for relative time. public class HistoricalScheduler : VirtualTimeScheduler { /** @@ -18,8 +16,7 @@ public class HistoricalScheduler : VirtualTimeScheduler RxTime { + /// Returns identical value of argument passed because historical virtual time is equal to real time, just + /// decoupled from local machine clock. + public func convertFromVirtualTime(_ virtualTime: VirtualTimeUnit) -> RxTime { return virtualTime } - /** - Returns identical value of argument passed because historical virtual time is equal to real time, just - decoupled from local machine clock. - */ - public func convertToVirtualTime(time: RxTime) -> VirtualTimeUnit { + /// Returns identical value of argument passed because historical virtual time is equal to real time, just + /// decoupled from local machine clock. + public func convertToVirtualTime(_ time: RxTime) -> VirtualTimeUnit { return time } - /** - Returns identical value of argument passed because historical virtual time is equal to real time, just - decoupled from local machine clock. - */ - public func convertFromVirtualTimeInterval(virtualTimeInterval: VirtualTimeIntervalUnit) -> RxTimeInterval { + /// Returns identical value of argument passed because historical virtual time is equal to real time, just + /// decoupled from local machine clock. + public func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> RxTimeInterval { return virtualTimeInterval } - /** - Returns identical value of argument passed because historical virtual time is equal to real time, just - decoupled from local machine clock. - */ - public func convertToVirtualTimeInterval(timeInterval: RxTimeInterval) -> VirtualTimeIntervalUnit { + /// Returns identical value of argument passed because historical virtual time is equal to real time, just + /// decoupled from local machine clock. + public func convertToVirtualTimeInterval(_ timeInterval: RxTimeInterval) -> VirtualTimeIntervalUnit { return timeInterval } /** - Offsets `NSDate` by time interval. + Offsets `Date` by time interval. - parameter time: Time. - parameter timeInterval: Time interval offset. - returns: Time offsetted by time interval. */ - public func offsetVirtualTime(time time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit { - return time.dateByAddingTimeInterval(offset) + public func offsetVirtualTime(_ time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit { + return time.addingTimeInterval(offset) } - /** - Compares two `NSDate`s. - */ - public func compareVirtualTime(lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison { - switch lhs.compare(rhs) { - case .OrderedAscending: - return .LessThan - case .OrderedSame: - return .Equal - case .OrderedDescending: - return .GreaterThan + /// Compares two `Date`s. + public func compareVirtualTime(_ lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison { + switch lhs.compare(rhs as Date) { + case .orderedAscending: + return .lessThan + case .orderedSame: + return .equal + case .orderedDescending: + return .greaterThan } } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift index fc54fd5..f3e1635 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift @@ -1,6 +1,6 @@ // // ImmediateScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/17/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,9 +8,7 @@ import Foundation -/** -Represents an object that schedules units of work to run immediately on the current thread. -*/ +/// Represents an object that schedules units of work to run immediately on the current thread. private class ImmediateScheduler : ImmediateSchedulerType { private let _asyncLock = AsyncLock() @@ -25,15 +23,15 @@ private class ImmediateScheduler : ImmediateSchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - func schedule(state: StateType, action: (StateType) -> Disposable) -> Disposable { + func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { let disposable = SingleAssignmentDisposable() _asyncLock.invoke(AnonymousInvocable { - if disposable.disposed { + if disposable.isDisposed { return } - disposable.disposable = action(state) + disposable.setDisposable(action(state)) }) return disposable } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift index 8525db4..b3a19af 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift @@ -1,6 +1,6 @@ // // AnonymousInvocable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 11/7/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -11,11 +11,11 @@ import Foundation struct AnonymousInvocable : InvocableType { private let _action: () -> () - init(_ action: () -> ()) { + init(_ action: @escaping () -> ()) { _action = action } func invoke() { _action() } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift new file mode 100644 index 0000000..be7040c --- /dev/null +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift @@ -0,0 +1,104 @@ +// +// DispatchQueueConfiguration.swift +// RxSwift +// +// Created by Krunoslav Zaher on 7/23/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Foundation +import Dispatch + +struct DispatchQueueConfiguration { + let queue: DispatchQueue + let leeway: DispatchTimeInterval +} + +private func dispatchInterval(_ interval: Foundation.TimeInterval) -> DispatchTimeInterval { + precondition(interval >= 0.0) + // TODO: Replace 1000 with something that actually works + // NSEC_PER_MSEC returns 1000000 + return DispatchTimeInterval.milliseconds(Int(interval * 1000.0)) +} + +extension DispatchQueueConfiguration { + func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { + let cancel = SingleAssignmentDisposable() + + queue.async { + if cancel.isDisposed { + return + } + + + cancel.setDisposable(action(state)) + } + + return cancel + } + + func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { + let deadline = DispatchTime.now() + dispatchInterval(dueTime) + + let compositeDisposable = CompositeDisposable() + + let timer = DispatchSource.makeTimerSource(queue: queue) + timer.scheduleOneshot(deadline: deadline) + + // TODO: + // This looks horrible, and yes, it is. + // It looks like Apple has made a conceputal change here, and I'm unsure why. + // Need more info on this. + // It looks like just setting timer to fire and not holding a reference to it + // until deadline causes timer cancellation. + var timerReference: DispatchSourceTimer? = timer + let cancelTimer = Disposables.create { + timerReference?.cancel() + timerReference = nil + } + + timer.setEventHandler(handler: { + if compositeDisposable.isDisposed { + return + } + _ = compositeDisposable.insert(action(state)) + cancelTimer.dispose() + }) + timer.resume() + + _ = compositeDisposable.insert(cancelTimer) + + return compositeDisposable + } + + func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { + let initial = DispatchTime.now() + dispatchInterval(startAfter) + + var timerState = state + + let timer = DispatchSource.makeTimerSource(queue: queue) + timer.scheduleRepeating(deadline: initial, interval: dispatchInterval(period), leeway: leeway) + + // TODO: + // This looks horrible, and yes, it is. + // It looks like Apple has made a conceputal change here, and I'm unsure why. + // Need more info on this. + // It looks like just setting timer to fire and not holding a reference to it + // until deadline causes timer cancellation. + var timerReference: DispatchSourceTimer? = timer + let cancelTimer = Disposables.create { + timerReference?.cancel() + timerReference = nil + } + + timer.setEventHandler(handler: { + if cancelTimer.isDisposed { + return + } + timerState = action(timerState) + }) + timer.resume() + + return cancelTimer + } +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift index 1a4e3aa..54c7f19 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift @@ -1,6 +1,6 @@ // // InvocableScheduledItem.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 11/7/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -21,4 +21,4 @@ struct InvocableScheduledItem : InvocableType { func invoke() { _invocable.invoke(_state) } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift index 1632e71..1f95c66 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift @@ -1,6 +1,6 @@ // // InvocableType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 11/7/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -15,5 +15,5 @@ protocol InvocableType { protocol InvocableWithValueType { associatedtype Value - func invoke(value: Value) -} \ No newline at end of file + func invoke(_ value: Value) +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift index 0b58332..c03b2eb 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift @@ -1,6 +1,6 @@ // // ScheduledItem.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 9/2/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -11,27 +11,27 @@ import Foundation struct ScheduledItem : ScheduledItemType , InvocableType { - typealias Action = T -> Disposable + typealias Action = (T) -> Disposable private let _action: Action private let _state: T private let _disposable = SingleAssignmentDisposable() - var disposed: Bool { - return _disposable.disposed + var isDisposed: Bool { + return _disposable.isDisposed } - init(action: Action, state: T) { + init(action: @escaping Action, state: T) { _action = action _state = state } func invoke() { - _disposable.disposable = _action(_state) + _disposable.setDisposable(_action(_state)) } func dispose() { _disposable.dispose() } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift index 2a1eca2..a5f0b0b 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift @@ -1,6 +1,6 @@ // // ScheduledItemType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 11/7/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift index dfda88c..5adfa78 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift @@ -1,15 +1,16 @@ // // MainScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // import Foundation +import Dispatch /** -Abstracts work that needs to be performed on `MainThread`. In case `schedule` methods are called from main thread, it will perform action immediately without scheduling. +Abstracts work that needs to be performed on `DispatchQueue.main`. In case `schedule` methods are called from `DispatchQueue.main`, it will perform action immediately without scheduling. This scheduler is usually used to perform UI work. @@ -20,52 +21,47 @@ operator please use `ConcurrentMainScheduler` because it is more optimized for t */ public final class MainScheduler : SerialDispatchQueueScheduler { - private let _mainQueue: dispatch_queue_t + private let _mainQueue: DispatchQueue var numberEnqueued: AtomicInt = 0 - private init() { - _mainQueue = dispatch_get_main_queue() + /// Initializes new instance of `MainScheduler`. + public init() { + _mainQueue = DispatchQueue.main super.init(serialQueue: _mainQueue) } - /** - Singleton instance of `MainScheduler` - */ + /// Singleton instance of `MainScheduler` public static let instance = MainScheduler() - /** - Singleton instance of `MainScheduler` that always schedules work asynchronously - and doesn't perform optimizations for calls scheduled from main thread. - */ - public static let asyncInstance = SerialDispatchQueueScheduler(serialQueue: dispatch_get_main_queue()) - - /** - In case this method is called on a background thread it will throw an exception. - */ - public class func ensureExecutingOnScheduler() { - if !NSThread.currentThread().isMainThread { - rxFatalError("Executing on backgound thread. Please use `MainScheduler.instance.schedule` to schedule work on main thread.") + /// Singleton instance of `MainScheduler` that always schedules work asynchronously + /// and doesn't perform optimizations for calls scheduled from main queue. + public static let asyncInstance = SerialDispatchQueueScheduler(serialQueue: DispatchQueue.main) + + /// In case this method is called on a background thread it will throw an exception. + public class func ensureExecutingOnScheduler(errorMessage: String? = nil) { + if !DispatchQueue.isMain { + rxFatalError(errorMessage ?? "Executing on backgound thread. Please use `MainScheduler.instance.schedule` to schedule work on main thread.") } } - override func scheduleInternal(state: StateType, action: StateType -> Disposable) -> Disposable { + override func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { let currentNumberEnqueued = AtomicIncrement(&numberEnqueued) - if NSThread.currentThread().isMainThread && currentNumberEnqueued == 1 { + if DispatchQueue.isMain && currentNumberEnqueued == 1 { let disposable = action(state) - AtomicDecrement(&numberEnqueued) + _ = AtomicDecrement(&numberEnqueued) return disposable } let cancel = SingleAssignmentDisposable() - dispatch_async(_mainQueue) { - if !cancel.disposed { - action(state) + _mainQueue.async { + if !cancel.isDisposed { + _ = action(state) } - AtomicDecrement(&self.numberEnqueued) + _ = AtomicDecrement(&self.numberEnqueued) } return cancel diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift index 622cd0e..957f053 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift @@ -1,6 +1,6 @@ // // OperationQueueScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 4/4/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,20 +8,16 @@ import Foundation -/** -Abstracts the work that needs to be performed on a specific `NSOperationQueue`. - -This scheduler is suitable for cases when there is some bigger chunk of work that needs to be performed in background and you want to fine tune concurrent processing using `maxConcurrentOperationCount`. -*/ +/// Abstracts the work that needs to be performed on a specific `NSOperationQueue`. +/// +/// This scheduler is suitable for cases when there is some bigger chunk of work that needs to be performed in background and you want to fine tune concurrent processing using `maxConcurrentOperationCount`. public class OperationQueueScheduler: ImmediateSchedulerType { - public let operationQueue: NSOperationQueue - - /** - Constructs new instance of `OperationQueueScheduler` that performs work on `operationQueue`. + public let operationQueue: OperationQueue - - parameter operationQueue: Operation queue targeted to perform work on. - */ - public init(operationQueue: NSOperationQueue) { + /// Constructs new instance of `OperationQueueScheduler` that performs work on `operationQueue`. + /// + /// - parameter operationQueue: Operation queue targeted to perform work on. + public init(operationQueue: OperationQueue) { self.operationQueue = operationQueue } @@ -32,28 +28,21 @@ public class OperationQueueScheduler: ImmediateSchedulerType { - parameter action: Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func schedule(state: StateType, action: (StateType) -> Disposable) -> Disposable { - - let compositeDisposable = CompositeDisposable() - - weak var compositeDisposableWeak = compositeDisposable - - let operation = NSBlockOperation { - if compositeDisposableWeak?.disposed ?? false { + public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { + let cancel = SingleAssignmentDisposable() + + let operation = BlockOperation { + if cancel.isDisposed { return } - - let disposable = action(state) - compositeDisposableWeak?.addDisposable(disposable) + + + cancel.setDisposable(action(state)) } self.operationQueue.addOperation(operation) - compositeDisposable.addDisposable(AnonymousDisposable { - operation.cancel() - }) - - return compositeDisposable + return cancel } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift index 731d202..fd9992b 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift @@ -8,11 +8,16 @@ import Foundation -/** -Type erased recursive scheduler. -*/ +fileprivate enum ScheduleState { + case initial + case added(CompositeDisposable.DisposeKey) + case done +} + +/// Type erased recursive scheduler. class AnyRecursiveScheduler { - typealias Action = (state: State, scheduler: AnyRecursiveScheduler) -> Void + + typealias Action = (State, AnyRecursiveScheduler) -> Void private let _lock = NSRecursiveLock() @@ -22,7 +27,7 @@ class AnyRecursiveScheduler { private var _scheduler: SchedulerType private var _action: Action? - init(scheduler: SchedulerType, action: Action) { + init(scheduler: SchedulerType, action: @escaping Action) { _action = action _scheduler = scheduler } @@ -33,83 +38,105 @@ class AnyRecursiveScheduler { - parameter state: State passed to the action to be executed. - parameter dueTime: Relative time after which to execute the recursive action. */ - func schedule(state: State, dueTime: RxTimeInterval) { + func schedule(_ state: State, dueTime: RxTimeInterval) { + var scheduleState: ScheduleState = .initial - var isAdded = false - var isDone = false - - var removeKey: CompositeDisposable.DisposeKey? = nil let d = _scheduler.scheduleRelative(state, dueTime: dueTime) { (state) -> Disposable in // best effort - if self._group.disposed { - return NopDisposable.instance + if self._group.isDisposed { + return Disposables.create() } let action = self._lock.calculateLocked { () -> Action? in - if isAdded { - self._group.removeDisposable(removeKey!) - } - else { - isDone = true + switch scheduleState { + case let .added(removeKey): + self._group.remove(for: removeKey) + case .initial: + break + case .done: + break } - + + scheduleState = .done + return self._action } if let action = action { - action(state: state, scheduler: self) + action(state, self) } - return NopDisposable.instance + return Disposables.create() } _lock.performLocked { - if !isDone { - removeKey = _group.addDisposable(d) - isAdded = true + switch scheduleState { + case .added: + rxFatalError("Invalid state") + break + case .initial: + if let removeKey = _group.insert(d) { + scheduleState = .added(removeKey) + } + else { + scheduleState = .done + } + break + case .done: + break } } } - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - */ - func schedule(state: State) { - - var isAdded = false - var isDone = false - - var removeKey: CompositeDisposable.DisposeKey? = nil + /// Schedules an action to be executed recursively. + /// + /// - parameter state: State passed to the action to be executed. + func schedule(_ state: State) { + var scheduleState: ScheduleState = .initial + let d = _scheduler.schedule(state) { (state) -> Disposable in // best effort - if self._group.disposed { - return NopDisposable.instance + if self._group.isDisposed { + return Disposables.create() } let action = self._lock.calculateLocked { () -> Action? in - if isAdded { - self._group.removeDisposable(removeKey!) - } - else { - isDone = true + switch scheduleState { + case let .added(removeKey): + self._group.remove(for: removeKey) + case .initial: + break + case .done: + break } + + scheduleState = .done return self._action } if let action = action { - action(state: state, scheduler: self) + action(state, self) } - return NopDisposable.instance + return Disposables.create() } _lock.performLocked { - if !isDone { - removeKey = _group.addDisposable(d) - isAdded = true + switch scheduleState { + case .added: + rxFatalError("Invalid state") + break + case .initial: + if let removeKey = _group.insert(d) { + scheduleState = .added(removeKey) + } + else { + scheduleState = .done + } + break + case .done: + break } } } @@ -122,11 +149,9 @@ class AnyRecursiveScheduler { } } -/** -Type erased recursive scheduler. -*/ +/// Type erased recursive scheduler. class RecursiveImmediateScheduler { - typealias Action = (state: State, recurse: State -> Void) -> Void + typealias Action = (_ state: State, _ recurse: (State) -> Void) -> Void private var _lock = SpinLock() private let _group = CompositeDisposable() @@ -134,52 +159,62 @@ class RecursiveImmediateScheduler { private var _action: Action? private let _scheduler: ImmediateSchedulerType - init(action: Action, scheduler: ImmediateSchedulerType) { + init(action: @escaping Action, scheduler: ImmediateSchedulerType) { _action = action _scheduler = scheduler } // immediate scheduling - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - */ - func schedule(state: State) { - - var isAdded = false - var isDone = false - - var removeKey: CompositeDisposable.DisposeKey? = nil + /// Schedules an action to be executed recursively. + /// + /// - parameter state: State passed to the action to be executed. + func schedule(_ state: State) { + var scheduleState: ScheduleState = .initial + let d = _scheduler.schedule(state) { (state) -> Disposable in // best effort - if self._group.disposed { - return NopDisposable.instance + if self._group.isDisposed { + return Disposables.create() } let action = self._lock.calculateLocked { () -> Action? in - if isAdded { - self._group.removeDisposable(removeKey!) - } - else { - isDone = true + switch scheduleState { + case let .added(removeKey): + self._group.remove(for: removeKey) + case .initial: + break + case .done: + break } - + + scheduleState = .done + return self._action } if let action = action { - action(state: state, recurse: self.schedule) + action(state, self.schedule) } - return NopDisposable.instance + return Disposables.create() } _lock.performLocked { - if !isDone { - removeKey = _group.addDisposable(d) - isAdded = true + switch scheduleState { + case .added: + rxFatalError("Invalid state") + break + case .initial: + if let removeKey = _group.insert(d) { + scheduleState = .added(removeKey) + } + else { + scheduleState = .done + } + break + case .done: + break } } } @@ -190,4 +225,4 @@ class RecursiveImmediateScheduler { } _group.dispose() } -} \ No newline at end of file +} diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift index 3906d7a..9374fc5 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift @@ -9,12 +9,12 @@ import Foundation enum SchedulePeriodicRecursiveCommand { - case Tick - case DispatchStart + case tick + case dispatchStart } class SchedulePeriodicRecursive { - typealias RecursiveAction = State -> State + typealias RecursiveAction = (State) -> State typealias RecursiveScheduler = AnyRecursiveScheduler private let _scheduler: SchedulerType @@ -25,7 +25,7 @@ class SchedulePeriodicRecursive { private var _state: State private var _pendingTickCount: AtomicInt = 0 - init(scheduler: SchedulerType, startAfter: RxTimeInterval, period: RxTimeInterval, action: RecursiveAction, state: State) { + init(scheduler: SchedulerType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping RecursiveAction, state: State) { _scheduler = scheduler _startAfter = startAfter _period = period @@ -34,29 +34,29 @@ class SchedulePeriodicRecursive { } func start() -> Disposable { - return _scheduler.scheduleRecursive(SchedulePeriodicRecursiveCommand.Tick, dueTime: _startAfter, action: self.tick) + return _scheduler.scheduleRecursive(SchedulePeriodicRecursiveCommand.tick, dueTime: _startAfter, action: self.tick) } - func tick(command: SchedulePeriodicRecursiveCommand, scheduler: RecursiveScheduler) -> Void { + func tick(_ command: SchedulePeriodicRecursiveCommand, scheduler: RecursiveScheduler) -> Void { // Tries to emulate periodic scheduling as best as possible. // The problem that could arise is if handling periodic ticks take too long, or // tick interval is short. switch command { - case .Tick: - scheduler.schedule(.Tick, dueTime: _period) + case .tick: + scheduler.schedule(.tick, dueTime: _period) // The idea is that if on tick there wasn't any item enqueued, schedule to perform work immediatelly. // Else work will be scheduled after previous enqueued work completes. if AtomicIncrement(&_pendingTickCount) == 1 { - self.tick(.DispatchStart, scheduler: scheduler) + self.tick(.dispatchStart, scheduler: scheduler) } - case .DispatchStart: + case .dispatchStart: _state = _action(_state) // Start work and schedule check is this last batch of work if AtomicDecrement(&_pendingTickCount) > 0 { // This gives priority to scheduler emulation, it's not perfect, but helps - scheduler.schedule(SchedulePeriodicRecursiveCommand.DispatchStart) + scheduler.schedule(SchedulePeriodicRecursiveCommand.dispatchStart) } } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift index 4108fe4..fab8cbe 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift @@ -1,12 +1,13 @@ // // SerialDispatchQueueScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // import Foundation +import Dispatch /** Abstracts the work that needs to be performed on a specific `dispatch_queue_t`. It will make sure @@ -25,24 +26,19 @@ In case some customization need to be made on it before usage, internal serial queue can be customized using `serialQueueConfiguration` callback. */ -public class SerialDispatchQueueScheduler: SchedulerType { - public typealias TimeInterval = NSTimeInterval - public typealias Time = NSDate +public class SerialDispatchQueueScheduler : SchedulerType { + public typealias TimeInterval = Foundation.TimeInterval + public typealias Time = Date - private let _serialQueue : dispatch_queue_t - - /** - - returns: Current time. - */ - public var now : NSDate { - return NSDate() + /// - returns: Current time. + public var now : Date { + return Date() } + + let configuration: DispatchQueueConfiguration - // leeway for scheduling timers - private var _leeway: Int64 = 0 - - init(serialQueue: dispatch_queue_t) { - _serialQueue = serialQueue + init(serialQueue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { + configuration = DispatchQueueConfiguration(queue: serialQueue, leeway: leeway) } /** @@ -53,10 +49,10 @@ public class SerialDispatchQueueScheduler: SchedulerType { - parameter internalSerialQueueName: Name of internal serial dispatch queue. - parameter serialQueueConfiguration: Additional configuration of internal serial dispatch queue. */ - public convenience init(internalSerialQueueName: String, serialQueueConfiguration: ((dispatch_queue_t) -> Void)? = nil) { - let queue = dispatch_queue_create(internalSerialQueueName, DISPATCH_QUEUE_SERIAL) + public convenience init(internalSerialQueueName: String, serialQueueConfiguration: ((DispatchQueue) -> Void)? = nil, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { + let queue = DispatchQueue(label: internalSerialQueueName, attributes: []) serialQueueConfiguration?(queue) - self.init(serialQueue: queue) + self.init(serialQueue: queue, leeway: leeway) } /** @@ -65,30 +61,23 @@ public class SerialDispatchQueueScheduler: SchedulerType { - parameter queue: Possibly concurrent dispatch queue used to perform work. - parameter internalSerialQueueName: Name of internal serial dispatch queue proxy. */ - public convenience init(queue: dispatch_queue_t, internalSerialQueueName: String) { - let serialQueue = dispatch_queue_create(internalSerialQueueName, DISPATCH_QUEUE_SERIAL) - dispatch_set_target_queue(serialQueue, queue) - self.init(serialQueue: serialQueue) + public convenience init(queue: DispatchQueue, internalSerialQueueName: String, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { + // Swift 3.0 IUO + let serialQueue = DispatchQueue(label: internalSerialQueueName, + attributes: [], + target: queue) + self.init(serialQueue: serialQueue, leeway: leeway) } /** Constructs new `SerialDispatchQueueScheduler` that wraps on of the global concurrent dispatch queues. - - parameter globalConcurrentQueueQOS: Identifier for global dispatch queue with specified quality of service class. + - parameter qos: Identifier for global dispatch queue with specified quality of service class. - parameter internalSerialQueueName: Custom name for internal serial dispatch queue proxy. */ @available(iOS 8, OSX 10.10, *) - public convenience init(globalConcurrentQueueQOS: DispatchQueueSchedulerQOS, internalSerialQueueName: String = "rx.global_dispatch_queue.serial") { - let priority = globalConcurrentQueueQOS.QOSClass - self.init(queue: dispatch_get_global_queue(priority, UInt(0)), internalSerialQueueName: internalSerialQueueName) - } - - class func convertTimeIntervalToDispatchInterval(timeInterval: NSTimeInterval) -> Int64 { - return Int64(timeInterval * Double(NSEC_PER_SEC)) - } - - class func convertTimeIntervalToDispatchTime(timeInterval: NSTimeInterval) -> dispatch_time_t { - return dispatch_time(DISPATCH_TIME_NOW, convertTimeIntervalToDispatchInterval(timeInterval)) + public convenience init(qos: DispatchQoS, internalSerialQueueName: String = "rx.global_dispatch_queue.serial", leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { + self.init(queue: DispatchQueue.global(qos: qos.qosClass), internalSerialQueueName: internalSerialQueueName, leeway: leeway) } /** @@ -98,25 +87,14 @@ public class SerialDispatchQueueScheduler: SchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public final func schedule(state: StateType, action: (StateType) -> Disposable) -> Disposable { + public final func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { return self.scheduleInternal(state, action: action) } - - func scheduleInternal(state: StateType, action: (StateType) -> Disposable) -> Disposable { - let cancel = SingleAssignmentDisposable() - - dispatch_async(_serialQueue) { - if cancel.disposed { - return - } - - - cancel.disposable = action(state) - } - - return cancel + + func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { + return self.configuration.schedule(state, action: action) } - + /** Schedules an action to be executed. @@ -125,27 +103,8 @@ public class SerialDispatchQueueScheduler: SchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public final func scheduleRelative(state: StateType, dueTime: NSTimeInterval, action: (StateType) -> Disposable) -> Disposable { - let timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, _serialQueue) - - let dispatchInterval = MainScheduler.convertTimeIntervalToDispatchTime(dueTime) - - let compositeDisposable = CompositeDisposable() - - dispatch_source_set_timer(timer, dispatchInterval, DISPATCH_TIME_FOREVER, 0) - dispatch_source_set_event_handler(timer, { - if compositeDisposable.disposed { - return - } - compositeDisposable.addDisposable(action(state)) - }) - dispatch_resume(timer) - - compositeDisposable.addDisposable(AnonymousDisposable { - dispatch_source_cancel(timer) - }) - - return compositeDisposable + public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { + return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) } /** @@ -157,28 +116,7 @@ public class SerialDispatchQueueScheduler: SchedulerType { - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func schedulePeriodic(state: StateType, startAfter: TimeInterval, period: TimeInterval, action: (StateType) -> StateType) -> Disposable { - let timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, _serialQueue) - - let initial = MainScheduler.convertTimeIntervalToDispatchTime(startAfter) - let dispatchInterval = MainScheduler.convertTimeIntervalToDispatchInterval(period) - - var timerState = state - - let validDispatchInterval = dispatchInterval < 0 ? 0 : UInt64(dispatchInterval) - - dispatch_source_set_timer(timer, initial, validDispatchInterval, 0) - let cancel = AnonymousDisposable { - dispatch_source_cancel(timer) - } - dispatch_source_set_event_handler(timer, { - if cancel.disposed { - return - } - timerState = action(timerState) - }) - dispatch_resume(timer) - - return cancel + public func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { + return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift index ab506c4..f7aa87a 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift @@ -1,6 +1,6 @@ // // VirtualTimeConverterType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 12/23/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,35 +8,29 @@ import Foundation -/** -Parametrization for virtual time used by `VirtualTimeScheduler`s. -*/ +/// Parametrization for virtual time used by `VirtualTimeScheduler`s. public protocol VirtualTimeConverterType { - /** - Virtual time unit used that represents ticks of virtual clock. - */ + /// Virtual time unit used that represents ticks of virtual clock. associatedtype VirtualTimeUnit - /** - Virtual time unit used to represent differences of virtual times. - */ + /// Virtual time unit used to represent differences of virtual times. associatedtype VirtualTimeIntervalUnit /** Converts virtual time to real time. - - parameter virtualTime: Virtual time to convert to `NSDate`. - - returns: `NSDate` corresponding to virtual time. + - parameter virtualTime: Virtual time to convert to `Date`. + - returns: `Date` corresponding to virtual time. */ - func convertFromVirtualTime(virtualTime: VirtualTimeUnit) -> RxTime + func convertFromVirtualTime(_ virtualTime: VirtualTimeUnit) -> RxTime /** Converts real time to virtual time. - - parameter time: `NSDate` to convert to virtual time. - - returns: Virtual time corresponding to `NSDate`. + - parameter time: `Date` to convert to virtual time. + - returns: Virtual time corresponding to `Date`. */ - func convertToVirtualTime(time: RxTime) -> VirtualTimeUnit + func convertToVirtualTime(_ time: RxTime) -> VirtualTimeUnit /** Converts from virtual time interval to `NSTimeInterval`. @@ -44,7 +38,7 @@ public protocol VirtualTimeConverterType { - parameter virtualTimeInterval: Virtual time interval to convert to `NSTimeInterval`. - returns: `NSTimeInterval` corresponding to virtual time interval. */ - func convertFromVirtualTimeInterval(virtualTimeInterval: VirtualTimeIntervalUnit) -> RxTimeInterval + func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> RxTimeInterval /** Converts from virtual time interval to `NSTimeInterval`. @@ -52,7 +46,7 @@ public protocol VirtualTimeConverterType { - parameter timeInterval: `NSTimeInterval` to convert to virtual time interval. - returns: Virtual time interval corresponding to time interval. */ - func convertToVirtualTimeInterval(timeInterval: RxTimeInterval) -> VirtualTimeIntervalUnit + func convertToVirtualTimeInterval(_ timeInterval: RxTimeInterval) -> VirtualTimeIntervalUnit /** Offsets virtual time by virtual time interval. @@ -61,67 +55,43 @@ public protocol VirtualTimeConverterType { - parameter offset: Virtual time interval. - returns: Time corresponding to time offsetted by virtual time interval. */ - func offsetVirtualTime(time time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit + func offsetVirtualTime(_ time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit /** - This is aditional abstraction because `NSDate` is unfortunately not comparable. - Extending `NSDate` with `Comparable` would be too risky because of possible collisions with other libraries. + This is aditional abstraction because `Date` is unfortunately not comparable. + Extending `Date` with `Comparable` would be too risky because of possible collisions with other libraries. */ - func compareVirtualTime(lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison + func compareVirtualTime(_ lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison } /** Virtual time comparison result. - This is aditional abstraction because `NSDate` is unfortunately not comparable. - Extending `NSDate` with `Comparable` would be too risky because of possible collisions with other libraries. + This is aditional abstraction because `Date` is unfortunately not comparable. + Extending `Date` with `Comparable` would be too risky because of possible collisions with other libraries. */ public enum VirtualTimeComparison { - /** - lhs < rhs. - */ - case LessThan - /** - lhs == rhs. - */ - case Equal - /** - lhs > rhs. - */ - case GreaterThan + /// lhs < rhs. + case lessThan + /// lhs == rhs. + case equal + /// lhs > rhs. + case greaterThan } extension VirtualTimeComparison { - /** - lhs < rhs. - */ + /// lhs < rhs. var lessThen: Bool { - if case .LessThan = self { - return true - } - - return false + return self == .lessThan } - /** - lhs > rhs - */ + /// lhs > rhs var greaterThan: Bool { - if case .GreaterThan = self { - return true - } - - return false + return self == .greaterThan } - /** - lhs == rhs - */ + /// lhs == rhs var equal: Bool { - if case .Equal = self { - return true - } - - return false + return self == .equal } } diff --git a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift index 4171683..2956c4b 100644 --- a/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift +++ b/RxTableViewDemo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift @@ -1,6 +1,6 @@ // // VirtualTimeScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/14/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. @@ -8,12 +8,9 @@ import Foundation -/** -Base class for virtual time schedulers using a priority queue for scheduled items. -*/ -public class VirtualTimeScheduler - : SchedulerType - , CustomDebugStringConvertible { +/// Base class for virtual time schedulers using a priority queue for scheduled items. +open class VirtualTimeScheduler + : SchedulerType { public typealias VirtualTime = Converter.VirtualTimeUnit public typealias VirtualTimeInterval = Converter.VirtualTimeIntervalUnit @@ -22,46 +19,40 @@ public class VirtualTimeScheduler private var _clock: VirtualTime - private var _schedulerQueue : PriorityQueue> + fileprivate var _schedulerQueue : PriorityQueue> private var _converter: Converter private var _nextId = 0 - /** - - returns: Current time. - */ + /// - returns: Current time. public var now: RxTime { return _converter.convertFromVirtualTime(clock) } - /** - - returns: Scheduler's absolute time clock value. - */ + /// - returns: Scheduler's absolute time clock value. public var clock: VirtualTime { return _clock } - /** - Creates a new virtual time scheduler. - - - parameter initialClock: Initial value for the clock. - */ + /// Creates a new virtual time scheduler. + /// + /// - parameter initialClock: Initial value for the clock. public init(initialClock: VirtualTime, converter: Converter) { _clock = initialClock _running = false _converter = converter _schedulerQueue = PriorityQueue(hasHigherPriority: { switch converter.compareVirtualTime($0.time, $1.time) { - case .LessThan: + case .lessThan: return true - case .Equal: + case .equal: return $0.id < $1.id - case .GreaterThan: + case .greaterThan: return false } - }) + }, isEqual: { $0 === $1 }) #if TRACE_RESOURCES - AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif } @@ -72,7 +63,7 @@ public class VirtualTimeScheduler - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func schedule(state: StateType, action: StateType -> Disposable) -> Disposable { + public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { return self.scheduleRelative(state, dueTime: 0.0) { a in return action(a) } @@ -86,8 +77,8 @@ public class VirtualTimeScheduler - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func scheduleRelative(state: StateType, dueTime: RxTimeInterval, action: StateType -> Disposable) -> Disposable { - let time = self.now.dateByAddingTimeInterval(dueTime) + public func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { + let time = self.now.addingTimeInterval(dueTime) let absoluteTime = _converter.convertToVirtualTime(time) let adjustedTime = self.adjustScheduledTime(absoluteTime) return scheduleAbsoluteVirtual(state, time: adjustedTime, action: action) @@ -101,8 +92,8 @@ public class VirtualTimeScheduler - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func scheduleRelativeVirtual(state: StateType, dueTime: VirtualTimeInterval, action: StateType -> Disposable) -> Disposable { - let time = _converter.offsetVirtualTime(time: self.clock, offset: dueTime) + public func scheduleRelativeVirtual(_ state: StateType, dueTime: VirtualTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { + let time = _converter.offsetVirtualTime(self.clock, offset: dueTime) return scheduleAbsoluteVirtual(state, time: time, action: action) } @@ -114,7 +105,7 @@ public class VirtualTimeScheduler - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ - public func scheduleAbsoluteVirtual(state: StateType, time: Converter.VirtualTimeUnit, action: StateType -> Disposable) -> Disposable { + public func scheduleAbsoluteVirtual(_ state: StateType, time: Converter.VirtualTimeUnit, action: @escaping (StateType) -> Disposable) -> Disposable { MainScheduler.ensureExecutingOnScheduler() let compositeDisposable = CompositeDisposable() @@ -128,21 +119,17 @@ public class VirtualTimeScheduler _schedulerQueue.enqueue(item) - compositeDisposable.addDisposable(item) + _ = compositeDisposable.insert(item) return compositeDisposable } - /** - Adjusts time of scheduling before adding item to schedule queue. - */ - public func adjustScheduledTime(time: Converter.VirtualTimeUnit) -> Converter.VirtualTimeUnit { + /// Adjusts time of scheduling before adding item to schedule queue. + open func adjustScheduledTime(_ time: Converter.VirtualTimeUnit) -> Converter.VirtualTimeUnit { return time } - /** - Starts the virtual time scheduler. - */ + /// Starts the virtual time scheduler. public func start() { MainScheduler.ensureExecutingOnScheduler() @@ -169,7 +156,7 @@ public class VirtualTimeScheduler func findNext() -> VirtualSchedulerItem? { while let front = _schedulerQueue.peek() { - if front.disposed { + if front.isDisposed { _schedulerQueue.remove(front) continue } @@ -180,12 +167,10 @@ public class VirtualTimeScheduler return nil } - /** - Advances the scheduler's clock to the specified time, running all work till that point. - - - parameter virtualTime: Absolute time to advance the scheduler's clock to. - */ - public func advanceTo(virtualTime: VirtualTime) { + /// Advances the scheduler's clock to the specified time, running all work till that point. + /// + /// - parameter virtualTime: Absolute time to advance the scheduler's clock to. + public func advanceTo(_ virtualTime: VirtualTime) { MainScheduler.ensureExecutingOnScheduler() if _running { @@ -214,13 +199,11 @@ public class VirtualTimeScheduler _running = false } - /** - Advances the scheduler's clock by the specified relative time. - */ - public func sleep(virtualInterval: VirtualTimeInterval) { + /// Advances the scheduler's clock by the specified relative time. + public func sleep(_ virtualInterval: VirtualTimeInterval) { MainScheduler.ensureExecutingOnScheduler() - let sleepTo = _converter.offsetVirtualTime(time: clock, offset: virtualInterval) + let sleepTo = _converter.offsetVirtualTime(clock, offset: virtualInterval) if _converter.compareVirtualTime(sleepTo, clock).lessThen { fatalError("Can't sleep to past.") } @@ -228,9 +211,7 @@ public class VirtualTimeScheduler _clock = sleepTo } - /** - Stops the virtual time scheduler. - */ + /// Stops the virtual time scheduler. public func stop() { MainScheduler.ensureExecutingOnScheduler() @@ -239,17 +220,15 @@ public class VirtualTimeScheduler #if TRACE_RESOURCES deinit { - AtomicDecrement(&resourceCount) + _ = Resources.decrementTotal() } #endif } // MARK: description -extension VirtualTimeScheduler { - /** - A textual representation of `self`, suitable for debugging. - */ +extension VirtualTimeScheduler: CustomDebugStringConvertible { + /// A textual representation of `self`, suitable for debugging. public var debugDescription: String { return self._schedulerQueue.debugDescription } @@ -263,20 +242,20 @@ class VirtualSchedulerItem