├── LICENSE
├── README.md
├── RxSwiftAction
├── .gitignore
├── Podfile
├── RxSwiftAction.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftAction.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftAction.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── RxSwiftAction
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── RxSwiftCalculator
├── .gitignore
├── Podfile
├── RxSwiftCalculator.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftCalculator.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftCalculator.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── RxSwiftCalculator
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── RxSwiftCitySearch
├── .gitignore
├── Podfile
├── RxSwiftSearch.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftSearch.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftSearch.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── RxSwiftSearch
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── RxSwiftGesture
├── .gitignore
├── Podfile
├── RxSwiftGesture.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftGesture.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftGesture.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── RxSwiftGesture
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── RxSwiftMoya
├── .gitignore
├── Podfile
├── RxSwiftMoya.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftMoya.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftMoya.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── RxSwiftMoya
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Controller
│ └── ViewController.swift
│ ├── Extension
│ ├── Observable+ObjectMapper.swift
│ └── Response+ObjectMapper.swift
│ ├── Info.plist
│ ├── Mock
│ ├── UserList.json
│ └── UserListError.json
│ ├── Model
│ ├── Status.swift
│ └── User.swift
│ └── Network
│ └── UserAPI.swift
├── RxSwiftMultithreading
├── .gitignore
├── Podfile
├── RxSwiftMultithreading.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftMultithreading.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftMultithreading.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── RxSwiftMultithreading
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── Model
│ └── Repository.swift
│ ├── ViewController
│ └── ViewController.swift
│ └── ViewModel
│ └── SearchViewModel.swift
├── RxSwiftRegister
├── .gitignore
├── Podfile
├── RxSwiftRegister.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftRegister.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftRegister.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── RxSwiftRegister
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Controller
│ └── RegisterViewController.swift
│ ├── Extension
│ └── String+URL.swift
│ ├── Info.plist
│ ├── Model
│ └── ValidationResult.swift
│ ├── Network
│ └── Register
│ │ └── GitHubAPI.swift
│ ├── Service
│ └── ActivityIndicator.swift
│ └── ViewModel
│ └── RegisterViewModel.swift
├── RxSwiftRegisterDriver
├── .gitignore
├── Podfile
├── RxSwiftRegister.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftRegister.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftRegister.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── RxSwiftRegister
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Controller
│ └── LoginViewController.swift
│ ├── Extension
│ └── String+URL.swift
│ ├── Info.plist
│ ├── Model
│ └── ValidationResult.swift
│ ├── Network
│ └── Login
│ │ └── GitHubAPI.swift
│ ├── Service
│ └── ActivityIndicator.swift
│ └── ViewModel
│ └── LoginViewModel.swift
├── RxSwiftResult
├── .gitignore
├── Podfile
├── RxSwiftResult.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftResult.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftResult.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── RxSwiftResult
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── RxSwiftShareOrReplay
├── .gitignore
├── Podfile
├── RxSwiftShareOrReplay.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftShareOrReplay.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftShareOrReplay.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── RxSwiftShareOrReplay
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── RxSwiftSimpleTableView
├── .gitignore
├── Podfile
├── Podfile.lock
├── Pods
│ ├── Manifest.lock
│ ├── Pods.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── Pods-RxSwiftSimpleTableView.xcscheme
│ │ │ ├── RxCocoa.xcscheme
│ │ │ ├── RxSwift.xcscheme
│ │ │ └── xcschememanagement.plist
│ ├── RxCocoa
│ │ ├── LICENSE.md
│ │ ├── Platform
│ │ │ ├── DataStructures
│ │ │ │ ├── Bag.swift
│ │ │ │ ├── InfiniteSequence.swift
│ │ │ │ ├── PriorityQueue.swift
│ │ │ │ └── Queue.swift
│ │ │ ├── DispatchQueue+Extensions.swift
│ │ │ ├── Platform.Darwin.swift
│ │ │ ├── Platform.Linux.swift
│ │ │ └── RecursiveLock.swift
│ │ ├── README.md
│ │ └── RxCocoa
│ │ │ ├── CocoaUnits
│ │ │ ├── ControlEvent.swift
│ │ │ ├── ControlProperty.swift
│ │ │ ├── Driver
│ │ │ │ ├── ControlEvent+Driver.swift
│ │ │ │ ├── ControlProperty+Driver.swift
│ │ │ │ ├── Driver+Subscription.swift
│ │ │ │ ├── Driver.swift
│ │ │ │ ├── ObservableConvertibleType+Driver.swift
│ │ │ │ └── Variable+Driver.swift
│ │ │ ├── SharedSequence
│ │ │ │ ├── ObservableConvertibleType+SharedSequence.swift
│ │ │ │ ├── SharedSequence+Operators+arity.swift
│ │ │ │ ├── SharedSequence+Operators.swift
│ │ │ │ ├── SharedSequence.swift
│ │ │ │ └── Variable+SharedSequence.swift
│ │ │ └── UIBindingObserver.swift
│ │ │ ├── Common
│ │ │ ├── ControlTarget.swift
│ │ │ ├── DelegateProxy.swift
│ │ │ ├── DelegateProxyType.swift
│ │ │ ├── NSLayoutConstraint+Rx.swift
│ │ │ ├── Observable+Bind.swift
│ │ │ ├── RxCocoaObjCRuntimeError+Extensions.swift
│ │ │ ├── RxTarget.swift
│ │ │ ├── SectionedViewDataSourceType.swift
│ │ │ └── TextInput.swift
│ │ │ ├── Foundation
│ │ │ ├── KVORepresentable+CoreGraphics.swift
│ │ │ ├── KVORepresentable+Swift.swift
│ │ │ ├── KVORepresentable.swift
│ │ │ ├── Logging.swift
│ │ │ ├── NSObject+Rx+KVORepresentable.swift
│ │ │ ├── NSObject+Rx+RawRepresentable.swift
│ │ │ ├── NSObject+Rx.swift
│ │ │ ├── NotificationCenter+Rx.swift
│ │ │ └── URLSession+Rx.swift
│ │ │ ├── Runtime
│ │ │ ├── _RX.m
│ │ │ ├── _RXDelegateProxy.m
│ │ │ ├── _RXKVOObserver.m
│ │ │ ├── _RXObjCRuntime.m
│ │ │ └── include
│ │ │ │ ├── RxCocoaRuntime.h
│ │ │ │ ├── _RX.h
│ │ │ │ ├── _RXDelegateProxy.h
│ │ │ │ ├── _RXKVOObserver.h
│ │ │ │ └── _RXObjCRuntime.h
│ │ │ ├── RxCocoa.h
│ │ │ ├── RxCocoa.swift
│ │ │ └── iOS
│ │ │ ├── DataSources
│ │ │ ├── RxCollectionViewReactiveArrayDataSource.swift
│ │ │ └── RxTableViewReactiveArrayDataSource.swift
│ │ │ ├── Events
│ │ │ └── ItemEvents.swift
│ │ │ ├── NSTextStorage+Rx.swift
│ │ │ ├── Protocols
│ │ │ ├── RxCollectionViewDataSourceType.swift
│ │ │ └── RxTableViewDataSourceType.swift
│ │ │ ├── Proxies
│ │ │ ├── RxCollectionViewDataSourceProxy.swift
│ │ │ ├── RxCollectionViewDelegateProxy.swift
│ │ │ ├── RxPickerViewDelegateProxy.swift
│ │ │ ├── RxScrollViewDelegateProxy.swift
│ │ │ ├── RxSearchBarDelegateProxy.swift
│ │ │ ├── RxSearchControllerDelegateProxy.swift
│ │ │ ├── RxTabBarControllerDelegateProxy.swift
│ │ │ ├── RxTabBarDelegateProxy.swift
│ │ │ ├── RxTableViewDataSourceProxy.swift
│ │ │ ├── RxTableViewDelegateProxy.swift
│ │ │ ├── RxTextStorageDelegateProxy.swift
│ │ │ ├── RxTextViewDelegateProxy.swift
│ │ │ └── RxWebViewDelegateProxy.swift
│ │ │ ├── UIActivityIndicatorView+Rx.swift
│ │ │ ├── UIAlertAction+Rx.swift
│ │ │ ├── UIApplication+Rx.swift
│ │ │ ├── UIBarButtonItem+Rx.swift
│ │ │ ├── UIButton+Rx.swift
│ │ │ ├── UICollectionView+Rx.swift
│ │ │ ├── UIControl+Rx.swift
│ │ │ ├── UIDatePicker+Rx.swift
│ │ │ ├── UIGestureRecognizer+Rx.swift
│ │ │ ├── UIImageView+Rx.swift
│ │ │ ├── UILabel+Rx.swift
│ │ │ ├── UINavigationItem+Rx.swift
│ │ │ ├── UIPageControl+Rx.swift
│ │ │ ├── UIPickerView+Rx.swift
│ │ │ ├── UIProgressView+Rx.swift
│ │ │ ├── UIRefreshControl+Rx.swift
│ │ │ ├── UIScrollView+Rx.swift
│ │ │ ├── UISearchBar+Rx.swift
│ │ │ ├── UISearchController+Rx.swift
│ │ │ ├── UISegmentedControl+Rx.swift
│ │ │ ├── UISlider+Rx.swift
│ │ │ ├── UIStepper+Rx.swift
│ │ │ ├── UISwitch+Rx.swift
│ │ │ ├── UITabBar+Rx.swift
│ │ │ ├── UITabBarController+Rx.swift
│ │ │ ├── UITabBarItem+Rx.swift
│ │ │ ├── UITableView+Rx.swift
│ │ │ ├── UITextField+Rx.swift
│ │ │ ├── UITextView+Rx.swift
│ │ │ ├── UIView+Rx.swift
│ │ │ ├── UIViewController+Rx.swift
│ │ │ └── UIWebView+Rx.swift
│ ├── RxSwift
│ │ ├── LICENSE.md
│ │ ├── Platform
│ │ │ ├── DataStructures
│ │ │ │ ├── Bag.swift
│ │ │ │ ├── InfiniteSequence.swift
│ │ │ │ ├── PriorityQueue.swift
│ │ │ │ └── Queue.swift
│ │ │ ├── DispatchQueue+Extensions.swift
│ │ │ ├── Platform.Darwin.swift
│ │ │ ├── Platform.Linux.swift
│ │ │ └── RecursiveLock.swift
│ │ ├── README.md
│ │ └── RxSwift
│ │ │ ├── AnyObserver.swift
│ │ │ ├── Cancelable.swift
│ │ │ ├── Concurrency
│ │ │ ├── AsyncLock.swift
│ │ │ ├── Lock.swift
│ │ │ ├── LockOwnerType.swift
│ │ │ ├── SynchronizedDisposeType.swift
│ │ │ ├── SynchronizedOnType.swift
│ │ │ ├── SynchronizedSubscribeType.swift
│ │ │ └── SynchronizedUnsubscribeType.swift
│ │ │ ├── ConnectableObservableType.swift
│ │ │ ├── Disposable.swift
│ │ │ ├── Disposables
│ │ │ ├── AnonymousDisposable.swift
│ │ │ ├── BinaryDisposable.swift
│ │ │ ├── BooleanDisposable.swift
│ │ │ ├── CompositeDisposable.swift
│ │ │ ├── Disposables.swift
│ │ │ ├── DisposeBag.swift
│ │ │ ├── DisposeBase.swift
│ │ │ ├── NopDisposable.swift
│ │ │ ├── RefCountDisposable.swift
│ │ │ ├── ScheduledDisposable.swift
│ │ │ ├── SerialDisposable.swift
│ │ │ ├── SingleAssignmentDisposable.swift
│ │ │ └── SubscriptionDisposable.swift
│ │ │ ├── Errors.swift
│ │ │ ├── Event.swift
│ │ │ ├── Extensions
│ │ │ ├── Bag+Rx.swift
│ │ │ └── String+Rx.swift
│ │ │ ├── GroupedObservable.swift
│ │ │ ├── ImmediateSchedulerType.swift
│ │ │ ├── Observable.swift
│ │ │ ├── ObservableConvertibleType.swift
│ │ │ ├── ObservableType+Extensions.swift
│ │ │ ├── ObservableType.swift
│ │ │ ├── Observables
│ │ │ ├── Implementations
│ │ │ │ ├── AddRef.swift
│ │ │ │ ├── Amb.swift
│ │ │ │ ├── AnonymousObservable.swift
│ │ │ │ ├── Buffer.swift
│ │ │ │ ├── Catch.swift
│ │ │ │ ├── CombineLatest+Collection.swift
│ │ │ │ ├── CombineLatest+arity.swift
│ │ │ │ ├── CombineLatest.swift
│ │ │ │ ├── Concat.swift
│ │ │ │ ├── ConnectableObservable.swift
│ │ │ │ ├── Debounce.swift
│ │ │ │ ├── Debug.swift
│ │ │ │ ├── DefaultIfEmpty.swift
│ │ │ │ ├── Deferred.swift
│ │ │ │ ├── Delay.swift
│ │ │ │ ├── DelaySubscription.swift
│ │ │ │ ├── DistinctUntilChanged.swift
│ │ │ │ ├── Do.swift
│ │ │ │ ├── ElementAt.swift
│ │ │ │ ├── Empty.swift
│ │ │ │ ├── Error.swift
│ │ │ │ ├── Filter.swift
│ │ │ │ ├── Generate.swift
│ │ │ │ ├── GroupBy.swift
│ │ │ │ ├── Just.swift
│ │ │ │ ├── Map.swift
│ │ │ │ ├── Merge.swift
│ │ │ │ ├── Multicast.swift
│ │ │ │ ├── Never.swift
│ │ │ │ ├── ObserveOn.swift
│ │ │ │ ├── ObserveOnSerialDispatchQueue.swift
│ │ │ │ ├── Optional.swift
│ │ │ │ ├── Producer.swift
│ │ │ │ ├── Range.swift
│ │ │ │ ├── Reduce.swift
│ │ │ │ ├── RefCount.swift
│ │ │ │ ├── Repeat.swift
│ │ │ │ ├── RetryWhen.swift
│ │ │ │ ├── Sample.swift
│ │ │ │ ├── Scan.swift
│ │ │ │ ├── Sequence.swift
│ │ │ │ ├── ShareReplay1.swift
│ │ │ │ ├── ShareReplay1WhileConnected.swift
│ │ │ │ ├── SingleAsync.swift
│ │ │ │ ├── Sink.swift
│ │ │ │ ├── Skip.swift
│ │ │ │ ├── SkipUntil.swift
│ │ │ │ ├── SkipWhile.swift
│ │ │ │ ├── StartWith.swift
│ │ │ │ ├── SubscribeOn.swift
│ │ │ │ ├── Switch.swift
│ │ │ │ ├── SwitchIfEmpty.swift
│ │ │ │ ├── Take.swift
│ │ │ │ ├── TakeLast.swift
│ │ │ │ ├── TakeUntil.swift
│ │ │ │ ├── TakeWhile.swift
│ │ │ │ ├── Throttle.swift
│ │ │ │ ├── Timeout.swift
│ │ │ │ ├── Timer.swift
│ │ │ │ ├── ToArray.swift
│ │ │ │ ├── Using.swift
│ │ │ │ ├── Window.swift
│ │ │ │ ├── WithLatestFrom.swift
│ │ │ │ ├── Zip+Collection.swift
│ │ │ │ ├── Zip+arity.swift
│ │ │ │ └── Zip.swift
│ │ │ ├── Observable+Aggregate.swift
│ │ │ ├── Observable+Binding.swift
│ │ │ ├── Observable+Concurrency.swift
│ │ │ ├── Observable+Creation.swift
│ │ │ ├── Observable+Debug.swift
│ │ │ ├── Observable+Multiple.swift
│ │ │ ├── Observable+Single.swift
│ │ │ ├── Observable+StandardSequenceOperators.swift
│ │ │ └── Observable+Time.swift
│ │ │ ├── ObserverType.swift
│ │ │ ├── Observers
│ │ │ ├── AnonymousObserver.swift
│ │ │ ├── ObserverBase.swift
│ │ │ └── TailRecursiveSink.swift
│ │ │ ├── Reactive.swift
│ │ │ ├── Rx.swift
│ │ │ ├── RxMutableBox.swift
│ │ │ ├── SchedulerType.swift
│ │ │ ├── Schedulers
│ │ │ ├── ConcurrentDispatchQueueScheduler.swift
│ │ │ ├── ConcurrentMainScheduler.swift
│ │ │ ├── CurrentThreadScheduler.swift
│ │ │ ├── HistoricalScheduler.swift
│ │ │ ├── HistoricalSchedulerTimeConverter.swift
│ │ │ ├── ImmediateScheduler.swift
│ │ │ ├── Internal
│ │ │ │ ├── AnonymousInvocable.swift
│ │ │ │ ├── DispatchQueueConfiguration.swift
│ │ │ │ ├── InvocableScheduledItem.swift
│ │ │ │ ├── InvocableType.swift
│ │ │ │ ├── ScheduledItem.swift
│ │ │ │ └── ScheduledItemType.swift
│ │ │ ├── MainScheduler.swift
│ │ │ ├── OperationQueueScheduler.swift
│ │ │ ├── RecursiveScheduler.swift
│ │ │ ├── SchedulerServices+Emulation.swift
│ │ │ ├── SerialDispatchQueueScheduler.swift
│ │ │ ├── VirtualTimeConverterType.swift
│ │ │ └── VirtualTimeScheduler.swift
│ │ │ └── Subjects
│ │ │ ├── BehaviorSubject.swift
│ │ │ ├── PublishSubject.swift
│ │ │ ├── ReplaySubject.swift
│ │ │ ├── SubjectType.swift
│ │ │ └── Variable.swift
│ └── Target Support Files
│ │ ├── Pods-RxSwiftSimpleTableView
│ │ ├── Info.plist
│ │ ├── Pods-RxSwiftSimpleTableView-acknowledgements.markdown
│ │ ├── Pods-RxSwiftSimpleTableView-acknowledgements.plist
│ │ ├── Pods-RxSwiftSimpleTableView-dummy.m
│ │ ├── Pods-RxSwiftSimpleTableView-frameworks.sh
│ │ ├── Pods-RxSwiftSimpleTableView-resources.sh
│ │ ├── Pods-RxSwiftSimpleTableView-umbrella.h
│ │ ├── Pods-RxSwiftSimpleTableView.debug.xcconfig
│ │ ├── Pods-RxSwiftSimpleTableView.modulemap
│ │ └── Pods-RxSwiftSimpleTableView.release.xcconfig
│ │ ├── RxCocoa
│ │ ├── Info.plist
│ │ ├── RxCocoa-dummy.m
│ │ ├── RxCocoa-prefix.pch
│ │ ├── RxCocoa-umbrella.h
│ │ ├── RxCocoa.modulemap
│ │ └── RxCocoa.xcconfig
│ │ └── RxSwift
│ │ ├── Info.plist
│ │ ├── RxSwift-dummy.m
│ │ ├── RxSwift-prefix.pch
│ │ ├── RxSwift-umbrella.h
│ │ ├── RxSwift.modulemap
│ │ └── RxSwift.xcconfig
├── RxSwiftSimpleTableView.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftSimpleTableView.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftSimpleTableView.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── RxSwiftSimpleTableView
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── RxSwiftTableViewSection
├── .gitignore
├── Podfile
├── RxSwiftTableViewSection.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── monkey.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── xcschemes
│ │ ├── RxSwiftTableViewSection.xcscheme
│ │ └── xcschememanagement.plist
├── RxSwiftTableViewSection.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── RxSwiftTableViewSection
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
└── RxSwiftTwoWayBinding
├── .gitignore
├── Podfile
├── RxSwiftTwoWayBinding.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── monkey.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── monkey.xcuserdatad
│ └── xcschemes
│ ├── RxSwiftTwoWayBinding.xcscheme
│ └── xcschememanagement.plist
├── RxSwiftTwoWayBinding.xcworkspace
├── contents.xcworkspacedata
└── xcuserdata
│ └── monkey.xcuserdatad
│ ├── UserInterfaceState.xcuserstate
│ └── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
└── RxSwiftTwoWayBinding
├── AppDelegate.swift
├── Assets.xcassets
└── AppIcon.appiconset
│ └── Contents.json
├── Base.lproj
├── LaunchScreen.storyboard
└── Main.storyboard
├── Info.plist
├── Utils
└── Operators.swift
└── ViewController.swift
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Alone_Monkey
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RxSwiftStudy
2 |
3 |
4 | * [RxSwift学习之旅 - 初章](http://www.alonemonkey.com/2017/03/22/rxswift-part-one/)
5 |
6 | * [RxSwift学习之旅 - 被观察者和订阅者](http://www.alonemonkey.com/2017/03/23/rxswift-part-two/)
7 |
8 | * [RxSwift学习之旅 - 序列的基本操作](http://www.alonemonkey.com/2017/03/24/rxswift-part-three/)
9 |
10 | * [RxSwift学习之旅 - 加法运算](http://www.alonemonkey.com/2017/03/25/rxswift-part-four/)
11 |
12 | * [RxSwift学习之旅 - 用户注册](http://www.alonemonkey.com/2017/03/27/rxswift-part-five/)
13 |
14 | * [RxSwift学习之旅 - Observable 和 Driver](http://www.alonemonkey.com/2017/03/28/rxswift-part-six/)
15 |
16 | * [RxSwift学习之旅 - UITableView操作](http://www.alonemonkey.com/2017/03/29/rxswift-part-seven/)
17 |
18 | * [RxSwift学习之旅 - Moya + ObjectMapper](http://www.alonemonkey.com/2017/03/30/rxswift-part-eight/)
19 |
20 | * [RxSwift学习之旅 - 使用Result传递Error](http://www.alonemonkey.com/2017/03/31/rxswift-part-nine/)
21 |
22 | * [RxSwift学习之旅 - 双向绑定](http://www.alonemonkey.com/2017/04/01/rxswift-part-ten/)
23 |
24 | * [RxSwift学习之旅 - share vs replay vs shareReplay](http://www.alonemonkey.com/2017/04/02/rxswift-part-eleven/)
25 |
26 | * [RxSwift学习之旅 - 城市搜索](http://www.alonemonkey.com/2017/04/05/rxswift-part-twelve/)
27 |
28 | * [RxSwift学习之旅 - 多线程调度](http://www.alonemonkey.com/2017/04/06/rxswift-part-thirteen/)
29 |
30 | * [RxSwift学习之旅 - Action](http://www.alonemonkey.com/2017/04/08/rxswift-part-fourteen/)
31 |
32 | * [RxSwift学习之旅 - RxGesture](http://www.alonemonkey.com/2017/04/10/rxswift-part-fifteen/)
33 |
34 | 更新中......
--------------------------------------------------------------------------------
/RxSwiftAction/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftAction/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftAction' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 | pod 'Action'
8 |
9 | end
--------------------------------------------------------------------------------
/RxSwiftAction/RxSwiftAction.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftAction/RxSwiftAction.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftAction/RxSwiftAction.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftAction/RxSwiftAction.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftAction.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C0211F11E98A5AC00042EAC
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftAction/RxSwiftAction.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftAction/RxSwiftAction.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftAction/RxSwiftAction.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftAction/RxSwiftAction/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/RxSwiftAction/RxSwiftAction/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftCalculator/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftCalculator/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftCalculator' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 |
8 | end
--------------------------------------------------------------------------------
/RxSwiftCalculator/RxSwiftCalculator.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftCalculator/RxSwiftCalculator.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftCalculator/RxSwiftCalculator.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftCalculator/RxSwiftCalculator.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftCalculator.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8CACAF9E1E8668B1003D9858
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftCalculator/RxSwiftCalculator.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftCalculator/RxSwiftCalculator.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftCalculator/RxSwiftCalculator.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftCalculator/RxSwiftCalculator/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/RxSwiftCalculator/RxSwiftCalculator/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftCalculator/RxSwiftCalculator/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // RxSwiftCalculator
4 | //
5 | // Created by monkey on 2017/3/25.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import RxCocoa
11 | import RxSwift
12 |
13 | class ViewController: UIViewController {
14 |
15 | @IBOutlet weak var numberOne: UITextField!
16 | @IBOutlet weak var numberTwo: UITextField!
17 | @IBOutlet weak var numberThree: UITextField!
18 | @IBOutlet weak var result: UILabel!
19 |
20 | let disposeBag = DisposeBag()
21 |
22 | override func viewDidLoad() {
23 | super.viewDidLoad()
24 |
25 | numberOne.rx.text.orEmpty.asObservable()
26 | .filter{
27 | return $0 != ""
28 | }
29 | .subscribe{
30 | print($0)
31 | }.disposed(by: disposeBag)
32 |
33 | Observable.combineLatest(numberOne.rx.text.orEmpty,numberTwo.rx.text.orEmpty,numberThree.rx.text.orEmpty) { (numberOneText, numberTwoText, numberThreeText) -> Int in
34 | return (Int(numberOneText) ?? 0) + (Int(numberTwoText) ?? 0) + (Int(numberThreeText) ?? 0)
35 | }.map{
36 | $0.description
37 | }.bindTo(result.rx.text)
38 | .disposed(by: disposeBag)
39 | }
40 |
41 | override func didReceiveMemoryWarning() {
42 | super.didReceiveMemoryWarning()
43 | }
44 |
45 |
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/RxSwiftCitySearch/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftCitySearch/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftSearch' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 | pod 'RxDataSources'
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/RxSwiftCitySearch/RxSwiftSearch.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftCitySearch/RxSwiftSearch.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftCitySearch/RxSwiftSearch.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftCitySearch/RxSwiftSearch.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftSearch.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C615E8D1E94DB51007E2C84
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftCitySearch/RxSwiftSearch.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftCitySearch/RxSwiftSearch.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftCitySearch/RxSwiftSearch.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftCitySearch/RxSwiftSearch/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/RxSwiftCitySearch/RxSwiftSearch/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftGesture/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftGesture/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftGesture' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 | pod 'RxGesture'
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/RxSwiftGesture/RxSwiftGesture.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftGesture/RxSwiftGesture.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftGesture/RxSwiftGesture.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftGesture/RxSwiftGesture.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftGesture.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C0212491E9B747000042EAC
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftGesture/RxSwiftGesture.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftGesture/RxSwiftGesture.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftGesture/RxSwiftGesture.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftGesture/RxSwiftGesture/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/RxSwiftGesture/RxSwiftGesture/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftMoya/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftMoya/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftMoya' do
4 |
5 | pod 'Moya/RxSwift'
6 | pod 'Moya-ObjectMapper/RxSwift'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftMoya/RxSwiftMoya.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftMoya.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C01E78A1E8B931D00696869
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftMoya/RxSwiftMoya.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya.xcworkspace/xcuserdata/monkey.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
20 |
21 |
22 |
24 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya/Controller/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // RxSwiftMoya
4 | //
5 | // Created by monkey on 2017/3/29.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import RxSwift
11 | import Moya_ObjectMapper
12 |
13 | class ViewController: UIViewController {
14 |
15 | @IBOutlet weak var click: UIButton!
16 |
17 | let disposeBag = DisposeBag()
18 |
19 | override func viewDidLoad() {
20 | super.viewDidLoad()
21 |
22 | UserProvider
23 | .request(.list(0, 10))
24 | .mapResult(User.self)
25 | .subscribe{
26 | event in
27 | switch event{
28 | case .next(let users):
29 | for user in users{
30 | print("\(user.name) \(user.age)")
31 | }
32 | case .error(let error):
33 | var message = "出错了!"
34 | if let amerror = error as? AMError, let msg = amerror.message{
35 | message = msg
36 | }
37 | print(message)
38 | default:
39 | break
40 | }
41 | }
42 | .disposed(by: disposeBag)
43 | }
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya/Extension/Observable+ObjectMapper.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Observable+ObjectMapper.swift
3 | // RxSwiftMoya
4 | //
5 | // Created by monkey on 2017/3/29.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import RxSwift
11 | import Moya
12 | import ObjectMapper
13 |
14 | public extension ObservableType where E == Response {
15 | public func mapResult(_ type: T.Type, context: MapContext? = nil) -> Observable<[T]> {
16 | return flatMap { response -> Observable<[T]> in
17 | return Observable.just(try response.mapResult(T.self, context: context))
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya/Extension/Response+ObjectMapper.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Response+ObjectMapper.swift
3 | // RxSwiftMoya
4 | //
5 | // Created by monkey on 2017/3/29.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import Moya
11 | import ObjectMapper
12 | import Moya_ObjectMapper
13 |
14 | enum AMError: Swift.Error {
15 | case ParseResultError(Status)
16 | }
17 |
18 | extension AMError: LocalizedError {
19 | public var message: String? {
20 | switch self {
21 | case .ParseResultError(let status):
22 | return status.message
23 | }
24 | }
25 | }
26 |
27 | public extension Response {
28 | public func mapResult(_ type: T.Type, context: MapContext? = nil) throws -> [T] {
29 |
30 | let status = try mapObject(Status.self)
31 |
32 | guard let array = status.result as? [[String : Any]], let objects = Mapper(context: context).mapArray(JSONArray: array) else {
33 | throw AMError.ParseResultError(status)
34 | }
35 |
36 | return objects
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | NSAppTransportSecurity
38 |
39 | NSAllowsArbitraryLoads
40 |
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya/Mock/UserList.json:
--------------------------------------------------------------------------------
1 | {
2 | "code": 200,
3 | "message": "message",
4 | "result": [
5 | {
6 | "name": "AloneMonkey",
7 | "age": 18
8 | },
9 | {
10 | "name": "AloneMonkey",
11 | "age": 18
12 | },
13 | {
14 | "name": "AloneMonkey",
15 | "age": 17
16 | },
17 | {
18 | "name": "Coder",
19 | "age": 18
20 | },
21 | {
22 | "name": "AloneMonkey",
23 | "age": 18
24 | },
25 | {
26 | "name": "AloneMonkey",
27 | "age": 16
28 | },
29 | {
30 | "name": "AloneMonkey",
31 | "age": 18
32 | },
33 | {
34 | "name": "Hello",
35 | "age": 13
36 | },
37 | {
38 | "name": "AloneMonkey",
39 | "age": 18
40 | },
41 | {
42 | "name": "AloneMonkey",
43 | "age": 18
44 | }
45 | ]
46 | }
47 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya/Mock/UserListError.json:
--------------------------------------------------------------------------------
1 | {
2 | "code": 300,
3 | "message": "这里发生了错误"
4 | }
5 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya/Model/Status.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Status.swift
3 | // RxSwiftMoya
4 | //
5 | // Created by monkey on 2017/3/29.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import ObjectMapper
11 |
12 | struct Status : Mappable{
13 | var code : Int!
14 | var message : String?
15 | var result : Any?
16 |
17 | init?(map: Map) {}
18 |
19 | mutating func mapping(map: Map) {
20 | code <- map["code"]
21 | message <- map["message"]
22 | result <- map["result"]
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya/Model/User.swift:
--------------------------------------------------------------------------------
1 | //
2 | // User.swift
3 | // RxSwiftMoya
4 | //
5 | // Created by monkey on 2017/3/29.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import ObjectMapper
11 |
12 | struct User : Mappable{
13 | var name: String!
14 | var age: Int!
15 |
16 | init?(map: Map) {}
17 |
18 | mutating func mapping(map: Map){
19 | name <- map["name"]
20 | age <- map["age"]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/RxSwiftMoya/RxSwiftMoya/Network/UserAPI.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UserAPI.swift
3 | // RxSwiftMoya
4 | //
5 | // Created by monkey on 2017/3/29.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import Moya
11 |
12 | let UserProvider = RxMoyaProvider(stubClosure: MoyaProvider.immediatelyStub)
13 |
14 | enum UserAPI{
15 | case list(Int,Int)
16 | }
17 |
18 | extension UserAPI : TargetType{
19 | var baseURL : URL{
20 | return URL(string: "http://www.alonemonkey.com")!
21 | }
22 |
23 | var path: String{
24 | switch self {
25 | case .list:
26 | return "userlist"
27 | }
28 | }
29 |
30 | var method: Moya.Method{
31 | switch self {
32 | case .list:
33 | return .get
34 | }
35 | }
36 |
37 | var parameters: [String: Any]?{
38 | switch self{
39 | case .list(let start, let size):
40 | return ["start": start, "size": size]
41 | }
42 | }
43 |
44 | var parameterEncoding: ParameterEncoding{
45 | return URLEncoding.default
46 | }
47 |
48 | var task: Task{
49 | return .request
50 | }
51 |
52 | var sampleData: Data{
53 | switch self {
54 | case .list(_, _):
55 | if let path = Bundle.main.path(forResource: "UserList", ofType: "json") {
56 | do {
57 | let data = try Data(contentsOf: URL(fileURLWithPath: path), options: .alwaysMapped)
58 | return data
59 | } catch let error {
60 | print(error.localizedDescription)
61 | }
62 | }
63 | return Data()
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/RxSwiftMultithreading/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftMultithreading/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftMultithreading' do
4 |
5 | pod 'RxAlamofire/RxCocoa'
6 | pod 'ObjectMapper'
7 |
8 | end
--------------------------------------------------------------------------------
/RxSwiftMultithreading/RxSwiftMultithreading.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftMultithreading/RxSwiftMultithreading.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftMultithreading/RxSwiftMultithreading.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftMultithreading/RxSwiftMultithreading.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftMultithreading.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8CCA431C1E9686470050E588
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftMultithreading/RxSwiftMultithreading.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftMultithreading/RxSwiftMultithreading.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftMultithreading/RxSwiftMultithreading.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftMultithreading/RxSwiftMultithreading/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/RxSwiftMultithreading/RxSwiftMultithreading/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftMultithreading/RxSwiftMultithreading/Model/Repository.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Repository.swift
3 | // RxSwiftMultithreading
4 | //
5 | // Created by monkey on 2017/4/6.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import ObjectMapper
10 |
11 | class Repository: Mappable {
12 | var identifier: Int!
13 | var language: String!
14 | var url: String!
15 | var name: String!
16 |
17 | required init?(map: Map) { }
18 |
19 | func mapping(map: Map) {
20 | identifier <- map["id"]
21 | language <- map["language"]
22 | url <- map["url"]
23 | name <- map["name"]
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/RxSwiftRegister/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftRegister/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftRegister' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 |
8 | end
--------------------------------------------------------------------------------
/RxSwiftRegister/RxSwiftRegister.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftRegister/RxSwiftRegister.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftRegister/RxSwiftRegister.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftRegister/RxSwiftRegister.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftRegister.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C5601A11E87EFE8006914CF
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftRegister/RxSwiftRegister.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftRegister/RxSwiftRegister.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftRegister/RxSwiftRegister.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftRegister/RxSwiftRegister/Extension/String+URL.swift:
--------------------------------------------------------------------------------
1 | //
2 | // String+URL.swift
3 | // RxSwiftRegister
4 | //
5 | // Created by monkey on 2017/3/27.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | extension String {
10 | var URLEscaped: String {
11 | return self.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) ?? ""
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/RxSwiftRegister/RxSwiftRegister/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftRegister/RxSwiftRegister/Network/Register/GitHubAPI.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GitHubAPI.swift
3 | // RxSwiftRegister
4 | //
5 | // Created by monkey on 2017/3/27.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import RxSwift
11 | import RxCocoa
12 |
13 | class GitHubAPI{
14 | let URLSession: URLSession
15 |
16 | static let sharedAPI = GitHubAPI(
17 | URLSession: Foundation.URLSession.shared
18 | )
19 |
20 | init(URLSession: URLSession){
21 | self.URLSession = URLSession
22 | }
23 |
24 | func usernameAvailable(_ username: String) -> Observable{
25 | let url = URL(string: "https://github.com/\(username.URLEscaped)")!
26 | let request = URLRequest(url: url)
27 | return self.URLSession.rx.response(request: request)
28 | .map{
29 | (response, _) in
30 | return response.statusCode == 404
31 | }
32 | .catchErrorJustReturn(false)
33 | }
34 |
35 | func register(_ username: String, password: String) -> Observable{
36 | let registerResult = arc4random() % 5 == 0 ? false : true
37 | return Observable.just(registerResult)
38 | .delay(1.0, scheduler: MainScheduler.instance) //延迟一秒
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/RxSwiftRegisterDriver/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftRegisterDriver/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftRegister' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 |
8 | end
--------------------------------------------------------------------------------
/RxSwiftRegisterDriver/RxSwiftRegister.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftRegisterDriver/RxSwiftRegister.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftRegisterDriver/RxSwiftRegister.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftRegisterDriver/RxSwiftRegister.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftRegister.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C5601A11E87EFE8006914CF
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftRegisterDriver/RxSwiftRegister.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftRegisterDriver/RxSwiftRegister.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftRegisterDriver/RxSwiftRegister.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftRegisterDriver/RxSwiftRegister/Extension/String+URL.swift:
--------------------------------------------------------------------------------
1 | //
2 | // String+URL.swift
3 | // RxSwiftRegister
4 | //
5 | // Created by monkey on 2017/3/27.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | extension String {
10 | var URLEscaped: String {
11 | return self.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) ?? ""
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/RxSwiftRegisterDriver/RxSwiftRegister/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftRegisterDriver/RxSwiftRegister/Network/Login/GitHubAPI.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GitHubAPI.swift
3 | // RxSwiftRegister
4 | //
5 | // Created by monkey on 2017/3/27.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import RxSwift
11 | import RxCocoa
12 |
13 | class GitHubAPI{
14 | let URLSession: URLSession
15 |
16 | static let sharedAPI = GitHubAPI(
17 | URLSession: Foundation.URLSession.shared
18 | )
19 |
20 | init(URLSession: URLSession){
21 | self.URLSession = URLSession
22 | }
23 |
24 | func usernameAvailable(_ username: String) -> Observable{
25 | let url = URL(string: "https://github.com/\(username.URLEscaped)")!
26 | let request = URLRequest(url: url)
27 | return self.URLSession.rx.response(request: request)
28 | .map{
29 | (response, _) in
30 | return response.statusCode == 404
31 | }
32 | .catchErrorJustReturn(false)
33 | }
34 |
35 | func register(_ username: String, password: String) -> Observable{
36 | let registerResult = arc4random() % 5 == 0 ? false : true
37 | return Observable.just(registerResult)
38 | .delay(1.0, scheduler: MainScheduler.instance) //延迟一秒
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/RxSwiftResult/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftResult/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftResult' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 | pod 'RxSwiftExt'
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/RxSwiftResult/RxSwiftResult.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftResult/RxSwiftResult.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftResult/RxSwiftResult.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftResult/RxSwiftResult.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftResult.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C01E7C11E8BEC7900696869
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftResult/RxSwiftResult.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftResult/RxSwiftResult.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftResult/RxSwiftResult.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftResult/RxSwiftResult.xcworkspace/xcuserdata/monkey.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/RxSwiftResult/RxSwiftResult/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/RxSwiftResult/RxSwiftResult/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftShareOrReplay/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftShareOrReplay/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftShareOrReplay' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/RxSwiftShareOrReplay/RxSwiftShareOrReplay.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftShareOrReplay/RxSwiftShareOrReplay.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftShareOrReplay/RxSwiftShareOrReplay.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftShareOrReplay/RxSwiftShareOrReplay.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftShareOrReplay.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C5EF8D11E8DF61300467454
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftShareOrReplay/RxSwiftShareOrReplay.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftShareOrReplay/RxSwiftShareOrReplay.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftShareOrReplay/RxSwiftShareOrReplay.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftShareOrReplay/RxSwiftShareOrReplay/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/RxSwiftShareOrReplay/RxSwiftShareOrReplay/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftSimpleTableView' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 |
8 | end
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - RxCocoa (3.2.0):
3 | - RxSwift (~> 3.1)
4 | - RxSwift (3.2.0)
5 |
6 | DEPENDENCIES:
7 | - RxCocoa
8 | - RxSwift
9 |
10 | SPEC CHECKSUMS:
11 | RxCocoa: ccdf43101a70407097a29082f648ba1676075b30
12 | RxSwift: 46574f70d416b7923c237195939cc488a7fbf3a0
13 |
14 | PODFILE CHECKSUM: 0274b259e5358f572973a6f2d85f0cc1923b61d3
15 |
16 | COCOAPODS: 1.1.1
17 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - RxCocoa (3.2.0):
3 | - RxSwift (~> 3.1)
4 | - RxSwift (3.2.0)
5 |
6 | DEPENDENCIES:
7 | - RxCocoa
8 | - RxSwift
9 |
10 | SPEC CHECKSUMS:
11 | RxCocoa: ccdf43101a70407097a29082f648ba1676075b30
12 | RxSwift: 46574f70d416b7923c237195939cc488a7fbf3a0
13 |
14 | PODFILE CHECKSUM: 0274b259e5358f572973a6f2d85f0cc1923b61d3
15 |
16 | COCOAPODS: 1.1.1
17 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Pods.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Pods-RxSwiftSimpleTableView.xcscheme
8 |
9 | isShown
10 |
11 |
12 | RxCocoa.xcscheme
13 |
14 | isShown
15 |
16 |
17 | RxSwift.xcscheme
18 |
19 | isShown
20 |
21 |
22 |
23 | SuppressBuildableAutocreation
24 |
25 | 185468E65C893C52601EB15A562BBEA3
26 |
27 | primary
28 |
29 |
30 | 796AD19E0A6431609B789501B8BC6F4F
31 |
32 | primary
33 |
34 |
35 | B905CB10DF6C92449EC538FF23CAAE60
36 |
37 | primary
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/LICENSE.md:
--------------------------------------------------------------------------------
1 | **The MIT License**
2 | **Copyright © 2015 Krunoslav Zaher**
3 | **All rights reserved.**
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/Platform/DataStructures/InfiniteSequence.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InfiniteSequence.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 6/13/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Sequence that repeats `repeatedValue` infinite number of times.
10 | struct InfiniteSequence : Sequence {
11 | typealias Element = E
12 | typealias Iterator = AnyIterator
13 |
14 | private let _repeatedValue: E
15 |
16 | init(repeatedValue: E) {
17 | _repeatedValue = repeatedValue
18 | }
19 |
20 | func makeIterator() -> Iterator {
21 | let repeatedValue = _repeatedValue
22 | return AnyIterator {
23 | return repeatedValue
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/Platform/DispatchQueue+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DispatchQueue+Extensions.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 10/22/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Dispatch
10 |
11 | extension DispatchQueue {
12 | private static var token: DispatchSpecificKey<()> = {
13 | let key = DispatchSpecificKey<()>()
14 | DispatchQueue.main.setSpecific(key: key, value: ())
15 | return key
16 | }()
17 |
18 | static var isMain: Bool {
19 | return DispatchQueue.getSpecific(key: token) != nil
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/Platform/RecursiveLock.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RecursiveLock.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 12/18/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | typealias RecursiveLock = NSRecursiveLock
12 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ControlEvent+Driver.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ControlEvent+Driver.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 9/19/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if !RX_NO_MODULE
10 | import RxSwift
11 | #endif
12 |
13 | extension ControlEvent {
14 | /// Converts `ControlEvent` to `Driver` unit.
15 | ///
16 | /// `ControlEvent` already can't fail, so no special case needs to be handled.
17 | public func asDriver() -> Driver {
18 | return self.asDriver { (error) -> Driver in
19 | #if DEBUG
20 | rxFatalError("Somehow driver received error from a source that shouldn't fail.")
21 | #else
22 | return Driver.empty()
23 | #endif
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/ControlProperty+Driver.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ControlProperty+Driver.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 9/19/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if !RX_NO_MODULE
10 | import RxSwift
11 | #endif
12 |
13 | extension ControlProperty {
14 | /// Converts `ControlProperty` to `Driver` unit.
15 | ///
16 | /// `ControlProperty` already can't fail, so no special case needs to be handled.
17 | public func asDriver() -> Driver {
18 | return self.asDriver { (error) -> Driver in
19 | #if DEBUG
20 | rxFatalError("Somehow driver received error from a source that shouldn't fail.")
21 | #else
22 | return Driver.empty()
23 | #endif
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Variable+Driver.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Variable+Driver.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 12/28/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if !RX_NO_MODULE
10 | import RxSwift
11 | #endif
12 |
13 | extension Variable {
14 | /// Converts `Variable` to `Driver` unit.
15 | ///
16 | /// - returns: Driving observable sequence.
17 | public func asDriver() -> Driver {
18 | let source = self.asObservable()
19 | .observeOn(DriverSharingStrategy.scheduler)
20 | return Driver(source)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/CocoaUnits/SharedSequence/Variable+SharedSequence.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Variable+SharedSequence.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 12/28/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if !RX_NO_MODULE
10 | import RxSwift
11 | #endif
12 |
13 | extension Variable {
14 | /// Converts `Variable` to `SharedSequence` unit.
15 | ///
16 | /// - returns: Observable sequence.
17 | public func asSharedSequence(strategy: SharingStrategy.Type = SharingStrategy.self) -> SharedSequence {
18 | let source = self.asObservable()
19 | .observeOn(SharingStrategy.scheduler)
20 | return SharedSequence(source)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Common/NSLayoutConstraint+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 12/6/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if !os(Linux)
10 |
11 | #if os(macOS)
12 | import Cocoa
13 | #else
14 | import UIKit
15 | #endif
16 |
17 | #if !RX_NO_MODULE
18 | import RxSwift
19 | #endif
20 |
21 | #if os(iOS) || os(macOS) || os(tvOS)
22 | extension Reactive where Base: NSLayoutConstraint {
23 | /// Bindable sink for `constant` property.
24 | public var constant: UIBindingObserver {
25 | return UIBindingObserver(UIElement: self.base) { constraint, constant in
26 | constraint.constant = constant
27 | }
28 | }
29 |
30 | /// Bindable sink for `active` property.
31 | @available(iOS 8, OSX 10.10, *)
32 | public var active: UIBindingObserver {
33 | return UIBindingObserver(UIElement: self.base) { constraint, value in
34 | constraint.isActive = value
35 | }
36 | }
37 | }
38 |
39 | #endif
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Common/RxTarget.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxTarget.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 7/12/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import class Foundation.NSObject
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 |
15 | class RxTarget : NSObject
16 | , Disposable {
17 |
18 | private var retainSelf: RxTarget?
19 |
20 | override init() {
21 | super.init()
22 | self.retainSelf = self
23 |
24 | #if TRACE_RESOURCES
25 | _ = Resources.incrementTotal()
26 | #endif
27 |
28 | #if DEBUG
29 | MainScheduler.ensureExecutingOnScheduler()
30 | #endif
31 | }
32 |
33 | func dispose() {
34 | #if DEBUG
35 | MainScheduler.ensureExecutingOnScheduler()
36 | #endif
37 | self.retainSelf = nil
38 | }
39 |
40 | #if TRACE_RESOURCES
41 | deinit {
42 | _ = Resources.decrementTotal()
43 | }
44 | #endif
45 | }
46 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Common/SectionedViewDataSourceType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SectionedViewDataSourceType.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 1/10/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import struct Foundation.IndexPath
10 |
11 | /// Data source with access to underlying sectioned model.
12 | public protocol SectionedViewDataSourceType {
13 | /// Returns model at index path.
14 | ///
15 | /// In case data source doesn't contain any sections when this method is being called, `RxCocoaError.ItemsNotYetBound(object: self)` is thrown.
16 |
17 | /// - parameter indexPath: Model index path
18 | /// - returns: Model at index path.
19 | func model(at indexPath: IndexPath) throws -> Any
20 | }
21 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // KVORepresentable.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 11/14/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Type that is KVO representable (KVO mechanism can be used to observe it).
10 | public protocol KVORepresentable {
11 | /// Associated KVO type.
12 | associatedtype KVOType
13 |
14 | /// Constructs `Self` using KVO value.
15 | init?(KVOValue: KVOType)
16 | }
17 |
18 | extension KVORepresentable {
19 | /// Initializes `KVORepresentable` with optional value.
20 | init?(KVOValue: KVOType?) {
21 | guard let KVOValue = KVOValue else {
22 | return nil
23 | }
24 |
25 | self.init(KVOValue: KVOValue)
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Foundation/Logging.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Logging.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 4/3/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import struct Foundation.URLRequest
10 |
11 | /// Simple logging settings for RxCocoa library.
12 | public struct Logging {
13 | public typealias LogURLRequest = (URLRequest) -> Bool
14 |
15 | /// Log URL requests to standard output in curl format.
16 | public static var URLRequests: LogURLRequest = { _ in
17 | #if DEBUG
18 | return true
19 | #else
20 | return false
21 | #endif
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Foundation/NSObject+Rx+KVORepresentable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+Rx+KVORepresentable.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 11/14/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if !os(Linux)
10 |
11 | import Foundation
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | extension Reactive where Base: NSObject {
17 |
18 | /**
19 | Specialization of generic `observe` method.
20 |
21 | This is a special overload because to observe values of some type (for example `Int`), first values of KVO type
22 | need to be observed (`NSNumber`), and then converted to result type.
23 |
24 | For more information take a look at `observe` method.
25 | */
26 | public func observe(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial], retainSelf: Bool = true) -> Observable {
27 | return observe(E.KVOType.self, keyPath, options: options, retainSelf: retainSelf)
28 | .map(E.init)
29 | }
30 | }
31 |
32 | #if !DISABLE_SWIZZLING && !os(Linux)
33 | // KVO
34 | extension Reactive where Base: NSObject {
35 | /**
36 | Specialization of generic `observeWeakly` method.
37 |
38 | For more information take a look at `observeWeakly` method.
39 | */
40 | public func observeWeakly(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial]) -> Observable {
41 | return observeWeakly(E.KVOType.self, keyPath, options: options)
42 | .map(E.init)
43 | }
44 | }
45 | #endif
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Foundation/NotificationCenter+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NotificationCenter+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 5/2/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import class Foundation.NotificationCenter
10 | import struct Foundation.Notification
11 |
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | extension Reactive where Base: NotificationCenter {
17 | /**
18 | Transforms notifications posted to notification center to observable sequence of notifications.
19 |
20 | - parameter name: Optional name used to filter notifications.
21 | - parameter object: Optional object used to filter notifications.
22 | - returns: Observable sequence of posted notifications.
23 | */
24 | public func notification(_ name: Notification.Name?, object: AnyObject? = nil) -> Observable {
25 | return Observable.create { [weak object] observer in
26 | let nsObserver = self.base.addObserver(forName: name, object: object, queue: nil) { notification in
27 | observer.on(.next(notification))
28 | }
29 |
30 | return Disposables.create {
31 | self.base.removeObserver(nsObserver)
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Runtime/_RX.m:
--------------------------------------------------------------------------------
1 | //
2 | // _RX.m
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 7/12/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import "include/_RX.h"
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Runtime/_RXKVOObserver.m:
--------------------------------------------------------------------------------
1 | //
2 | // _RXKVOObserver.m
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 7/11/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import "include/_RXKVOObserver.h"
10 |
11 | @interface _RXKVOObserver ()
12 |
13 | @property (nonatomic, unsafe_unretained) id target;
14 | @property (nonatomic, strong ) id retainedTarget;
15 | @property (nonatomic, copy ) NSString *keyPath;
16 | @property (nonatomic, copy ) void (^callback)(id);
17 |
18 | @end
19 |
20 | @implementation _RXKVOObserver
21 |
22 | -(instancetype)initWithTarget:(id)target
23 | retainTarget:(BOOL)retainTarget
24 | keyPath:(NSString*)keyPath
25 | options:(NSKeyValueObservingOptions)options
26 | callback:(void (^)(id))callback {
27 | self = [super init];
28 | if (!self) return nil;
29 |
30 | self.target = target;
31 | if (retainTarget) {
32 | self.retainedTarget = target;
33 | }
34 | self.keyPath = keyPath;
35 | self.callback = callback;
36 |
37 | [self.target addObserver:self forKeyPath:self.keyPath options:options context:nil];
38 |
39 | return self;
40 | }
41 |
42 | -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
43 | @synchronized(self) {
44 | self.callback(change[NSKeyValueChangeNewKey]);
45 | }
46 | }
47 |
48 | -(void)dispose {
49 | [self.target removeObserver:self forKeyPath:self.keyPath context:nil];
50 | self.target = nil;
51 | self.retainedTarget = nil;
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Runtime/include/RxCocoaRuntime.h:
--------------------------------------------------------------------------------
1 | //
2 | // RxCocoaRuntime.h
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 2/21/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "_RX.h"
11 | #import "_RXDelegateProxy.h"
12 | #import "_RXKVOObserver.h"
13 | #import "_RXObjCRuntime.h"
14 |
15 | //! Project version number for RxCocoa.
16 | FOUNDATION_EXPORT double RxCocoaVersionNumber;
17 |
18 | //! Project version string for RxCocoa.
19 | FOUNDATION_EXPORT const unsigned char RxCocoaVersionString[];
20 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Runtime/include/_RXDelegateProxy.h:
--------------------------------------------------------------------------------
1 | //
2 | // _RXDelegateProxy.h
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 7/4/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface _RXDelegateProxy : NSObject
14 |
15 | @property (nonatomic, weak, readonly) id _forwardToDelegate;
16 |
17 | -(void)_setForwardToDelegate:(id __nullable)forwardToDelegate retainDelegate:(BOOL)retainDelegate;
18 |
19 | -(BOOL)hasWiredImplementationForSelector:(SEL)selector;
20 |
21 | -(void)_sentMessage:(SEL)selector withArguments:(NSArray*)arguments;
22 | -(void)_methodInvoked:(SEL)selector withArguments:(NSArray*)arguments;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/Runtime/include/_RXKVOObserver.h:
--------------------------------------------------------------------------------
1 | //
2 | // _RXKVOObserver.h
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 7/11/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | ################################################################################
13 | This file is part of RX private API
14 | ################################################################################
15 | */
16 |
17 | // Exists because if written in Swift, reading unowned is disabled during dealloc process
18 | @interface _RXKVOObserver : NSObject
19 |
20 | -(instancetype)initWithTarget:(id)target
21 | retainTarget:(BOOL)retainTarget
22 | keyPath:(NSString*)keyPath
23 | options:(NSKeyValueObservingOptions)options
24 | callback:(void (^)(id))callback;
25 |
26 | -(void)dispose;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/RxCocoa.h:
--------------------------------------------------------------------------------
1 | //
2 | // RxCocoa.h
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 2/21/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "_RX.h"
11 | #import "_RXDelegateProxy.h"
12 | #import "_RXKVOObserver.h"
13 | #import "_RXObjCRuntime.h"
14 |
15 | //! Project version number for RxCocoa.
16 | FOUNDATION_EXPORT double RxCocoaVersionNumber;
17 |
18 | //! Project version string for RxCocoa.
19 | FOUNDATION_EXPORT const unsigned char RxCocoaVersionString[];
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ItemEvents.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 6/20/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 |
12 | public typealias ItemMovedEvent = (sourceIndex: IndexPath, destinationIndex: IndexPath)
13 | public typealias WillDisplayCellEvent = (cell: UITableViewCell, indexPath: IndexPath)
14 | public typealias DidEndDisplayingCellEvent = (cell: UITableViewCell, indexPath: IndexPath)
15 | #endif
16 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxCollectionViewDataSourceType.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 6/29/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | /// Marks data source as `UICollectionView` reactive data source enabling it to be used with one of the `bindTo` methods.
17 | public protocol RxCollectionViewDataSourceType /*: UICollectionViewDataSource*/ {
18 |
19 | /// Type of elements that can be bound to collection view.
20 | associatedtype Element
21 |
22 | /// New observable sequence event observed.
23 | ///
24 | /// - parameter collectionView: Bound collection view.
25 | /// - parameter observedEvent: Event
26 | func collectionView(_ collectionView: UICollectionView, observedEvent: Event) -> Void
27 | }
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxTableViewDataSourceType.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 6/26/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | /// Marks data source as `UITableView` reactive data source enabling it to be used with one of the `bindTo` methods.
17 | public protocol RxTableViewDataSourceType /*: UITableViewDataSource*/ {
18 |
19 | /// Type of elements that can be bound to table view.
20 | associatedtype Element
21 |
22 | /// New observable sequence event observed.
23 | ///
24 | /// - parameter tableView: Bound table view.
25 | /// - parameter observedEvent: Event
26 | func tableView(_ tableView: UITableView, observedEvent: Event) -> Void
27 | }
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxCollectionViewDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 6/29/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | /// For more information take a look at `DelegateProxyType`.
17 | public class RxCollectionViewDelegateProxy
18 | : RxScrollViewDelegateProxy
19 | , UICollectionViewDelegate
20 | , UICollectionViewDelegateFlowLayout {
21 |
22 | /// Typed parent object.
23 | public weak private(set) var collectionView: UICollectionView?
24 |
25 | /// Initializes `RxCollectionViewDelegateProxy`
26 | ///
27 | /// - parameter parentObject: Parent object for delegate proxy.
28 | public required init(parentObject: AnyObject) {
29 | self.collectionView = castOrFatalError(parentObject)
30 | super.init(parentObject: parentObject)
31 | }
32 | }
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxPickerViewDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxPickerViewDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Segii Shulga on 5/12/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | public class RxPickerViewDelegateProxy
17 | : DelegateProxy
18 | , DelegateProxyType
19 | , UIPickerViewDelegate {
20 |
21 | /// For more information take a look at `DelegateProxyType`.
22 | public override class func createProxyForObject(_ object: AnyObject) -> AnyObject {
23 | let pickerView: UIPickerView = castOrFatalError(object)
24 | return pickerView.createRxDelegateProxy()
25 | }
26 |
27 | /// For more information take a look at `DelegateProxyType`.
28 | public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) {
29 | let pickerView: UIPickerView = castOrFatalError(object)
30 | pickerView.delegate = castOptionalOrFatalError(delegate)
31 | }
32 |
33 | /// For more information take a look at `DelegateProxyType`.
34 | public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? {
35 | let pickerView: UIPickerView = castOrFatalError(object)
36 | return pickerView.delegate
37 | }
38 | }
39 | #endif
40 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxSearchBarDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 7/4/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | /// For more information take a look at `DelegateProxyType`.
17 | public class RxSearchBarDelegateProxy
18 | : DelegateProxy
19 | , UISearchBarDelegate
20 | , DelegateProxyType {
21 |
22 | /// For more information take a look at `DelegateProxyType`.
23 | public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? {
24 | let searchBar: UISearchBar = castOrFatalError(object)
25 | return searchBar.delegate
26 | }
27 |
28 | /// For more information take a look at `DelegateProxyType`.
29 | public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) {
30 | let searchBar: UISearchBar = castOrFatalError(object)
31 | searchBar.delegate = castOptionalOrFatalError(delegate)
32 | }
33 |
34 | // MARK: Delegate proxy methods
35 |
36 | #if os(iOS)
37 | /// For more information take a look at `DelegateProxyType`.
38 | public override class func createProxyForObject(_ object: AnyObject) -> AnyObject {
39 | let searchBar: UISearchBar = castOrFatalError(object)
40 | return searchBar.createRxDelegateProxy()
41 | }
42 | #endif
43 |
44 | }
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxSearchControllerDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxSearchControllerDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Segii Shulga on 3/17/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | /// For more information take a look at `DelegateProxyType`.
17 | @available(iOS 8.0, *)
18 | public class RxSearchControllerDelegateProxy
19 | : DelegateProxy
20 | , DelegateProxyType
21 | , UISearchControllerDelegate {
22 |
23 | /// For more information take a look at `DelegateProxyType`.
24 | public override class func createProxyForObject(_ object: AnyObject) -> AnyObject {
25 | let pickerView: UISearchController = castOrFatalError(object)
26 | return pickerView.createRxDelegateProxy()
27 | }
28 |
29 | /// For more information take a look at `DelegateProxyType`.
30 | public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) {
31 | let searchController: UISearchController = castOrFatalError(object)
32 | searchController.delegate = castOptionalOrFatalError(delegate)
33 | }
34 |
35 | /// For more information take a look at `DelegateProxyType`.
36 | public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? {
37 | let searchController: UISearchController = castOrFatalError(object)
38 | return searchController.delegate
39 | }
40 |
41 | }
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarControllerDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxTabBarControllerDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Yusuke Kita on 2016/12/07.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 |
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | /// For more information take a look at `DelegateProxyType`.
17 | public class RxTabBarControllerDelegateProxy
18 | : DelegateProxy
19 | , UITabBarControllerDelegate
20 | , DelegateProxyType {
21 |
22 | /// For more information take a look at `DelegateProxyType`.
23 | public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? {
24 | let tabBarController: UITabBarController = castOrFatalError(object)
25 | return tabBarController.delegate
26 | }
27 |
28 | /// For more information take a look at `DelegateProxyType`.
29 | public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) {
30 | let tabBarController: UITabBarController = castOrFatalError(object)
31 | tabBarController.delegate = castOptionalOrFatalError(delegate)
32 | }
33 |
34 | /// For more information take a look at `DelegateProxyType`.
35 | public override class func createProxyForObject(_ object: AnyObject) -> AnyObject {
36 | let tabBarController: UITabBarController = castOrFatalError(object)
37 | return tabBarController.createRxDelegateProxy()
38 | }
39 | }
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTabBarDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxTabBarDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Jesse Farless on 5/14/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 |
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | /// For more information take a look at `DelegateProxyType`.
17 | public class RxTabBarDelegateProxy
18 | : DelegateProxy
19 | , UITabBarDelegate
20 | , DelegateProxyType {
21 |
22 | /// For more information take a look at `DelegateProxyType`.
23 | public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? {
24 | let tabBar: UITabBar = castOrFatalError(object)
25 | return tabBar.delegate
26 | }
27 |
28 | /// For more information take a look at `DelegateProxyType`.
29 | public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) {
30 | let tabBar: UITabBar = castOrFatalError(object)
31 | tabBar.delegate = castOptionalOrFatalError(delegate)
32 | }
33 |
34 | /// For more information take a look at `DelegateProxyType`.
35 | public override class func createProxyForObject(_ object: AnyObject) -> AnyObject {
36 | let tabBar: UITabBar = castOrFatalError(object)
37 | return tabBar.createRxDelegateProxy()
38 | }
39 |
40 | }
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxTableViewDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 6/15/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | /// For more information take a look at `DelegateProxyType`.
17 | public class RxTableViewDelegateProxy
18 | : RxScrollViewDelegateProxy
19 | , UITableViewDelegate {
20 |
21 |
22 | /// Typed parent object.
23 | public weak private(set) var tableView: UITableView?
24 |
25 | /// Initializes `RxTableViewDelegateProxy`
26 | ///
27 | /// - parameter parentObject: Parent object for delegate proxy.
28 | public required init(parentObject: AnyObject) {
29 | self.tableView = castOrFatalError(parentObject)
30 | super.init(parentObject: parentObject)
31 | }
32 |
33 | }
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextStorageDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxTextStorageDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Segii Shulga on 12/30/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | public class RxTextStorageDelegateProxy
17 | : DelegateProxy
18 | , DelegateProxyType
19 | , NSTextStorageDelegate {
20 |
21 | /// For more information take a look at `DelegateProxyType`.
22 | public override class func createProxyForObject(_ object: AnyObject) -> AnyObject {
23 | let pickerView: NSTextStorage = castOrFatalError(object)
24 | return pickerView.createRxDelegateProxy()
25 | }
26 |
27 | /// For more information take a look at `DelegateProxyType`.
28 | public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) {
29 | let textStorage: NSTextStorage = castOrFatalError(object)
30 | textStorage.delegate = castOptionalOrFatalError(delegate)
31 | }
32 |
33 | /// For more information take a look at `DelegateProxyType`.
34 | public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? {
35 | let textStorage: NSTextStorage = castOrFatalError(object)
36 | return textStorage.delegate
37 | }
38 | }
39 | #endif
40 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTextViewDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxTextViewDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Yuta ToKoRo on 7/19/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | /// For more information take a look at `DelegateProxyType`.
17 | public class RxTextViewDelegateProxy
18 | : RxScrollViewDelegateProxy
19 | , UITextViewDelegate {
20 |
21 | /// Typed parent object.
22 | public weak private(set) var textView: UITextView?
23 |
24 | /// Initializes `RxTextViewDelegateProxy`
25 | ///
26 | /// - parameter parentObject: Parent object for delegate proxy.
27 | public required init(parentObject: AnyObject) {
28 | self.textView = castOrFatalError(parentObject)
29 | super.init(parentObject: parentObject)
30 | }
31 |
32 | // MARK: delegate methods
33 |
34 | /// For more information take a look at `DelegateProxyType`.
35 | @objc public func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
36 | /**
37 | We've had some issues with observing text changes. This is here just in case we need the same hack in future and that
38 | we wouldn't need to change the public interface.
39 | */
40 | let forwardToDelegate = self.forwardToDelegate() as? UITextViewDelegate
41 | return forwardToDelegate?.textView?(textView,
42 | shouldChangeTextIn: range,
43 | replacementText: text) ?? true
44 | }
45 | }
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxWebViewDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxWebViewDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Andrew Breckenridge on 9/26/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 | import UIKit
11 |
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | public class RxWebViewDelegateProxy
17 | : DelegateProxy
18 | , DelegateProxyType
19 | , UIWebViewDelegate {
20 |
21 | /// For more information take a look at `DelegateProxyType`.
22 | public override class func createProxyForObject(_ object: AnyObject) -> AnyObject {
23 | let pickerView: UIWebView = castOrFatalError(object)
24 | return pickerView.createRxDelegateProxy()
25 | }
26 |
27 | /// For more information take a look at `DelegateProxyType`.
28 | public class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) {
29 | let webView: UIWebView = castOrFatalError(object)
30 | webView.delegate = castOptionalOrFatalError(delegate)
31 | }
32 |
33 | /// For more information take a look at `DelegateProxyType`.
34 | public class func currentDelegateFor(_ object: AnyObject) -> AnyObject? {
35 | let webView: UIWebView = castOrFatalError(object)
36 | return webView.delegate
37 | }
38 |
39 |
40 | }
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIActivityIndicatorView+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIActivityIndicatorView+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Ivan Persidskiy on 02/12/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 |
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | extension Reactive where Base: UIActivityIndicatorView {
17 |
18 | /// Bindable sink for `startAnimating()`, `stopAnimating()` methods.
19 | public var isAnimating: UIBindingObserver {
20 | return UIBindingObserver(UIElement: self.base) { activityIndicator, active in
21 | if active {
22 | activityIndicator.startAnimating()
23 | } else {
24 | activityIndicator.stopAnimating()
25 | }
26 | }
27 | }
28 |
29 | }
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIAlertAction+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIAlertAction+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Andrew Breckenridge on 5/7/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 |
13 | #if !RX_NO_MODULE
14 | import RxSwift
15 | #endif
16 |
17 | extension Reactive where Base: UIAlertAction {
18 |
19 | /// Bindable sink for `enabled` property.
20 | public var isEnabled: UIBindingObserver {
21 | return UIBindingObserver(UIElement: self.base) { alertAction, value in
22 | alertAction.isEnabled = value
23 | }
24 | }
25 |
26 | }
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIApplication+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIApplication+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Mads Bøgeskov on 18/01/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 | import UIKit
11 |
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | extension Reactive where Base: UIApplication {
17 |
18 | /// Bindable sink for `networkActivityIndicatorVisible`.
19 | public var isNetworkActivityIndicatorVisible: UIBindingObserver {
20 | return UIBindingObserver(UIElement: self.base) { application, active in
21 | application.isNetworkActivityIndicatorVisible = active
22 | }
23 | }
24 | }
25 | #endif
26 |
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIButton+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIButton+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 3/28/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | extension Reactive where Base: UIButton {
17 |
18 | /// Reactive wrapper for `TouchUpInside` control event.
19 | public var tap: ControlEvent {
20 | return controlEvent(.touchUpInside)
21 | }
22 | }
23 |
24 | #endif
25 |
26 | #if os(tvOS)
27 |
28 | #if !RX_NO_MODULE
29 | import RxSwift
30 | #endif
31 | import UIKit
32 |
33 | extension Reactive where Base: UIButton {
34 |
35 | /// Reactive wrapper for `PrimaryActionTriggered` control event.
36 | public var primaryAction: ControlEvent {
37 | return controlEvent(.primaryActionTriggered)
38 | }
39 |
40 | }
41 |
42 | #endif
43 |
44 | #if os(iOS) || os(tvOS)
45 |
46 | #if !RX_NO_MODULE
47 | import RxSwift
48 | #endif
49 | import UIKit
50 |
51 | extension Reactive where Base: UIButton {
52 |
53 | /// Reactive wrapper for `setTitle(_:controlState:)`
54 | public func title(for controlState: UIControlState = []) -> UIBindingObserver {
55 | return UIBindingObserver(UIElement: self.base) { (button, title) -> () in
56 | button.setTitle(title, for: controlState)
57 | }
58 | }
59 |
60 | }
61 | #endif
62 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIDatePicker+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIDatePicker+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Daniel Tartaglia on 5/31/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | extension Reactive where Base: UIDatePicker {
17 | /// Reactive wrapper for `date` property.
18 | public var date: ControlProperty {
19 | return value
20 | }
21 |
22 | /// Reactive wrapper for `date` property.
23 | public var value: ControlProperty {
24 | return UIControl.rx.value(
25 | self.base,
26 | getter: { datePicker in
27 | datePicker.date
28 | }, setter: { datePicker, value in
29 | datePicker.date = value
30 | }
31 | )
32 | }
33 |
34 | }
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIImageView+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIImageView+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 4/1/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | extension Reactive where Base: UIImageView {
17 |
18 | /// Bindable sink for `image` property.
19 | public var image: UIBindingObserver {
20 | return image(transitionType: nil)
21 | }
22 |
23 | /// Bindable sink for `image` property.
24 |
25 | /// - parameter transitionType: Optional transition type while setting the image (kCATransitionFade, kCATransitionMoveIn, ...)
26 | public func image(transitionType: String? = nil) -> UIBindingObserver {
27 | return UIBindingObserver(UIElement: base) { imageView, image in
28 | if let transitionType = transitionType {
29 | if image != nil {
30 | let transition = CATransition()
31 | transition.duration = 0.25
32 | transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
33 | transition.type = transitionType
34 | imageView.layer.add(transition, forKey: kCATransition)
35 | }
36 | }
37 | else {
38 | imageView.layer.removeAllAnimations()
39 | }
40 | imageView.image = image
41 | }
42 | }
43 | }
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UILabel+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UILabel+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 4/1/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | extension Reactive where Base: UILabel {
17 |
18 | /// Bindable sink for `text` property.
19 | public var text: UIBindingObserver {
20 | return UIBindingObserver(UIElement: self.base) { label, text in
21 | label.text = text
22 | }
23 | }
24 |
25 | /// Bindable sink for `attributedText` property.
26 | public var attributedText: UIBindingObserver {
27 | return UIBindingObserver(UIElement: self.base) { label, text in
28 | label.attributedText = text
29 | }
30 | }
31 |
32 | }
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UINavigationItem+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UINavigationItem+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by kumapo on 2016/05/09.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | extension Reactive where Base: UINavigationItem {
17 |
18 | /// Bindable sink for `title` property.
19 | public var title: UIBindingObserver {
20 | return UIBindingObserver(UIElement: self.base) { navigationItem, text in
21 | navigationItem.title = text
22 | }
23 | }
24 |
25 | }
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIPageControl+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIPageControl+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Francesco Puntillo on 14/04/2016.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | extension Reactive where Base: UIPageControl {
17 |
18 | /// Bindable sink for `currentPage` property.
19 | public var currentPage: UIBindingObserver {
20 | return UIBindingObserver(UIElement: self.base) { controller, page in
21 | controller.currentPage = page
22 | }
23 | }
24 |
25 | /// Bindable sink for `numberOfPages` property.
26 | public var numberOfPages: UIBindingObserver {
27 | return UIBindingObserver(UIElement: self.base) { controller, page in
28 | controller.numberOfPages = page
29 | }
30 | }
31 |
32 | }
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIPickerView+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIPickerView+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Segii Shulga on 5/12/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | extension UIPickerView {
17 |
18 | /// Factory method that enables subclasses to implement their own `delegate`.
19 | ///
20 | /// - returns: Instance of delegate proxy that wraps `delegate`.
21 | public func createRxDelegateProxy() -> RxPickerViewDelegateProxy {
22 | return RxPickerViewDelegateProxy(parentObject: self)
23 | }
24 |
25 | }
26 |
27 | extension Reactive where Base: UIPickerView {
28 |
29 | /// Reactive wrapper for `delegate`.
30 | /// For more information take a look at `DelegateProxyType` protocol documentation.
31 | public var delegate: DelegateProxy {
32 | return RxPickerViewDelegateProxy.proxyForObject(base)
33 | }
34 |
35 | public var itemSelected: ControlEvent<(Int, Int)> {
36 | let source = delegate
37 | .methodInvoked(#selector(UIPickerViewDelegate.pickerView(_:didSelectRow:inComponent:)))
38 | .map {
39 | return (try castOrThrow(Int.self, $0[1]), try castOrThrow(Int.self, $0[2]))
40 | }
41 | return ControlEvent(events: source)
42 | }
43 | }
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIProgressView+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIProgressView+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Samuel Bae on 2/27/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | extension Reactive where Base: UIProgressView {
17 |
18 | /// Bindable sink for `progress` property
19 | public var progress: UIBindingObserver {
20 | return UIBindingObserver(UIElement: self.base) { progressView, progress in
21 | progressView.progress = progress
22 | }
23 | }
24 |
25 | }
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIRefreshControl+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIRefreshControl+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Yosuke Ishikawa on 1/31/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 | import UIKit
11 |
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | extension Reactive where Base: UIRefreshControl {
17 |
18 | /// Bindable sink for `beginRefreshing()`, `endRefreshing()` methods.
19 | @available(*, deprecated, renamed: "isRefreshing")
20 | public var refreshing: UIBindingObserver {
21 | return self.isRefreshing
22 | }
23 |
24 | /// Bindable sink for `beginRefreshing()`, `endRefreshing()` methods.
25 | public var isRefreshing: UIBindingObserver {
26 | return UIBindingObserver(UIElement: self.base) { refreshControl, refresh in
27 | if refresh {
28 | refreshControl.beginRefreshing()
29 | } else {
30 | refreshControl.endRefreshing()
31 | }
32 | }
33 | }
34 |
35 | }
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UISegmentedControl+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UISegmentedControl+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Carlos García on 8/7/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 |
17 | extension Reactive where Base: UISegmentedControl {
18 | /// Reactive wrapper for `selectedSegmentIndex` property.
19 | public var selectedSegmentIndex: ControlProperty {
20 | return value
21 | }
22 |
23 | /// Reactive wrapper for `selectedSegmentIndex` property.
24 | public var value: ControlProperty {
25 | return UIControl.rx.value(
26 | self.base,
27 | getter: { segmentedControl in
28 | segmentedControl.selectedSegmentIndex
29 | }, setter: { segmentedControl, value in
30 | segmentedControl.selectedSegmentIndex = value
31 | }
32 | )
33 | }
34 |
35 | }
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UISlider+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UISlider+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Alexander van der Werff on 28/05/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | extension Reactive where Base: UISlider {
17 |
18 | /// Reactive wrapper for `value` property.
19 | public var value: ControlProperty {
20 | return UIControl.rx.value(
21 | self.base,
22 | getter: { slider in
23 | slider.value
24 | }, setter: { slider, value in
25 | slider.value = value
26 | }
27 | )
28 | }
29 |
30 | }
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIStepper+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIStepper+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Yuta ToKoRo on 9/1/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | extension Reactive where Base: UIStepper {
17 |
18 | /// Reactive wrapper for `value` property.
19 | public var value: ControlProperty {
20 | return UIControl.rx.value(
21 | self.base,
22 | getter: { stepper in
23 | stepper.value
24 | }, setter: { stepper, value in
25 | stepper.value = value
26 | }
27 | )
28 | }
29 |
30 | }
31 |
32 | #endif
33 |
34 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UISwitch+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UISwitch+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Carlos García on 8/7/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 |
17 | extension Reactive where Base: UISwitch {
18 |
19 | /// Reactive wrapper for `isOn` property.
20 | public var isOn: ControlProperty {
21 | return value
22 | }
23 |
24 | /**
25 | Reactive wrapper for `isOn` property.
26 |
27 | **⚠️ Versions prior to iOS 10.2 were leaking `UIButton`s, so on those versions
28 | underlying observable sequence won't complete when nothing holds a strong reference
29 | to UISwitch.⚠️**
30 | */
31 | public var value: ControlProperty {
32 | return UIControl.rx.value(
33 | self.base,
34 | getter: { uiSwitch in
35 | uiSwitch.isOn
36 | }, setter: { uiSwitch, value in
37 | uiSwitch.isOn = value
38 | }
39 | )
40 | }
41 |
42 | }
43 |
44 | #endif
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UITabBarItem+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UITabBarItem+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Mateusz Derks on 04/03/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | extension Reactive where Base: UITabBarItem {
17 |
18 | /// Bindable sink for `badgeValue` property.
19 | public var badgeValue: UIBindingObserver {
20 | return UIBindingObserver(UIElement: self.base) { tabBarItem, badgeValue in
21 | tabBarItem.badgeValue = badgeValue
22 | }
23 | }
24 |
25 | }
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UITextField+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UITextField+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 2/21/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | #if !RX_NO_MODULE
12 | import RxSwift
13 | #endif
14 | import UIKit
15 |
16 | extension Reactive where Base: UITextField {
17 | /// Reactive wrapper for `text` property.
18 | public var text: ControlProperty {
19 | return value
20 | }
21 |
22 | /// Reactive wrapper for `text` property.
23 | public var value: ControlProperty {
24 | return UIControl.rx.value(
25 | base,
26 | getter: { textField in
27 | textField.text
28 | }, setter: { textField, value in
29 | // This check is important because setting text value always clears control state
30 | // including marked text selection which is imporant for proper input
31 | // when IME input method is used.
32 | if textField.text != value {
33 | textField.text = value
34 | }
35 | }
36 | )
37 | }
38 |
39 | }
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIView+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 12/6/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | extension Reactive where Base: UIView {
17 | /// Bindable sink for `hidden` property.
18 | public var isHidden: UIBindingObserver {
19 | return UIBindingObserver(UIElement: self.base) { view, hidden in
20 | view.isHidden = hidden
21 | }
22 | }
23 |
24 | /// Bindable sink for `alpha` property.
25 | public var alpha: UIBindingObserver {
26 | return UIBindingObserver(UIElement: self.base) { view, alpha in
27 | view.alpha = alpha
28 | }
29 | }
30 | }
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxCocoa/RxCocoa/iOS/UIViewController+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Kyle Fuller on 27/05/2016.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 | import UIKit
11 |
12 | #if !RX_NO_MODULE
13 | import RxSwift
14 | #endif
15 |
16 | extension Reactive where Base: UIViewController {
17 |
18 | /// Bindable sink for `title`.
19 | public var title: UIBindingObserver {
20 | return UIBindingObserver(UIElement: self.base) { viewController, title in
21 | viewController.title = title
22 | }
23 | }
24 |
25 | }
26 | #endif
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/LICENSE.md:
--------------------------------------------------------------------------------
1 | **The MIT License**
2 | **Copyright © 2015 Krunoslav Zaher**
3 | **All rights reserved.**
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InfiniteSequence.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 6/13/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Sequence that repeats `repeatedValue` infinite number of times.
10 | struct InfiniteSequence : Sequence {
11 | typealias Element = E
12 | typealias Iterator = AnyIterator
13 |
14 | private let _repeatedValue: E
15 |
16 | init(repeatedValue: E) {
17 | _repeatedValue = repeatedValue
18 | }
19 |
20 | func makeIterator() -> Iterator {
21 | let repeatedValue = _repeatedValue
22 | return AnyIterator {
23 | return repeatedValue
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DispatchQueue+Extensions.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 10/22/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Dispatch
10 |
11 | extension DispatchQueue {
12 | private static var token: DispatchSpecificKey<()> = {
13 | let key = DispatchSpecificKey<()>()
14 | DispatchQueue.main.setSpecific(key: key, value: ())
15 | return key
16 | }()
17 |
18 | static var isMain: Bool {
19 | return DispatchQueue.getSpecific(key: token) != nil
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/Platform/RecursiveLock.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RecursiveLock.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 12/18/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | typealias RecursiveLock = NSRecursiveLock
12 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Cancelable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Cancelable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 3/12/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents disposable resource with state tracking.
10 | public protocol Cancelable : Disposable {
11 | /// Was resource disposed.
12 | var isDisposed: Bool { get }
13 | }
14 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Concurrency/Lock.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Lock.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 3/31/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol Lock {
10 | func lock()
11 | func unlock()
12 | }
13 |
14 | // https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html
15 | typealias SpinLock = RecursiveLock
16 |
17 | extension RecursiveLock : Lock {
18 | @inline(__always)
19 | final func performLocked(_ action: () -> Void) {
20 | lock(); defer { unlock() }
21 | action()
22 | }
23 |
24 | @inline(__always)
25 | final func calculateLocked(_ action: () -> T) -> T {
26 | lock(); defer { unlock() }
27 | return action()
28 | }
29 |
30 | @inline(__always)
31 | final func calculateLockedOrFail(_ action: () throws -> T) throws -> T {
32 | lock(); defer { unlock() }
33 | let result = try action()
34 | return result
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LockOwnerType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol LockOwnerType : class, Lock {
10 | var _lock: RecursiveLock { get }
11 | }
12 |
13 | extension LockOwnerType {
14 | func lock() {
15 | _lock.lock()
16 | }
17 |
18 | func unlock() {
19 | _lock.unlock()
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SynchronizedDisposeType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol SynchronizedDisposeType : class, Disposable, Lock {
10 | func _synchronized_dispose()
11 | }
12 |
13 | extension SynchronizedDisposeType {
14 | func synchronizedDispose() {
15 | lock(); defer { unlock() }
16 | _synchronized_dispose()
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SynchronizedOnType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol SynchronizedOnType : class, ObserverType, Lock {
10 | func _synchronized_on(_ event: Event)
11 | }
12 |
13 | extension SynchronizedOnType {
14 | func synchronizedOn(_ event: Event) {
15 | lock(); defer { unlock() }
16 | _synchronized_on(event)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SynchronizedSubscribeType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol SynchronizedSubscribeType : class, ObservableType, Lock {
10 | func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == E
11 | }
12 |
13 | extension SynchronizedSubscribeType {
14 | func synchronizedSubscribe(_ observer: O) -> Disposable where O.E == E {
15 | lock(); defer { unlock() }
16 | return _synchronized_subscribe(observer)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SynchronizedUnsubscribeType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol SynchronizedUnsubscribeType : class {
10 | associatedtype DisposeKey
11 |
12 | func synchronizedUnsubscribe(_ disposeKey: DisposeKey)
13 | }
14 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/ConnectableObservableType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ConnectableObservableType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 3/1/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /**
10 | Represents an observable sequence wrapper that can be connected and disconnected from its underlying observable sequence.
11 | */
12 | public protocol ConnectableObservableType : ObservableType {
13 | /**
14 | Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established.
15 |
16 | - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence.
17 | */
18 | func connect() -> Disposable
19 | }
20 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Disposable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Disposable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/8/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Respresents a disposable resource.
10 | public protocol Disposable {
11 | /// Dispose resource.
12 | func dispose()
13 | }
14 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BinaryDisposable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 6/12/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents two disposable resources that are disposed together.
10 | private final class BinaryDisposable : DisposeBase, Cancelable {
11 |
12 | private var _isDisposed: AtomicInt = 0
13 |
14 | // state
15 | private var _disposable1: Disposable?
16 | private var _disposable2: Disposable?
17 |
18 | /// - returns: Was resource disposed.
19 | var isDisposed: Bool {
20 | return _isDisposed > 0
21 | }
22 |
23 | /// Constructs new binary disposable from two disposables.
24 | ///
25 | /// - parameter disposable1: First disposable
26 | /// - parameter disposable2: Second disposable
27 | init(_ disposable1: Disposable, _ disposable2: Disposable) {
28 | _disposable1 = disposable1
29 | _disposable2 = disposable2
30 | super.init()
31 | }
32 |
33 | /// Calls the disposal action if and only if the current instance hasn't been disposed yet.
34 | ///
35 | /// After invoking disposal action, disposal action will be dereferenced.
36 | func dispose() {
37 | if AtomicCompareAndSwap(0, 1, &_isDisposed) {
38 | _disposable1?.dispose()
39 | _disposable2?.dispose()
40 | _disposable1 = nil
41 | _disposable2 = nil
42 | }
43 | }
44 | }
45 |
46 | extension Disposables {
47 |
48 | /// Creates a disposable with the given disposables.
49 | public static func create(_ disposable1: Disposable, _ disposable2: Disposable) -> Cancelable {
50 | return BinaryDisposable(disposable1, disposable2)
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BooleanDisposable.swift
3 | // RxSwift
4 | //
5 | // Created by Junior B. on 10/29/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents a disposable resource that can be checked for disposal status.
10 | public final class BooleanDisposable : Disposable, Cancelable {
11 |
12 | internal static let BooleanDisposableTrue = BooleanDisposable(isDisposed: true)
13 | private var _isDisposed = false
14 |
15 | /// Initializes a new instance of the `BooleanDisposable` class
16 | public init() {
17 | }
18 |
19 | /// Initializes a new instance of the `BooleanDisposable` class with given value
20 | public init(isDisposed: Bool) {
21 | self._isDisposed = isDisposed
22 | }
23 |
24 | /// - returns: Was resource disposed.
25 | public var isDisposed: Bool {
26 | return _isDisposed
27 | }
28 |
29 | /// Sets the status to disposed, which can be observer through the `isDisposed` property.
30 | public func dispose() {
31 | _isDisposed = true
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Disposables/Disposables.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Disposables.swift
3 | // RxSwift
4 | //
5 | // Created by Mohsen Ramezanpoor on 01/08/2016.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// A collection of utility methods for common disposable operations.
10 | public struct Disposables {
11 | private init() {}
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DisposeBase.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 4/4/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Base class for all disposables.
10 | public class DisposeBase {
11 | init() {
12 | #if TRACE_RESOURCES
13 | let _ = Resources.incrementTotal()
14 | #endif
15 | }
16 |
17 | deinit {
18 | #if TRACE_RESOURCES
19 | let _ = Resources.decrementTotal()
20 | #endif
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NopDisposable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/15/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents a disposable that does nothing on disposal.
10 | ///
11 | /// Nop = No Operation
12 | fileprivate struct NopDisposable : Disposable {
13 |
14 | fileprivate static let noOp: Disposable = NopDisposable()
15 |
16 | fileprivate init() {
17 |
18 | }
19 |
20 | /// Does nothing.
21 | public func dispose() {
22 | }
23 | }
24 |
25 | extension Disposables {
26 | /**
27 | Creates a disposable that does nothing on disposal.
28 | */
29 | static public func create() -> Disposable {
30 | return NopDisposable.noOp
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ScheduledDisposable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 6/13/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | private let disposeScheduledDisposable: (ScheduledDisposable) -> Disposable = { sd in
10 | sd.disposeInner()
11 | return Disposables.create()
12 | }
13 |
14 | /// Represents a disposable resource whose disposal invocation will be scheduled on the specified scheduler.
15 | public final class ScheduledDisposable : Cancelable {
16 | public let scheduler: ImmediateSchedulerType
17 |
18 | private var _isDisposed: AtomicInt = 0
19 |
20 | // state
21 | private var _disposable: Disposable?
22 |
23 | /// - returns: Was resource disposed.
24 | public var isDisposed: Bool {
25 | return _isDisposed == 1
26 | }
27 |
28 | /**
29 | Initializes a new instance of the `ScheduledDisposable` that uses a `scheduler` on which to dispose the `disposable`.
30 |
31 | - parameter scheduler: Scheduler where the disposable resource will be disposed on.
32 | - parameter disposable: Disposable resource to dispose on the given scheduler.
33 | */
34 | public init(scheduler: ImmediateSchedulerType, disposable: Disposable) {
35 | self.scheduler = scheduler
36 | _disposable = disposable
37 | }
38 |
39 | /// Disposes the wrapped disposable on the provided scheduler.
40 | public func dispose() {
41 | let _ = scheduler.schedule(self, action: disposeScheduledDisposable)
42 | }
43 |
44 | func disposeInner() {
45 | if AtomicCompareAndSwap(0, 1, &_isDisposed) {
46 | _disposable!.dispose()
47 | _disposable = nil
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SubscriptionDisposable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | struct SubscriptionDisposable : Disposable {
10 | private let _key: T.DisposeKey
11 | private weak var _owner: T?
12 |
13 | init(owner: T, key: T.DisposeKey) {
14 | _owner = owner
15 | _key = key
16 | }
17 |
18 | func dispose() {
19 | _owner?.synchronizedUnsubscribe(_key)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Errors.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Errors.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 3/28/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | let RxErrorDomain = "RxErrorDomain"
10 | let RxCompositeFailures = "RxCompositeFailures"
11 |
12 | /// Generic Rx error codes.
13 | public enum RxError
14 | : Swift.Error
15 | , CustomDebugStringConvertible {
16 | /// Unknown error occured.
17 | case unknown
18 | /// Performing an action on disposed object.
19 | case disposed(object: AnyObject)
20 | /// Aritmetic overflow error.
21 | case overflow
22 | /// Argument out of range error.
23 | case argumentOutOfRange
24 | /// Sequence doesn't contain any elements.
25 | case noElements
26 | /// Sequence contains more than one element.
27 | case moreThanOneElement
28 | /// Timeout error.
29 | case timeout
30 | }
31 |
32 | extension RxError {
33 | /// A textual representation of `self`, suitable for debugging.
34 | public var debugDescription: String {
35 | switch self {
36 | case .unknown:
37 | return "Unknown error occured."
38 | case .disposed(let object):
39 | return "Object `\(object)` was already disposed."
40 | case .overflow:
41 | return "Arithmetic overflow occured."
42 | case .argumentOutOfRange:
43 | return "Argument out of range."
44 | case .noElements:
45 | return "Sequence doesn't contain any elements."
46 | case .moreThanOneElement:
47 | return "Sequence contains more than one element."
48 | case .timeout:
49 | return "Sequence timeout."
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Bag+Rx.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/19/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 |
10 | // MARK: forEach
11 |
12 | @inline(__always)
13 | func dispatch(_ bag: Bag<(Event) -> ()>, _ event: Event) {
14 | if bag._onlyFastPath {
15 | bag._value0?(event)
16 | return
17 | }
18 |
19 | let value0 = bag._value0
20 | let dictionary = bag._dictionary
21 |
22 | if let value0 = value0 {
23 | value0(event)
24 | }
25 |
26 | let pairs = bag._pairs
27 | for i in 0 ..< pairs.count {
28 | pairs[i].value(event)
29 | }
30 |
31 | if let dictionary = dictionary {
32 | for element in dictionary.values {
33 | element(event)
34 | }
35 | }
36 | }
37 |
38 | /// Dispatches `dispose` to all disposables contained inside bag.
39 | func disposeAll(in bag: Bag) {
40 | if bag._onlyFastPath {
41 | bag._value0?.dispose()
42 | return
43 | }
44 |
45 | let value0 = bag._value0
46 | let dictionary = bag._dictionary
47 |
48 | if let value0 = value0 {
49 | value0.dispose()
50 | }
51 |
52 | let pairs = bag._pairs
53 | for i in 0 ..< pairs.count {
54 | pairs[i].value.dispose()
55 | }
56 |
57 | if let dictionary = dictionary {
58 | for element in dictionary.values {
59 | element.dispose()
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // String+Rx.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 12/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | extension String {
10 | /// This is needed because on Linux Swift doesn't have `rangeOfString(..., options: .BackwardsSearch)`
11 | func lastIndexOf(_ character: Character) -> Index? {
12 | var index = endIndex
13 | while index > startIndex {
14 | index = self.index(before: index)
15 | if self[index] == character {
16 | return index
17 | }
18 | }
19 |
20 | return nil
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/GroupedObservable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GroupedObservable.swift
3 | // RxSwift
4 | //
5 | // Created by Tomi Koskinen on 01/12/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents an observable sequence of elements that have a common key.
10 | public struct GroupedObservable : ObservableType {
11 | public typealias E = Element
12 |
13 | /// Gets the common key.
14 | public let key: Key
15 |
16 | private let source: Observable
17 |
18 | /// Initializes grouped observable sequence with key and source observable sequence.
19 | ///
20 | /// - parameter key: Grouped observable sequence key
21 | /// - parameter source: Observable sequence that represents sequence of elements for the key
22 | /// - returns: Grouped observable sequence of elements for the specific key
23 | public init(key: Key, source: Observable) {
24 | self.key = key
25 | self.source = source
26 | }
27 |
28 | /// Subscribes `observer` to receive events for this sequence.
29 | public func subscribe(_ observer: O) -> Disposable where O.E == E {
30 | return self.source.subscribe(observer)
31 | }
32 |
33 | /// Converts `self` to `Observable` sequence.
34 | public func asObservable() -> Observable {
35 | return source
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ImmediateSchedulerType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 5/31/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents an object that immediately schedules units of work.
10 | public protocol ImmediateSchedulerType {
11 | /**
12 | Schedules an action to be executed immediatelly.
13 |
14 | - parameter state: State passed to the action to be executed.
15 | - parameter action: Action to be executed.
16 | - returns: The disposable object used to cancel the scheduled action (best effort).
17 | */
18 | func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable
19 | }
20 |
21 | extension ImmediateSchedulerType {
22 | /**
23 | Schedules an action to be executed recursively.
24 |
25 | - parameter state: State passed to the action to be executed.
26 | - 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.
27 | - returns: The disposable object used to cancel the scheduled action (best effort).
28 | */
29 | public func scheduleRecursive(_ state: State, action: @escaping (_ state: State, _ recurse: (State) -> ()) -> ()) -> Disposable {
30 | let recursiveScheduler = RecursiveImmediateScheduler(action: action, scheduler: self)
31 |
32 | recursiveScheduler.schedule(state)
33 |
34 | return Disposables.create(with: recursiveScheduler.dispose)
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Observable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/8/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// A type-erased `ObservableType`.
10 | ///
11 | /// It represents a push style sequence.
12 | public class Observable : ObservableType {
13 | /// Type of elements in sequence.
14 | public typealias E = Element
15 |
16 | init() {
17 | #if TRACE_RESOURCES
18 | let _ = Resources.incrementTotal()
19 | #endif
20 | }
21 |
22 | public func subscribe(_ observer: O) -> Disposable where O.E == E {
23 | abstractMethod()
24 | }
25 |
26 | public func asObservable() -> Observable {
27 | return self
28 | }
29 |
30 | deinit {
31 | #if TRACE_RESOURCES
32 | let _ = Resources.decrementTotal()
33 | #endif
34 | }
35 |
36 | // this is kind of ugly I know :(
37 | // Swift compiler reports "Not supported yet" when trying to override protocol extensions, so ¯\_(ツ)_/¯
38 |
39 | /// Optimizations for map operator
40 | internal func composeMap(_ selector: @escaping (Element) throws -> R) -> Observable {
41 | return Map(source: self, transform: selector)
42 | }
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ObservableConvertibleType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 9/17/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Type that can be converted to observable sequence (`Observer`).
10 | public protocol ObservableConvertibleType {
11 | /// Type of elements in sequence.
12 | associatedtype E
13 |
14 | /// Converts `self` to `Observable` sequence.
15 | ///
16 | /// - returns: Observable sequence that represents `self`.
17 | func asObservable() -> Observable
18 | }
19 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AddRef.swift
3 | // RxSwift
4 | //
5 | // Created by Junior B. on 30/10/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class AddRefSink : Sink, ObserverType {
10 | typealias Element = O.E
11 |
12 | override init(observer: O, cancel: Cancelable) {
13 | super.init(observer: observer, cancel: cancel)
14 | }
15 |
16 | func on(_ event: Event) {
17 | switch event {
18 | case .next(_):
19 | forwardOn(event)
20 | case .completed, .error(_):
21 | forwardOn(event)
22 | dispose()
23 | }
24 | }
25 | }
26 |
27 | final class AddRef : Producer {
28 | typealias EventHandler = (Event) throws -> Void
29 |
30 | private let _source: Observable
31 | private let _refCount: RefCountDisposable
32 |
33 | init(source: Observable, refCount: RefCountDisposable) {
34 | _source = source
35 | _refCount = refCount
36 | }
37 |
38 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element {
39 | let releaseDisposable = _refCount.retain()
40 | let sink = AddRefSink(observer: observer, cancel: cancel)
41 | let subscription = Disposables.create(releaseDisposable, _source.subscribe(sink))
42 |
43 | return (sink: sink, subscription: subscription)
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Implementations/DefaultIfEmpty.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DefaultIfEmpty.swift
3 | // RxSwift
4 | //
5 | // Created by sergdort on 23/12/2016.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class DefaultIfEmptySink: Sink, ObserverType {
10 | typealias E = O.E
11 | private let _default: E
12 | private var _isEmpty = true
13 |
14 | init(default: E, observer: O, cancel: Cancelable) {
15 | _default = `default`
16 | super.init(observer: observer, cancel: cancel)
17 | }
18 |
19 | func on(_ event: Event) {
20 | switch event {
21 | case .next(_):
22 | _isEmpty = false
23 | forwardOn(event)
24 | case .error(_):
25 | forwardOn(event)
26 | dispose()
27 | case .completed:
28 | if _isEmpty {
29 | forwardOn(.next(_default))
30 | }
31 | forwardOn(.completed)
32 | dispose()
33 | }
34 | }
35 | }
36 |
37 | final class DefaultIfEmpty: Producer {
38 | private let _source: Observable
39 | private let _default: SourceType
40 |
41 | init(source: Observable, `default`: SourceType) {
42 | _source = source
43 | _default = `default`
44 | }
45 |
46 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType {
47 | let sink = DefaultIfEmptySink(default: _default, observer: observer, cancel: cancel)
48 | let subscription = _source.subscribe(sink)
49 | return (sink: sink, subscription: subscription)
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DelaySubscription.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 6/14/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class DelaySubscriptionSink
10 | : Sink, ObserverType {
11 | typealias E = O.E
12 | typealias Parent = DelaySubscription
13 |
14 | private let _parent: Parent
15 |
16 | init(parent: Parent, observer: O, cancel: Cancelable) {
17 | _parent = parent
18 | super.init(observer: observer, cancel: cancel)
19 | }
20 |
21 | func on(_ event: Event) {
22 | forwardOn(event)
23 | if event.isStopEvent {
24 | dispose()
25 | }
26 | }
27 |
28 | }
29 |
30 | final class DelaySubscription: Producer {
31 | private let _source: Observable
32 | private let _dueTime: RxTimeInterval
33 | private let _scheduler: SchedulerType
34 |
35 | init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) {
36 | _source = source
37 | _dueTime = dueTime
38 | _scheduler = scheduler
39 | }
40 |
41 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element {
42 | let sink = DelaySubscriptionSink(parent: self, observer: observer, cancel: cancel)
43 | let subscription = _scheduler.scheduleRelative((), dueTime: _dueTime) { _ in
44 | return self._source.subscribe(sink)
45 | }
46 |
47 | return (sink: sink, subscription: subscription)
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Empty.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 8/30/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class Empty : Producer {
10 | override func subscribe(_ observer: O) -> Disposable where O.E == Element {
11 | observer.on(.completed)
12 | return Disposables.create()
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Error.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 8/30/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class Error : Producer {
10 | private let _error: Swift.Error
11 |
12 | init(error: Swift.Error) {
13 | _error = error
14 | }
15 |
16 | override func subscribe(_ observer: O) -> Disposable where O.E == Element {
17 | observer.on(.error(_error))
18 | return Disposables.create()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Never.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 8/30/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class Never : Producer {
10 | override func subscribe(_ observer: O) -> Disposable where O.E == Element {
11 | return Disposables.create()
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Repeat.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 9/13/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class RepeatElement : Producer {
10 | fileprivate let _element: Element
11 | fileprivate let _scheduler: ImmediateSchedulerType
12 |
13 | init(element: Element, scheduler: ImmediateSchedulerType) {
14 | _element = element
15 | _scheduler = scheduler
16 | }
17 |
18 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element {
19 | let sink = RepeatElementSink(parent: self, observer: observer, cancel: cancel)
20 | let subscription = sink.run()
21 |
22 | return (sink: sink, subscription: subscription)
23 | }
24 | }
25 |
26 | final class RepeatElementSink : Sink {
27 | typealias Parent = RepeatElement
28 |
29 | private let _parent: Parent
30 |
31 | init(parent: Parent, observer: O, cancel: Cancelable) {
32 | _parent = parent
33 | super.init(observer: observer, cancel: cancel)
34 | }
35 |
36 | func run() -> Disposable {
37 | return _parent._scheduler.scheduleRecursive(_parent._element) { e, recurse in
38 | self.forwardOn(.next(e))
39 | recurse(e)
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Sequence.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 11/14/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class ObservableSequenceSink : Sink where S.Iterator.Element == O.E {
10 | typealias Parent = ObservableSequence
11 |
12 | private let _parent: Parent
13 |
14 | init(parent: Parent, observer: O, cancel: Cancelable) {
15 | _parent = parent
16 | super.init(observer: observer, cancel: cancel)
17 | }
18 |
19 | func run() -> Disposable {
20 | return _parent._scheduler.scheduleRecursive((_parent._elements.makeIterator(), _parent._elements)) { (iterator, recurse) in
21 | var mutableIterator = iterator
22 | if let next = mutableIterator.0.next() {
23 | self.forwardOn(.next(next))
24 | recurse(mutableIterator)
25 | }
26 | else {
27 | self.forwardOn(.completed)
28 | self.dispose()
29 | }
30 | }
31 | }
32 | }
33 |
34 | final class ObservableSequence : Producer {
35 | fileprivate let _elements: S
36 | fileprivate let _scheduler: ImmediateSchedulerType
37 |
38 | init(elements: S, scheduler: ImmediateSchedulerType) {
39 | _elements = elements
40 | _scheduler = scheduler
41 | }
42 |
43 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E {
44 | let sink = ObservableSequenceSink(parent: self, observer: observer, cancel: cancel)
45 | let subscription = sink.run()
46 | return (sink: sink, subscription: subscription)
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift:
--------------------------------------------------------------------------------
1 | //
2 | // StartWith.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 4/6/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class StartWith: Producer {
10 | let elements: [Element]
11 | let source: Observable
12 |
13 | init(source: Observable, elements: [Element]) {
14 | self.source = source
15 | self.elements = elements
16 | super.init()
17 | }
18 |
19 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element {
20 | for e in elements {
21 | observer.on(.next(e))
22 | }
23 |
24 | return (sink: Disposables.create(), subscription: source.subscribe(observer))
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ToArray.swift
3 | // RxSwift
4 | //
5 | // Created by Junior B. on 20/10/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class ToArraySink : Sink, ObserverType where O.E == [SourceType] {
10 | typealias Parent = ToArray
11 |
12 | let _parent: Parent
13 | var _list = Array()
14 |
15 | init(parent: Parent, observer: O, cancel: Cancelable) {
16 | _parent = parent
17 |
18 | super.init(observer: observer, cancel: cancel)
19 | }
20 |
21 | func on(_ event: Event) {
22 | switch event {
23 | case .next(let value):
24 | self._list.append(value)
25 | case .error(let e):
26 | forwardOn(.error(e))
27 | self.dispose()
28 | case .completed:
29 | forwardOn(.next(_list))
30 | forwardOn(.completed)
31 | self.dispose()
32 | }
33 | }
34 | }
35 |
36 | final class ToArray : Producer<[SourceType]> {
37 | let _source: Observable
38 |
39 | init(source: Observable) {
40 | _source = source
41 | }
42 |
43 | override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [SourceType] {
44 | let sink = ToArraySink(parent: self, observer: observer, cancel: cancel)
45 | let subscription = _source.subscribe(sink)
46 | return (sink: sink, subscription: subscription)
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Observable+Debug.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 5/2/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | // MARK: debug
10 |
11 | extension ObservableType {
12 |
13 | /**
14 | Prints received events for all observers on standard output.
15 |
16 | - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html)
17 |
18 | - parameter identifier: Identifier that is printed together with event description to standard output.
19 | - parameter trimOutput: Should output be trimmed to max 40 characters.
20 | - returns: An observable sequence whose events are printed to standard output.
21 | */
22 | public func debug(_ identifier: String? = nil, trimOutput: Bool = false, file: String = #file, line: UInt = #line, function: String = #function)
23 | -> Observable {
24 | return Debug(source: self, identifier: identifier, trimOutput: trimOutput, file: file, line: line, function: function)
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/ObserverType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ObserverType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/8/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Supports push-style iteration over an observable sequence.
10 | public protocol ObserverType {
11 | /// The type of elements in sequence that observer can observe.
12 | associatedtype E
13 |
14 | /// Notify observer about sequence event.
15 | ///
16 | /// - parameter event: Event that occured.
17 | func on(_ event: Event)
18 | }
19 |
20 | /// Convenience API extensions to provide alternate next, error, completed events
21 | extension ObserverType {
22 |
23 | /// Convenience method equivalent to `on(.next(element: E))`
24 | ///
25 | /// - parameter element: Next element to send to observer(s)
26 | public final func onNext(_ element: E) {
27 | on(.next(element))
28 | }
29 |
30 | /// Convenience method equivalent to `on(.completed)`
31 | public final func onCompleted() {
32 | on(.completed)
33 | }
34 |
35 | /// Convenience method equivalent to `on(.error(Swift.Error))`
36 | /// - parameter error: Swift.Error to send to observer(s)
37 | public final func onError(_ error: Swift.Error) {
38 | on(.error(error))
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AnonymousObserver.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/8/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class AnonymousObserver : ObserverBase {
10 | typealias Element = ElementType
11 |
12 | typealias EventHandler = (Event) -> Void
13 |
14 | private let _eventHandler : EventHandler
15 |
16 | init(_ eventHandler: @escaping EventHandler) {
17 | #if TRACE_RESOURCES
18 | let _ = Resources.incrementTotal()
19 | #endif
20 | _eventHandler = eventHandler
21 | }
22 |
23 | override func onCore(_ event: Event) {
24 | return _eventHandler(event)
25 | }
26 |
27 | #if TRACE_RESOURCES
28 | deinit {
29 | let _ = Resources.decrementTotal()
30 | }
31 | #endif
32 | }
33 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ObserverBase.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/15/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | class ObserverBase : Disposable, ObserverType {
10 | typealias E = ElementType
11 |
12 | private var _isStopped: AtomicInt = 0
13 |
14 | func on(_ event: Event) {
15 | switch event {
16 | case .next:
17 | if _isStopped == 0 {
18 | onCore(event)
19 | }
20 | case .error, .completed:
21 |
22 | if !AtomicCompareAndSwap(0, 1, &_isStopped) {
23 | return
24 | }
25 |
26 | onCore(event)
27 | }
28 | }
29 |
30 | func onCore(_ event: Event) {
31 | abstractMethod()
32 | }
33 |
34 | func dispose() {
35 | _ = AtomicCompareAndSwap(0, 1, &_isStopped)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/RxMutableBox.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxMutableBox.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 5/22/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Creates mutable reference wrapper for any type.
10 | final class RxMutableBox : CustomDebugStringConvertible {
11 | /// Wrapped value
12 | var value : T
13 |
14 | /// Creates reference wrapper for `value`.
15 | ///
16 | /// - parameter value: Value to wrap.
17 | init (_ value: T) {
18 | self.value = value
19 | }
20 | }
21 |
22 | extension RxMutableBox {
23 | /// - returns: Box description.
24 | var debugDescription: String {
25 | return "MutatingBox(\(self.value))"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HistoricalScheduler.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 12/27/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import struct Foundation.Date
10 |
11 | /// Provides a virtual time scheduler that uses `Date` for absolute time and `NSTimeInterval` for relative time.
12 | public class HistoricalScheduler : VirtualTimeScheduler {
13 |
14 | /**
15 | Creates a new historical scheduler with initial clock value.
16 |
17 | - parameter initialClock: Initial value for virtual clock.
18 | */
19 | public init(initialClock: RxTime = Date(timeIntervalSince1970: 0)) {
20 | super.init(initialClock: initialClock, converter: HistoricalSchedulerTimeConverter())
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ImmediateScheduler.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/17/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents an object that schedules units of work to run immediately on the current thread.
10 | private final class ImmediateScheduler : ImmediateSchedulerType {
11 |
12 | private let _asyncLock = AsyncLock()
13 |
14 | /**
15 | Schedules an action to be executed immediatelly.
16 |
17 | In case `schedule` is called recursively from inside of `action` callback, scheduled `action` will be enqueued
18 | and executed after current `action`. (`AsyncLock` behavior)
19 |
20 | - parameter state: State passed to the action to be executed.
21 | - parameter action: Action to be executed.
22 | - returns: The disposable object used to cancel the scheduled action (best effort).
23 | */
24 | func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable {
25 | let disposable = SingleAssignmentDisposable()
26 | _asyncLock.invoke(AnonymousInvocable {
27 | if disposable.isDisposed {
28 | return
29 | }
30 | disposable.setDisposable(action(state))
31 | })
32 |
33 | return disposable
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AnonymousInvocable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 11/7/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | struct AnonymousInvocable : InvocableType {
10 | private let _action: () -> ()
11 |
12 | init(_ action: @escaping () -> ()) {
13 | _action = action
14 | }
15 |
16 | func invoke() {
17 | _action()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InvocableScheduledItem.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 11/7/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | struct InvocableScheduledItem : InvocableType {
10 |
11 | let _invocable: I
12 | let _state: I.Value
13 |
14 | init(invocable: I, state: I.Value) {
15 | _invocable = invocable
16 | _state = state
17 | }
18 |
19 | func invoke() {
20 | _invocable.invoke(_state)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InvocableType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 11/7/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol InvocableType {
10 | func invoke()
11 | }
12 |
13 | protocol InvocableWithValueType {
14 | associatedtype Value
15 |
16 | func invoke(_ value: Value)
17 | }
18 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ScheduledItem.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 9/2/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | struct ScheduledItem
10 | : ScheduledItemType
11 | , InvocableType {
12 | typealias Action = (T) -> Disposable
13 |
14 | private let _action: Action
15 | private let _state: T
16 |
17 | private let _disposable = SingleAssignmentDisposable()
18 |
19 | var isDisposed: Bool {
20 | return _disposable.isDisposed
21 | }
22 |
23 | init(action: @escaping Action, state: T) {
24 | _action = action
25 | _state = state
26 | }
27 |
28 | func invoke() {
29 | _disposable.setDisposable(_action(_state))
30 | }
31 |
32 | func dispose() {
33 | _disposable.dispose()
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ScheduledItemType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 11/7/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol ScheduledItemType
10 | : Cancelable
11 | , InvocableType {
12 | func invoke()
13 | }
14 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SubjectType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 3/1/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents an object that is both an observable sequence as well as an observer.
10 | public protocol SubjectType : ObservableType {
11 | /// The type of the observer that represents this subject.
12 | ///
13 | /// Usually this type is type of subject itself, but it doesn't have to be.
14 | associatedtype SubjectObserverType : ObserverType
15 |
16 | /// Returns observer interface for subject.
17 | ///
18 | /// - returns: Observer interface for subject.
19 | func asObserver() -> SubjectObserverType
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/Pods-RxSwiftSimpleTableView/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/Pods-RxSwiftSimpleTableView/Pods-RxSwiftSimpleTableView-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_RxSwiftSimpleTableView : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_RxSwiftSimpleTableView
5 | @end
6 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/Pods-RxSwiftSimpleTableView/Pods-RxSwiftSimpleTableView-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
6 | FOUNDATION_EXPORT double Pods_RxSwiftSimpleTableViewVersionNumber;
7 | FOUNDATION_EXPORT const unsigned char Pods_RxSwiftSimpleTableViewVersionString[];
8 |
9 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/Pods-RxSwiftSimpleTableView/Pods-RxSwiftSimpleTableView.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa/RxCocoa.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers"
7 | OTHER_LDFLAGS = $(inherited) -framework "RxCocoa" -framework "RxSwift"
8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
9 | PODS_BUILD_DIR = $BUILD_DIR
10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_ROOT = ${SRCROOT}/Pods
12 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/Pods-RxSwiftSimpleTableView/Pods-RxSwiftSimpleTableView.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_RxSwiftSimpleTableView {
2 | umbrella header "Pods-RxSwiftSimpleTableView-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/Pods-RxSwiftSimpleTableView/Pods-RxSwiftSimpleTableView.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxCocoa/RxCocoa.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers"
7 | OTHER_LDFLAGS = $(inherited) -framework "RxCocoa" -framework "RxSwift"
8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
9 | PODS_BUILD_DIR = $BUILD_DIR
10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
11 | PODS_ROOT = ${SRCROOT}/Pods
12 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxCocoa/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.2.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxCocoa/RxCocoa-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_RxCocoa : NSObject
3 | @end
4 | @implementation PodsDummy_RxCocoa
5 | @end
6 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxCocoa/RxCocoa-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxCocoa/RxCocoa-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 | #import "RxCocoa.h"
6 | #import "RxCocoaRuntime.h"
7 | #import "_RX.h"
8 | #import "_RXDelegateProxy.h"
9 | #import "_RXKVOObserver.h"
10 | #import "_RXObjCRuntime.h"
11 |
12 | FOUNDATION_EXPORT double RxCocoaVersionNumber;
13 | FOUNDATION_EXPORT const unsigned char RxCocoaVersionString[];
14 |
15 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxCocoa/RxCocoa.modulemap:
--------------------------------------------------------------------------------
1 | framework module RxCocoa {
2 | umbrella header "RxCocoa-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxCocoa/RxCocoa.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RxCocoa
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RxSwift"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxSwift/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.2.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxSwift/RxSwift-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_RxSwift : NSObject
3 | @end
4 | @implementation PodsDummy_RxSwift
5 | @end
6 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
6 | FOUNDATION_EXPORT double RxSwiftVersionNumber;
7 | FOUNDATION_EXPORT const unsigned char RxSwiftVersionString[];
8 |
9 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxSwift/RxSwift.modulemap:
--------------------------------------------------------------------------------
1 | framework module RxSwift {
2 | umbrella header "RxSwift-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/Pods/Target Support Files/RxSwift/RxSwift.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RxSwift
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/RxSwiftSimpleTableView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/RxSwiftSimpleTableView.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftSimpleTableView/RxSwiftSimpleTableView.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/RxSwiftSimpleTableView.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftSimpleTableView.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C67DCAF1E8A8FD900714CE7
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/RxSwiftSimpleTableView.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/RxSwiftSimpleTableView.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftSimpleTableView/RxSwiftSimpleTableView.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/RxSwiftSimpleTableView/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftSimpleTableView/RxSwiftSimpleTableView/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // RxSwiftSimpleTableView
4 | //
5 | // Created by monkey on 2017/3/28.
6 | // Copyright © 2017年 Coder. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import RxSwift
11 | import RxCocoa
12 |
13 | class ViewController: UIViewController {
14 |
15 | @IBOutlet weak var tableview: UITableView!
16 |
17 | let disposeBag = DisposeBag()
18 |
19 | override func viewDidLoad() {
20 | super.viewDidLoad()
21 |
22 | let items = Observable.just(
23 | (0...20).map{ "\($0)" }
24 | )
25 |
26 | items
27 | .bindTo(tableview.rx.items(cellIdentifier: "Cell", cellType: UITableViewCell.self)){
28 | (row, elememt, cell) in
29 | cell.textLabel?.text = "\(elememt) @row \(row)"
30 | }.disposed(by: disposeBag)
31 |
32 | tableview.rx
33 | .modelSelected(String.self)
34 | .subscribe(
35 | onNext:{
36 | value in
37 | if let selectedRowIndexPath = self.tableview.indexPathForSelectedRow {
38 | self.tableview.deselectRow(at: selectedRowIndexPath, animated: true)
39 | }
40 |
41 | print("click \(value)")
42 | }
43 | )
44 | .disposed(by: disposeBag)
45 | }
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/RxSwiftTableViewSection/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftTableViewSection/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftTableViewSection' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 | pod 'RxDataSources'
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/RxSwiftTableViewSection/RxSwiftTableViewSection.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftTableViewSection/RxSwiftTableViewSection.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftTableViewSection/RxSwiftTableViewSection.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftTableViewSection/RxSwiftTableViewSection.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftTableViewSection.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C67DCCD1E8AA90400714CE7
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftTableViewSection/RxSwiftTableViewSection.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftTableViewSection/RxSwiftTableViewSection.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftTableViewSection/RxSwiftTableViewSection.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftTableViewSection/RxSwiftTableViewSection/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/RxSwiftTableViewSection/RxSwiftTableViewSection/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/RxSwiftTwoWayBinding/.gitignore:
--------------------------------------------------------------------------------
1 | Build/
2 | Podfile.lock
3 | Pods/
4 |
--------------------------------------------------------------------------------
/RxSwiftTwoWayBinding/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'RxSwiftTwoWayBinding' do
4 |
5 | pod 'RxSwift'
6 | pod 'RxCocoa'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/RxSwiftTwoWayBinding/RxSwiftTwoWayBinding.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RxSwiftTwoWayBinding/RxSwiftTwoWayBinding.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftTwoWayBinding/RxSwiftTwoWayBinding.xcodeproj/project.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftTwoWayBinding/RxSwiftTwoWayBinding.xcodeproj/xcuserdata/monkey.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RxSwiftTwoWayBinding.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8C0C05641E8D3430007A2EFF
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RxSwiftTwoWayBinding/RxSwiftTwoWayBinding.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RxSwiftTwoWayBinding/RxSwiftTwoWayBinding.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AloneMonkey/RxSwiftStudy/ff487a1310f652d3d095ae43c28c84ad5320aa9a/RxSwiftTwoWayBinding/RxSwiftTwoWayBinding.xcworkspace/xcuserdata/monkey.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RxSwiftTwoWayBinding/RxSwiftTwoWayBinding/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/RxSwiftTwoWayBinding/RxSwiftTwoWayBinding/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------