├── Podfile
├── Podfile.lock
├── Pods
├── Headers
│ └── Private
│ │ └── ReactiveCocoa
│ │ ├── NSArray+RACSequenceAdditions.h
│ │ ├── NSData+RACSupport.h
│ │ ├── NSDictionary+RACSequenceAdditions.h
│ │ ├── NSEnumerator+RACSequenceAdditions.h
│ │ ├── NSFileHandle+RACSupport.h
│ │ ├── NSIndexSet+RACSequenceAdditions.h
│ │ ├── NSInvocation+RACTypeParsing.h
│ │ ├── NSNotificationCenter+RACSupport.h
│ │ ├── NSObject+RACDeallocating.h
│ │ ├── NSObject+RACDescription.h
│ │ ├── NSObject+RACKVOWrapper.h
│ │ ├── NSObject+RACLifting.h
│ │ ├── NSObject+RACPropertySubscribing.h
│ │ ├── NSObject+RACSelectorSignal.h
│ │ ├── NSOrderedSet+RACSequenceAdditions.h
│ │ ├── NSSet+RACSequenceAdditions.h
│ │ ├── NSString+RACKeyPathUtilities.h
│ │ ├── NSString+RACSequenceAdditions.h
│ │ ├── NSString+RACSupport.h
│ │ ├── NSURLConnection+RACSupport.h
│ │ ├── NSUserDefaults+RACSupport.h
│ │ ├── RACArraySequence.h
│ │ ├── RACBacktrace.h
│ │ ├── RACBehaviorSubject.h
│ │ ├── RACBlockTrampoline.h
│ │ ├── RACChannel.h
│ │ ├── RACCommand.h
│ │ ├── RACCompoundDisposable.h
│ │ ├── RACDelegateProxy.h
│ │ ├── RACDisposable.h
│ │ ├── RACDynamicSequence.h
│ │ ├── RACDynamicSignal.h
│ │ ├── RACEXTKeyPathCoding.h
│ │ ├── RACEXTRuntimeExtensions.h
│ │ ├── RACEXTScope.h
│ │ ├── RACEagerSequence.h
│ │ ├── RACEmptySequence.h
│ │ ├── RACEmptySignal.h
│ │ ├── RACErrorSignal.h
│ │ ├── RACEvent.h
│ │ ├── RACGroupedSignal.h
│ │ ├── RACImmediateScheduler.h
│ │ ├── RACIndexSetSequence.h
│ │ ├── RACKVOChannel.h
│ │ ├── RACKVOProxy.h
│ │ ├── RACKVOTrampoline.h
│ │ ├── RACMulticastConnection+Private.h
│ │ ├── RACMulticastConnection.h
│ │ ├── RACObjCRuntime.h
│ │ ├── RACPassthroughSubscriber.h
│ │ ├── RACQueueScheduler+Subclass.h
│ │ ├── RACQueueScheduler.h
│ │ ├── RACReplaySubject.h
│ │ ├── RACReturnSignal.h
│ │ ├── RACScheduler+Private.h
│ │ ├── RACScheduler+Subclass.h
│ │ ├── RACScheduler.h
│ │ ├── RACScopedDisposable.h
│ │ ├── RACSequence.h
│ │ ├── RACSerialDisposable.h
│ │ ├── RACSignal+Operations.h
│ │ ├── RACSignal.h
│ │ ├── RACSignalSequence.h
│ │ ├── RACStream+Private.h
│ │ ├── RACStream.h
│ │ ├── RACStringSequence.h
│ │ ├── RACSubject.h
│ │ ├── RACSubscriber+Private.h
│ │ ├── RACSubscriber.h
│ │ ├── RACSubscriptingAssignmentTrampoline.h
│ │ ├── RACSubscriptionScheduler.h
│ │ ├── RACTargetQueueScheduler.h
│ │ ├── RACTestScheduler.h
│ │ ├── RACTuple.h
│ │ ├── RACTupleSequence.h
│ │ ├── RACUnarySequence.h
│ │ ├── RACUnit.h
│ │ ├── RACValueTransformer.h
│ │ ├── RACmetamacros.h
│ │ ├── ReactiveCocoa.h
│ │ ├── UIActionSheet+RACSignalSupport.h
│ │ ├── UIAlertView+RACSignalSupport.h
│ │ ├── UIBarButtonItem+RACCommandSupport.h
│ │ ├── UIButton+RACCommandSupport.h
│ │ ├── UICollectionReusableView+RACSignalSupport.h
│ │ ├── UIControl+RACSignalSupport.h
│ │ ├── UIControl+RACSignalSupportPrivate.h
│ │ ├── UIDatePicker+RACSignalSupport.h
│ │ ├── UIGestureRecognizer+RACSignalSupport.h
│ │ ├── UIImagePickerController+RACSignalSupport.h
│ │ ├── UIRefreshControl+RACCommandSupport.h
│ │ ├── UISegmentedControl+RACSignalSupport.h
│ │ ├── UISlider+RACSignalSupport.h
│ │ ├── UIStepper+RACSignalSupport.h
│ │ ├── UISwitch+RACSignalSupport.h
│ │ ├── UITableViewCell+RACSignalSupport.h
│ │ ├── UITableViewHeaderFooterView+RACSignalSupport.h
│ │ ├── UITextField+RACSignalSupport.h
│ │ └── UITextView+RACSignalSupport.h
├── Manifest.lock
├── Pods.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── tangjr.xcuserdatad
│ │ └── xcschemes
│ │ ├── Pods-ReactiveCocoaUtilityDemo.xcscheme
│ │ ├── ReactiveCocoa.xcscheme
│ │ └── xcschememanagement.plist
├── ReactiveCocoa
│ ├── LICENSE.md
│ ├── README.md
│ └── ReactiveCocoa
│ │ ├── NSArray+RACSequenceAdditions.h
│ │ ├── NSArray+RACSequenceAdditions.m
│ │ ├── NSData+RACSupport.h
│ │ ├── NSData+RACSupport.m
│ │ ├── NSDictionary+RACSequenceAdditions.h
│ │ ├── NSDictionary+RACSequenceAdditions.m
│ │ ├── NSEnumerator+RACSequenceAdditions.h
│ │ ├── NSEnumerator+RACSequenceAdditions.m
│ │ ├── NSFileHandle+RACSupport.h
│ │ ├── NSFileHandle+RACSupport.m
│ │ ├── NSIndexSet+RACSequenceAdditions.h
│ │ ├── NSIndexSet+RACSequenceAdditions.m
│ │ ├── NSInvocation+RACTypeParsing.h
│ │ ├── NSInvocation+RACTypeParsing.m
│ │ ├── NSNotificationCenter+RACSupport.h
│ │ ├── NSNotificationCenter+RACSupport.m
│ │ ├── NSObject+RACDeallocating.h
│ │ ├── NSObject+RACDeallocating.m
│ │ ├── NSObject+RACDescription.h
│ │ ├── NSObject+RACDescription.m
│ │ ├── NSObject+RACKVOWrapper.h
│ │ ├── NSObject+RACKVOWrapper.m
│ │ ├── NSObject+RACLifting.h
│ │ ├── NSObject+RACLifting.m
│ │ ├── NSObject+RACPropertySubscribing.h
│ │ ├── NSObject+RACPropertySubscribing.m
│ │ ├── NSObject+RACSelectorSignal.h
│ │ ├── NSObject+RACSelectorSignal.m
│ │ ├── NSOrderedSet+RACSequenceAdditions.h
│ │ ├── NSOrderedSet+RACSequenceAdditions.m
│ │ ├── NSSet+RACSequenceAdditions.h
│ │ ├── NSSet+RACSequenceAdditions.m
│ │ ├── NSString+RACKeyPathUtilities.h
│ │ ├── NSString+RACKeyPathUtilities.m
│ │ ├── NSString+RACSequenceAdditions.h
│ │ ├── NSString+RACSequenceAdditions.m
│ │ ├── NSString+RACSupport.h
│ │ ├── NSString+RACSupport.m
│ │ ├── NSURLConnection+RACSupport.h
│ │ ├── NSURLConnection+RACSupport.m
│ │ ├── NSUserDefaults+RACSupport.h
│ │ ├── NSUserDefaults+RACSupport.m
│ │ ├── RACArraySequence.h
│ │ ├── RACArraySequence.m
│ │ ├── RACBacktrace.h
│ │ ├── RACBacktrace.m
│ │ ├── RACBehaviorSubject.h
│ │ ├── RACBehaviorSubject.m
│ │ ├── RACBlockTrampoline.h
│ │ ├── RACBlockTrampoline.m
│ │ ├── RACChannel.h
│ │ ├── RACChannel.m
│ │ ├── RACCommand.h
│ │ ├── RACCommand.m
│ │ ├── RACCompoundDisposable.h
│ │ ├── RACCompoundDisposable.m
│ │ ├── RACCompoundDisposableProvider.d
│ │ ├── RACDelegateProxy.h
│ │ ├── RACDelegateProxy.m
│ │ ├── RACDisposable.h
│ │ ├── RACDisposable.m
│ │ ├── RACDynamicSequence.h
│ │ ├── RACDynamicSequence.m
│ │ ├── RACDynamicSignal.h
│ │ ├── RACDynamicSignal.m
│ │ ├── RACEagerSequence.h
│ │ ├── RACEagerSequence.m
│ │ ├── RACEmptySequence.h
│ │ ├── RACEmptySequence.m
│ │ ├── RACEmptySignal.h
│ │ ├── RACEmptySignal.m
│ │ ├── RACErrorSignal.h
│ │ ├── RACErrorSignal.m
│ │ ├── RACEvent.h
│ │ ├── RACEvent.m
│ │ ├── RACGroupedSignal.h
│ │ ├── RACGroupedSignal.m
│ │ ├── RACImmediateScheduler.h
│ │ ├── RACImmediateScheduler.m
│ │ ├── RACIndexSetSequence.h
│ │ ├── RACIndexSetSequence.m
│ │ ├── RACKVOChannel.h
│ │ ├── RACKVOChannel.m
│ │ ├── RACKVOProxy.h
│ │ ├── RACKVOProxy.m
│ │ ├── RACKVOTrampoline.h
│ │ ├── RACKVOTrampoline.m
│ │ ├── RACMulticastConnection+Private.h
│ │ ├── RACMulticastConnection.h
│ │ ├── RACMulticastConnection.m
│ │ ├── RACObjCRuntime.h
│ │ ├── RACObjCRuntime.m
│ │ ├── RACPassthroughSubscriber.h
│ │ ├── RACPassthroughSubscriber.m
│ │ ├── RACQueueScheduler+Subclass.h
│ │ ├── RACQueueScheduler.h
│ │ ├── RACQueueScheduler.m
│ │ ├── RACReplaySubject.h
│ │ ├── RACReplaySubject.m
│ │ ├── RACReturnSignal.h
│ │ ├── RACReturnSignal.m
│ │ ├── RACScheduler+Private.h
│ │ ├── RACScheduler+Subclass.h
│ │ ├── RACScheduler.h
│ │ ├── RACScheduler.m
│ │ ├── RACScopedDisposable.h
│ │ ├── RACScopedDisposable.m
│ │ ├── RACSequence.h
│ │ ├── RACSequence.m
│ │ ├── RACSerialDisposable.h
│ │ ├── RACSerialDisposable.m
│ │ ├── RACSignal+Operations.h
│ │ ├── RACSignal+Operations.m
│ │ ├── RACSignal.h
│ │ ├── RACSignal.m
│ │ ├── RACSignalProvider.d
│ │ ├── RACSignalSequence.h
│ │ ├── RACSignalSequence.m
│ │ ├── RACStream+Private.h
│ │ ├── RACStream.h
│ │ ├── RACStream.m
│ │ ├── RACStringSequence.h
│ │ ├── RACStringSequence.m
│ │ ├── RACSubject.h
│ │ ├── RACSubject.m
│ │ ├── RACSubscriber+Private.h
│ │ ├── RACSubscriber.h
│ │ ├── RACSubscriber.m
│ │ ├── RACSubscriptingAssignmentTrampoline.h
│ │ ├── RACSubscriptingAssignmentTrampoline.m
│ │ ├── RACSubscriptionScheduler.h
│ │ ├── RACSubscriptionScheduler.m
│ │ ├── RACTargetQueueScheduler.h
│ │ ├── RACTargetQueueScheduler.m
│ │ ├── RACTestScheduler.h
│ │ ├── RACTestScheduler.m
│ │ ├── RACTuple.h
│ │ ├── RACTuple.m
│ │ ├── RACTupleSequence.h
│ │ ├── RACTupleSequence.m
│ │ ├── RACUnarySequence.h
│ │ ├── RACUnarySequence.m
│ │ ├── RACUnit.h
│ │ ├── RACUnit.m
│ │ ├── RACValueTransformer.h
│ │ ├── RACValueTransformer.m
│ │ ├── ReactiveCocoa.h
│ │ ├── UIActionSheet+RACSignalSupport.h
│ │ ├── UIActionSheet+RACSignalSupport.m
│ │ ├── UIAlertView+RACSignalSupport.h
│ │ ├── UIAlertView+RACSignalSupport.m
│ │ ├── UIBarButtonItem+RACCommandSupport.h
│ │ ├── UIBarButtonItem+RACCommandSupport.m
│ │ ├── UIButton+RACCommandSupport.h
│ │ ├── UIButton+RACCommandSupport.m
│ │ ├── UICollectionReusableView+RACSignalSupport.h
│ │ ├── UICollectionReusableView+RACSignalSupport.m
│ │ ├── UIControl+RACSignalSupport.h
│ │ ├── UIControl+RACSignalSupport.m
│ │ ├── UIControl+RACSignalSupportPrivate.h
│ │ ├── UIControl+RACSignalSupportPrivate.m
│ │ ├── UIDatePicker+RACSignalSupport.h
│ │ ├── UIDatePicker+RACSignalSupport.m
│ │ ├── UIGestureRecognizer+RACSignalSupport.h
│ │ ├── UIGestureRecognizer+RACSignalSupport.m
│ │ ├── UIImagePickerController+RACSignalSupport.h
│ │ ├── UIImagePickerController+RACSignalSupport.m
│ │ ├── UIRefreshControl+RACCommandSupport.h
│ │ ├── UIRefreshControl+RACCommandSupport.m
│ │ ├── UISegmentedControl+RACSignalSupport.h
│ │ ├── UISegmentedControl+RACSignalSupport.m
│ │ ├── UISlider+RACSignalSupport.h
│ │ ├── UISlider+RACSignalSupport.m
│ │ ├── UIStepper+RACSignalSupport.h
│ │ ├── UIStepper+RACSignalSupport.m
│ │ ├── UISwitch+RACSignalSupport.h
│ │ ├── UISwitch+RACSignalSupport.m
│ │ ├── UITableViewCell+RACSignalSupport.h
│ │ ├── UITableViewCell+RACSignalSupport.m
│ │ ├── UITableViewHeaderFooterView+RACSignalSupport.h
│ │ ├── UITableViewHeaderFooterView+RACSignalSupport.m
│ │ ├── UITextField+RACSignalSupport.h
│ │ ├── UITextField+RACSignalSupport.m
│ │ ├── UITextView+RACSignalSupport.h
│ │ ├── UITextView+RACSignalSupport.m
│ │ └── extobjc
│ │ ├── RACEXTKeyPathCoding.h
│ │ ├── RACEXTRuntimeExtensions.h
│ │ ├── RACEXTRuntimeExtensions.m
│ │ ├── RACEXTScope.h
│ │ └── RACmetamacros.h
└── Target Support Files
│ ├── Pods-ReactiveCocoaUtilityDemo
│ ├── Info.plist
│ ├── Pods-ReactiveCocoaUtilityDemo-acknowledgements.markdown
│ ├── Pods-ReactiveCocoaUtilityDemo-acknowledgements.plist
│ ├── Pods-ReactiveCocoaUtilityDemo-dummy.m
│ ├── Pods-ReactiveCocoaUtilityDemo-frameworks.sh
│ ├── Pods-ReactiveCocoaUtilityDemo-resources.sh
│ ├── Pods-ReactiveCocoaUtilityDemo-umbrella.h
│ ├── Pods-ReactiveCocoaUtilityDemo.debug.xcconfig
│ ├── Pods-ReactiveCocoaUtilityDemo.modulemap
│ └── Pods-ReactiveCocoaUtilityDemo.release.xcconfig
│ └── ReactiveCocoa
│ ├── Info.plist
│ ├── ReactiveCocoa-dummy.m
│ ├── ReactiveCocoa-prefix.pch
│ ├── ReactiveCocoa-umbrella.h
│ ├── ReactiveCocoa.modulemap
│ └── ReactiveCocoa.xcconfig
├── README.md
├── ReactiveCocoaUtilityDemo.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── tangjr.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── tangjr.xcuserdatad
│ └── xcschemes
│ ├── ReactiveCocoaUtilityDemo.xcscheme
│ └── xcschememanagement.plist
├── ReactiveCocoaUtilityDemo.xcworkspace
├── contents.xcworkspacedata
└── xcuserdata
│ └── tangjr.xcuserdatad
│ ├── UserInterfaceState.xcuserstate
│ └── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
└── ReactiveCocoaUtilityDemo
├── AppDelegate.h
├── AppDelegate.m
├── Assets.xcassets
└── AppIcon.appiconset
│ └── Contents.json
├── Base.lproj
├── LaunchScreen.storyboard
└── Main.storyboard
├── Info.plist
├── ViewController.h
├── ViewController.m
├── block嵌套
├── BlockViewController.h
└── BlockViewController.m
├── main.m
└── 搜索
├── SearchViewController.h
└── SearchViewController.m
/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | # Uncomment this line to define a global platform for your project
4 | # platform :ios, '6.0'
5 |
6 | target 'ReactiveCocoaUtilityDemo' do
7 |
8 | pod 'ReactiveCocoa','~>2.4.7'
9 |
10 | end
11 |
12 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - ReactiveCocoa (2.4.7):
3 | - ReactiveCocoa/UI (= 2.4.7)
4 | - ReactiveCocoa/Core (2.4.7):
5 | - ReactiveCocoa/no-arc
6 | - ReactiveCocoa/no-arc (2.4.7)
7 | - ReactiveCocoa/UI (2.4.7):
8 | - ReactiveCocoa/Core
9 |
10 | DEPENDENCIES:
11 | - ReactiveCocoa (~> 2.4.7)
12 |
13 | SPEC CHECKSUMS:
14 | ReactiveCocoa: eb38dee0a0e698f73a9b25e5c1faea2bb4c79240
15 |
16 | COCOAPODS: 0.39.0.beta.4
17 |
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSArray+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSArray+RACSequenceAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSData+RACSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSData+RACSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSFileHandle+RACSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSFileHandle+RACSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSIndexSet+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSIndexSet+RACSequenceAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSInvocation+RACTypeParsing.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSInvocation+RACTypeParsing.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSNotificationCenter+RACSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSNotificationCenter+RACSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSObject+RACDeallocating.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSObject+RACDeallocating.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSObject+RACDescription.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSObject+RACDescription.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSObject+RACKVOWrapper.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSObject+RACLifting.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSObject+RACLifting.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSObject+RACPropertySubscribing.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSObject+RACPropertySubscribing.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSObject+RACSelectorSignal.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSObject+RACSelectorSignal.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSSet+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSSet+RACSequenceAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSString+RACKeyPathUtilities.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSString+RACKeyPathUtilities.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSString+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSString+RACSequenceAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSString+RACSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSString+RACSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSURLConnection+RACSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSURLConnection+RACSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/NSUserDefaults+RACSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/NSUserDefaults+RACSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACArraySequence.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACArraySequence.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACBacktrace.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACBacktrace.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACBehaviorSubject.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACBehaviorSubject.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACBlockTrampoline.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACBlockTrampoline.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACChannel.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACChannel.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACCommand.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACCommand.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACCompoundDisposable.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACCompoundDisposable.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACDelegateProxy.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACDelegateProxy.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACDisposable.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACDisposable.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACDynamicSequence.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACDynamicSequence.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACDynamicSignal.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACDynamicSignal.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACEXTKeyPathCoding.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/extobjc/RACEXTKeyPathCoding.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACEXTRuntimeExtensions.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/extobjc/RACEXTRuntimeExtensions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACEXTScope.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/extobjc/RACEXTScope.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACEagerSequence.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACEagerSequence.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACEmptySequence.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACEmptySequence.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACEmptySignal.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACEmptySignal.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACErrorSignal.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACErrorSignal.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACEvent.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACEvent.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACGroupedSignal.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACGroupedSignal.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACImmediateScheduler.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACImmediateScheduler.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACIndexSetSequence.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACIndexSetSequence.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACKVOChannel.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACKVOChannel.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACKVOProxy.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACKVOProxy.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACKVOTrampoline.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACKVOTrampoline.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACMulticastConnection+Private.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACMulticastConnection+Private.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACMulticastConnection.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACMulticastConnection.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACObjCRuntime.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACObjCRuntime.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACPassthroughSubscriber.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACPassthroughSubscriber.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACQueueScheduler+Subclass.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACQueueScheduler+Subclass.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACQueueScheduler.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACQueueScheduler.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACReplaySubject.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACReplaySubject.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACReturnSignal.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACReturnSignal.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACScheduler+Private.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACScheduler+Private.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACScheduler+Subclass.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACScheduler+Subclass.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACScheduler.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACScheduler.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACScopedDisposable.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACScopedDisposable.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACSequence.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACSequence.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACSerialDisposable.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACSerialDisposable.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACSignal+Operations.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACSignal+Operations.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACSignal.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACSignal.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACSignalSequence.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACSignalSequence.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACStream+Private.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACStream+Private.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACStream.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACStream.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACStringSequence.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACStringSequence.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACSubject.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACSubject.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACSubscriber+Private.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACSubscriber+Private.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACSubscriber.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACSubscriber.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACSubscriptionScheduler.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACSubscriptionScheduler.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACTargetQueueScheduler.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACTargetQueueScheduler.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACTestScheduler.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACTestScheduler.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACTuple.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACTuple.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACTupleSequence.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACTupleSequence.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACUnarySequence.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACUnarySequence.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACUnit.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACUnit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACValueTransformer.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/RACValueTransformer.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/RACmetamacros.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/extobjc/RACmetamacros.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/ReactiveCocoa.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/ReactiveCocoa.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIActionSheet+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIActionSheet+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIAlertView+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIAlertView+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIButton+RACCommandSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIButton+RACCommandSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UICollectionReusableView+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UICollectionReusableView+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIControl+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIDatePicker+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIDatePicker+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIImagePickerController+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIImagePickerController+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UISlider+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UISlider+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UIStepper+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UIStepper+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UISwitch+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UISwitch+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UITableViewCell+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UITableViewCell+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UITableViewHeaderFooterView+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UITableViewHeaderFooterView+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UITextField+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UITextField+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ReactiveCocoa/UITextView+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | ../../../ReactiveCocoa/ReactiveCocoa/UITextView+RACSignalSupport.h
--------------------------------------------------------------------------------
/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - ReactiveCocoa (2.4.7):
3 | - ReactiveCocoa/UI (= 2.4.7)
4 | - ReactiveCocoa/Core (2.4.7):
5 | - ReactiveCocoa/no-arc
6 | - ReactiveCocoa/no-arc (2.4.7)
7 | - ReactiveCocoa/UI (2.4.7):
8 | - ReactiveCocoa/Core
9 |
10 | DEPENDENCIES:
11 | - ReactiveCocoa (~> 2.4.7)
12 |
13 | SPEC CHECKSUMS:
14 | ReactiveCocoa: eb38dee0a0e698f73a9b25e5c1faea2bb4c79240
15 |
16 | COCOAPODS: 0.39.0.beta.4
17 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/tangjr.xcuserdatad/xcschemes/ReactiveCocoa.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/tangjr.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Pods-ReactiveCocoaUtilityDemo.xcscheme
8 |
9 | isShown
10 |
11 |
12 | ReactiveCocoa.xcscheme
13 |
14 | isShown
15 |
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 250989D8ACE30DB2ECB28AE541A1E894
21 |
22 | primary
23 |
24 |
25 | 959B1035D61C604E1ACF6869FC44006A
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/LICENSE.md:
--------------------------------------------------------------------------------
1 | **Copyright (c) 2012 - 2015, GitHub, Inc.**
2 | **All rights reserved.**
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | this software and associated documentation files (the "Software"), to deal in
6 | the Software without restriction, including without limitation the rights to
7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8 | the Software, and to permit persons to whom the Software is furnished to do so,
9 | subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSArray+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+RACSequenceAdditions.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSequence;
12 |
13 | @interface NSArray (RACSequenceAdditions)
14 |
15 | /// Creates and returns a sequence corresponding to the receiver.
16 | ///
17 | /// Mutating the receiver will not affect the sequence after it's been created.
18 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSArray+RACSequenceAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+RACSequenceAdditions.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSArray+RACSequenceAdditions.h"
10 | #import "RACArraySequence.h"
11 |
12 | @implementation NSArray (RACSequenceAdditions)
13 |
14 | - (RACSequence *)rac_sequence {
15 | return [RACArraySequence sequenceWithArray:self offset:0];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSData+RACSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSData+RACSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 5/11/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACScheduler;
12 | @class RACSignal;
13 |
14 | @interface NSData (RACSupport)
15 |
16 | // Read the data at the URL using -[NSData initWithContentsOfURL:options:error:].
17 | // Sends the data or the error.
18 | //
19 | // scheduler - cannot be nil.
20 | + (RACSignal *)rac_readContentsOfURL:(NSURL *)URL options:(NSDataReadingOptions)options scheduler:(RACScheduler *)scheduler;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSData+RACSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSData+RACSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 5/11/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "NSData+RACSupport.h"
10 | #import "RACReplaySubject.h"
11 | #import "RACScheduler.h"
12 |
13 | @implementation NSData (RACSupport)
14 |
15 | + (RACSignal *)rac_readContentsOfURL:(NSURL *)URL options:(NSDataReadingOptions)options scheduler:(RACScheduler *)scheduler {
16 | NSCParameterAssert(scheduler != nil);
17 |
18 | RACReplaySubject *subject = [RACReplaySubject subject];
19 | [subject setNameWithFormat:@"+rac_readContentsOfURL: %@ options: %lu scheduler: %@", URL, (unsigned long)options, scheduler];
20 |
21 | [scheduler schedule:^{
22 | NSError *error = nil;
23 | NSData *data = [[NSData alloc] initWithContentsOfURL:URL options:options error:&error];
24 | if (data == nil) {
25 | [subject sendError:error];
26 | } else {
27 | [subject sendNext:data];
28 | [subject sendCompleted];
29 | }
30 | }];
31 |
32 | return subject;
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSDictionary+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+RACSequenceAdditions.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSequence;
12 |
13 | @interface NSDictionary (RACSequenceAdditions)
14 |
15 | /// Creates and returns a sequence of RACTuple key/value pairs. The key will be
16 | /// the first element in the tuple, and the value will be the second.
17 | ///
18 | /// Mutating the receiver will not affect the sequence after it's been created.
19 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence;
20 |
21 | /// Creates and returns a sequence corresponding to the keys in the receiver.
22 | ///
23 | /// Mutating the receiver will not affect the sequence after it's been created.
24 | @property (nonatomic, copy, readonly) RACSequence *rac_keySequence;
25 |
26 | /// Creates and returns a sequence corresponding to the values in the receiver.
27 | ///
28 | /// Mutating the receiver will not affect the sequence after it's been created.
29 | @property (nonatomic, copy, readonly) RACSequence *rac_valueSequence;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSDictionary+RACSequenceAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+RACSequenceAdditions.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSDictionary+RACSequenceAdditions.h"
10 | #import "NSArray+RACSequenceAdditions.h"
11 | #import "RACSequence.h"
12 | #import "RACTuple.h"
13 |
14 | @implementation NSDictionary (RACSequenceAdditions)
15 |
16 | - (RACSequence *)rac_sequence {
17 | NSDictionary *immutableDict = [self copy];
18 |
19 | // TODO: First class support for dictionary sequences.
20 | return [immutableDict.allKeys.rac_sequence map:^(id key) {
21 | id value = immutableDict[key];
22 | return RACTuplePack(key, value);
23 | }];
24 | }
25 |
26 | - (RACSequence *)rac_keySequence {
27 | return self.allKeys.rac_sequence;
28 | }
29 |
30 | - (RACSequence *)rac_valueSequence {
31 | return self.allValues.rac_sequence;
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSEnumerator+RACSequenceAdditions.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 07/01/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSequence;
12 |
13 | @interface NSEnumerator (RACSequenceAdditions)
14 |
15 | /// Creates and returns a sequence corresponding to the receiver.
16 | ///
17 | /// The receiver is exhausted lazily as the sequence is enumerated.
18 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSEnumerator+RACSequenceAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSEnumerator+RACSequenceAdditions.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 07/01/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "NSEnumerator+RACSequenceAdditions.h"
10 | #import "RACSequence.h"
11 |
12 | @implementation NSEnumerator (RACSequenceAdditions)
13 |
14 | - (RACSequence *)rac_sequence {
15 | return [RACSequence sequenceWithHeadBlock:^{
16 | return [self nextObject];
17 | } tailBlock:^{
18 | return self.rac_sequence;
19 | }];
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSFileHandle+RACSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSFileHandle+RACSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 5/10/12.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSignal;
12 |
13 | @interface NSFileHandle (RACSupport)
14 |
15 | // Read any available data in the background and send it. Completes when data
16 | // length is <= 0.
17 | - (RACSignal *)rac_readInBackground;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSFileHandle+RACSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSFileHandle+RACSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 5/10/12.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSFileHandle+RACSupport.h"
10 | #import "NSNotificationCenter+RACSupport.h"
11 | #import "NSObject+RACDescription.h"
12 | #import "RACReplaySubject.h"
13 | #import "RACDisposable.h"
14 |
15 | @implementation NSFileHandle (RACSupport)
16 |
17 | - (RACSignal *)rac_readInBackground {
18 | RACReplaySubject *subject = [RACReplaySubject subject];
19 | [subject setNameWithFormat:@"%@ -rac_readInBackground", self.rac_description];
20 |
21 | RACSignal *dataNotification = [[[NSNotificationCenter defaultCenter] rac_addObserverForName:NSFileHandleReadCompletionNotification object:self] map:^(NSNotification *note) {
22 | return note.userInfo[NSFileHandleNotificationDataItem];
23 | }];
24 |
25 | __block RACDisposable *subscription = [dataNotification subscribeNext:^(NSData *data) {
26 | if (data.length > 0) {
27 | [subject sendNext:data];
28 | [self readInBackgroundAndNotify];
29 | } else {
30 | [subject sendCompleted];
31 | [subscription dispose];
32 | }
33 | }];
34 |
35 | [self readInBackgroundAndNotify];
36 |
37 | return subject;
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSIndexSet+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSIndexSet+RACSequenceAdditions.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Sergey Gavrilyuk on 12/17/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSequence;
12 |
13 | @interface NSIndexSet (RACSequenceAdditions)
14 |
15 | /// Creates and returns a sequence of indexes (as `NSNumber`s) corresponding to
16 | /// the receiver.
17 | ///
18 | /// Mutating the receiver will not affect the sequence after it's been created.
19 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSIndexSet+RACSequenceAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSIndexSet+RACSequenceAdditions.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Sergey Gavrilyuk on 12/17/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "NSIndexSet+RACSequenceAdditions.h"
10 | #import "RACIndexSetSequence.h"
11 |
12 | @implementation NSIndexSet (RACSequenceAdditions)
13 |
14 | - (RACSequence *)rac_sequence {
15 | return [RACIndexSetSequence sequenceWithIndexSet:self];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSInvocation+RACTypeParsing.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSInvocation+RACTypeParsing.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 11/17/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACTuple;
12 |
13 | // A private category of methods to handle wrapping and unwrapping of values.
14 | @interface NSInvocation (RACTypeParsing)
15 |
16 | // Sets the argument for the invocation at the given index by unboxing the given
17 | // object based on the type signature of the argument.
18 | //
19 | // This does not support C arrays or unions.
20 | //
21 | // Note that calling this on a char * or const char * argument can cause all
22 | // arguments to be retained.
23 | //
24 | // object - The object to unbox and set as the argument.
25 | // index - The index of the argument to set.
26 | - (void)rac_setArgument:(id)object atIndex:(NSUInteger)index;
27 |
28 | // Gets the argument for the invocation at the given index based on the
29 | // invocation's method signature. The value is then wrapped in the appropriate
30 | // object type.
31 | //
32 | // This does not support C arrays or unions.
33 | //
34 | // index - The index of the argument to get.
35 | //
36 | // Returns the argument of the invocation, wrapped in an object.
37 | - (id)rac_argumentAtIndex:(NSUInteger)index;
38 |
39 | // Arguments tuple for the invocation.
40 | //
41 | // The arguments tuple excludes implicit variables `self` and `_cmd`.
42 | //
43 | // See -rac_argumentAtIndex: and -rac_setArgumentAtIndex: for further
44 | // description of the underlying behavior.
45 | @property (nonatomic, copy) RACTuple *rac_argumentsTuple;
46 |
47 | // Gets the return value from the invocation based on the invocation's method
48 | // signature. The value is then wrapped in the appropriate object type.
49 | //
50 | // This does not support C arrays or unions.
51 | //
52 | // Returns the return value of the invocation, wrapped in an object. Voids are
53 | // returned as `RACUnit.defaultUnit`.
54 | - (id)rac_returnValue;
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSNotificationCenter+RACSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSNotificationCenter+RACSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 5/10/12.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSignal;
12 |
13 | @interface NSNotificationCenter (RACSupport)
14 |
15 | // Sends the NSNotification every time the notification is posted.
16 | - (RACSignal *)rac_addObserverForName:(NSString *)notificationName object:(id)object;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSNotificationCenter+RACSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSNotificationCenter+RACSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 5/10/12.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSNotificationCenter+RACSupport.h"
10 | #import "RACEXTScope.h"
11 | #import "RACSignal.h"
12 | #import "RACSubscriber.h"
13 | #import "RACDisposable.h"
14 |
15 | @implementation NSNotificationCenter (RACSupport)
16 |
17 | - (RACSignal *)rac_addObserverForName:(NSString *)notificationName object:(id)object {
18 | @unsafeify(object);
19 | return [[RACSignal createSignal:^(id subscriber) {
20 | @strongify(object);
21 | id observer = [self addObserverForName:notificationName object:object queue:nil usingBlock:^(NSNotification *note) {
22 | [subscriber sendNext:note];
23 | }];
24 |
25 | return [RACDisposable disposableWithBlock:^{
26 | [self removeObserver:observer];
27 | }];
28 | }] setNameWithFormat:@"-rac_addObserverForName: %@ object: <%@: %p>", notificationName, [object class], object];
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSObject+RACDeallocating.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+RACDeallocating.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Kazuo Koga on 2013/03/15.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACCompoundDisposable;
12 | @class RACDisposable;
13 | @class RACSignal;
14 |
15 | @interface NSObject (RACDeallocating)
16 |
17 | /// The compound disposable which will be disposed of when the receiver is
18 | /// deallocated.
19 | @property (atomic, readonly, strong) RACCompoundDisposable *rac_deallocDisposable;
20 |
21 | /// Returns a signal that will complete immediately before the receiver is fully
22 | /// deallocated. If already deallocated when the signal is subscribed to,
23 | /// a `completed` event will be sent immediately.
24 | - (RACSignal *)rac_willDeallocSignal;
25 |
26 | @end
27 |
28 | @interface NSObject (RACDeallocatingDeprecated)
29 |
30 | - (RACSignal *)rac_didDeallocSignal __attribute__((deprecated("Use -rac_willDeallocSignal")));
31 |
32 | - (void)rac_addDeallocDisposable:(RACDisposable *)disposable __attribute__((deprecated("Add disposables to -rac_deallocDisposable instead")));
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSObject+RACDescription.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+RACDescription.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-05-13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | // A private category providing a terser but faster alternative to -description.
12 | @interface NSObject (RACDescription)
13 |
14 | // A simplified description of the receiver, which does not invoke -description
15 | // (and thus should be much faster in many cases).
16 | //
17 | // This is for debugging purposes only, and will return a constant string
18 | // unless the RAC_DEBUG_SIGNAL_NAMES environment variable is set.
19 | - (NSString *)rac_description;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSObject+RACDescription.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+RACDescription.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-05-13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "NSObject+RACDescription.h"
10 | #import "RACTuple.h"
11 |
12 | @implementation NSObject (RACDescription)
13 |
14 | - (NSString *)rac_description {
15 | if (getenv("RAC_DEBUG_SIGNAL_NAMES") != NULL) {
16 | return [[NSString alloc] initWithFormat:@"<%@: %p>", self.class, self];
17 | } else {
18 | return @"(description skipped)";
19 | }
20 | }
21 |
22 | @end
23 |
24 | @implementation NSValue (RACDescription)
25 |
26 | - (NSString *)rac_description {
27 | return self.description;
28 | }
29 |
30 | @end
31 |
32 | @implementation NSString (RACDescription)
33 |
34 | - (NSString *)rac_description {
35 | return self.description;
36 | }
37 |
38 | @end
39 |
40 | @implementation RACTuple (RACDescription)
41 |
42 | - (NSString *)rac_description {
43 | if (getenv("RAC_DEBUG_SIGNAL_NAMES") != NULL) {
44 | return self.allObjects.description;
45 | } else {
46 | return @"(description skipped)";
47 | }
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+RACKVOWrapper.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 10/11/11.
6 | // Copyright (c) 2011 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACDisposable;
12 | @class RACKVOTrampoline;
13 |
14 | // A private category providing a block based interface to KVO.
15 | @interface NSObject (RACKVOWrapper)
16 |
17 | // Adds the given block as the callbacks for when the key path changes.
18 | //
19 | // Unlike direct KVO observation, this handles deallocation of `weak` properties
20 | // by generating an appropriate notification. This will only occur if there is
21 | // an `@property` declaration visible in the observed class, with the `weak`
22 | // memory management attribute.
23 | //
24 | // The observation does not need to be explicitly removed. It will be removed
25 | // when the observer or the receiver deallocate.
26 | //
27 | // keyPath - The key path to observe. Must not be nil.
28 | // options - The KVO observation options.
29 | // observer - The object that requested the observation. May be nil.
30 | // block - The block called when the value at the key path changes. It is
31 | // passed the current value of the key path and the extended KVO
32 | // change dictionary including RAC-specific keys and values. Must not
33 | // be nil.
34 | //
35 | // Returns a disposable that can be used to stop the observation.
36 | - (RACDisposable *)rac_observeKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(__weak NSObject *)observer block:(void (^)(id value, NSDictionary *change, BOOL causedByDealloc, BOOL affectedOnlyLastComponent))block;
37 |
38 | @end
39 |
40 | typedef void (^RACKVOBlock)(id target, id observer, NSDictionary *change);
41 |
42 | @interface NSObject (RACKVOWrapperDeprecated)
43 |
44 | - (RACKVOTrampoline *)rac_addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options block:(RACKVOBlock)block __attribute((deprecated("Use rac_observeKeyPath:options:observer:block: instead.")));
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSOrderedSet+RACSequenceAdditions.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSequence;
12 |
13 | @interface NSOrderedSet (RACSequenceAdditions)
14 |
15 | /// Creates and returns a sequence corresponding to the receiver.
16 | ///
17 | /// Mutating the receiver will not affect the sequence after it's been created.
18 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSOrderedSet+RACSequenceAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSOrderedSet+RACSequenceAdditions.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSOrderedSet+RACSequenceAdditions.h"
10 | #import "NSArray+RACSequenceAdditions.h"
11 |
12 | @implementation NSOrderedSet (RACSequenceAdditions)
13 |
14 | - (RACSequence *)rac_sequence {
15 | // TODO: First class support for ordered set sequences.
16 | return self.array.rac_sequence;
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSSet+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSSet+RACSequenceAdditions.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSequence;
12 |
13 | @interface NSSet (RACSequenceAdditions)
14 |
15 | /// Creates and returns a sequence corresponding to the receiver.
16 | ///
17 | /// Mutating the receiver will not affect the sequence after it's been created.
18 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSSet+RACSequenceAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSSet+RACSequenceAdditions.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSSet+RACSequenceAdditions.h"
10 | #import "NSArray+RACSequenceAdditions.h"
11 |
12 | @implementation NSSet (RACSequenceAdditions)
13 |
14 | - (RACSequence *)rac_sequence {
15 | // TODO: First class support for set sequences.
16 | return self.allObjects.rac_sequence;
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSString+RACKeyPathUtilities.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+RACKeyPathUtilities.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 05/05/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | // A private category of methods to extract parts of a key path.
12 | @interface NSString (RACKeyPathUtilities)
13 |
14 | // Returns an array of the components of the receiver.
15 | //
16 | // Calling this method on a string that isn't a key path is considered undefined
17 | // behavior.
18 | - (NSArray *)rac_keyPathComponents;
19 |
20 | // Returns a key path with all the components of the receiver except for the
21 | // last one.
22 | //
23 | // Calling this method on a string that isn't a key path is considered undefined
24 | // behavior.
25 | - (NSString *)rac_keyPathByDeletingLastKeyPathComponent;
26 |
27 | // Returns a key path with all the components of the receiver expect for the
28 | // first one.
29 | //
30 | // Calling this method on a string that isn't a key path is considered undefined
31 | // behavior.
32 | - (NSString *)rac_keyPathByDeletingFirstKeyPathComponent;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSString+RACKeyPathUtilities.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+RACKeyPathUtilities.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 05/05/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "NSString+RACKeyPathUtilities.h"
10 |
11 | @implementation NSString (RACKeyPathUtilities)
12 |
13 | - (NSArray *)rac_keyPathComponents {
14 | if (self.length == 0) {
15 | return nil;
16 | }
17 | return [self componentsSeparatedByString:@"."];
18 | }
19 |
20 | - (NSString *)rac_keyPathByDeletingLastKeyPathComponent {
21 | NSUInteger lastDotIndex = [self rangeOfString:@"." options:NSBackwardsSearch].location;
22 | if (lastDotIndex == NSNotFound) {
23 | return nil;
24 | }
25 | return [self substringToIndex:lastDotIndex];
26 | }
27 |
28 | - (NSString *)rac_keyPathByDeletingFirstKeyPathComponent {
29 | NSUInteger firstDotIndex = [self rangeOfString:@"."].location;
30 | if (firstDotIndex == NSNotFound) {
31 | return nil;
32 | }
33 | return [self substringFromIndex:firstDotIndex + 1];
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSString+RACSequenceAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+RACSequenceAdditions.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSequence;
12 |
13 | @interface NSString (RACSequenceAdditions)
14 |
15 | /// Creates and returns a sequence containing strings corresponding to each
16 | /// composed character sequence in the receiver.
17 | ///
18 | /// Mutating the receiver will not affect the sequence after it's been created.
19 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSString+RACSequenceAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+RACSequenceAdditions.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSString+RACSequenceAdditions.h"
10 | #import "RACStringSequence.h"
11 |
12 | @implementation NSString (RACSequenceAdditions)
13 |
14 | - (RACSequence *)rac_sequence {
15 | return [RACStringSequence sequenceWithString:self offset:0];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSString+RACSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+RACSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 5/11/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACScheduler;
12 | @class RACSignal;
13 |
14 | @interface NSString (RACSupport)
15 |
16 | // Reads in the contents of the file using +[NSString stringWithContentsOfURL:usedEncoding:error:].
17 | // Note that encoding won't be valid until the signal completes successfully.
18 | //
19 | // scheduler - cannot be nil.
20 | + (RACSignal *)rac_readContentsOfURL:(NSURL *)URL usedEncoding:(NSStringEncoding *)encoding scheduler:(RACScheduler *)scheduler;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSString+RACSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+RACSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 5/11/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "NSString+RACSupport.h"
10 | #import "RACReplaySubject.h"
11 | #import "RACScheduler.h"
12 |
13 | @implementation NSString (RACSupport)
14 |
15 | + (RACSignal *)rac_readContentsOfURL:(NSURL *)URL usedEncoding:(NSStringEncoding *)encoding scheduler:(RACScheduler *)scheduler {
16 | NSCParameterAssert(scheduler != nil);
17 |
18 | RACReplaySubject *subject = [RACReplaySubject subject];
19 | [subject setNameWithFormat:@"+rac_readContentsOfURL: %@ usedEncoding:scheduler: %@", URL, scheduler];
20 |
21 | [scheduler schedule:^{
22 | NSError *error = nil;
23 | NSString *string = [NSString stringWithContentsOfURL:URL usedEncoding:encoding error:&error];
24 | if (string == nil) {
25 | [subject sendError:error];
26 | } else {
27 | [subject sendNext:string];
28 | [subject sendCompleted];
29 | }
30 | }];
31 |
32 | return subject;
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSURLConnection+RACSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSURLConnection+RACSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-10-01.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSignal;
12 |
13 | @interface NSURLConnection (RACSupport)
14 |
15 | // Lazily loads data for the given request in the background.
16 | //
17 | // request - The URL request to load. This must not be nil.
18 | //
19 | // Returns a signal which will begin loading the request upon each subscription,
20 | // then send a `RACTuple` of the received `NSURLResponse` and downloaded
21 | // `NSData`, and complete on a background thread. If any errors occur, the
22 | // returned signal will error out.
23 | + (RACSignal *)rac_sendAsynchronousRequest:(NSURLRequest *)request;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSURLConnection+RACSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSURLConnection+RACSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-10-01.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "NSURLConnection+RACSupport.h"
10 | #import "RACDisposable.h"
11 | #import "RACSignal.h"
12 | #import "RACSubscriber.h"
13 | #import "RACTuple.h"
14 |
15 | @implementation NSURLConnection (RACSupport)
16 |
17 | + (RACSignal *)rac_sendAsynchronousRequest:(NSURLRequest *)request {
18 | NSCParameterAssert(request != nil);
19 |
20 | return [[RACSignal
21 | createSignal:^(id subscriber) {
22 | NSOperationQueue *queue = [[NSOperationQueue alloc] init];
23 | queue.name = @"org.reactivecocoa.ReactiveCocoa.NSURLConnectionRACSupport";
24 |
25 | [NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
26 | // The docs say that `nil` data means an error occurred, but
27 | // `nil` responses can also occur in practice (circumstances
28 | // unknown). Consider either to be an error.
29 | //
30 | // Note that _empty_ data is not necessarily erroneous, as there
31 | // may be headers but no HTTP body.
32 | if (response == nil || data == nil) {
33 | [subscriber sendError:error];
34 | } else {
35 | [subscriber sendNext:RACTuplePack(response, data)];
36 | [subscriber sendCompleted];
37 | }
38 | }];
39 |
40 | return [RACDisposable disposableWithBlock:^{
41 | // It's not clear if this will actually cancel the connection,
42 | // but we can at least prevent _some_ unnecessary work --
43 | // without writing all the code for a proper delegate, which
44 | // doesn't really belong in RAC.
45 | queue.suspended = YES;
46 | [queue cancelAllOperations];
47 | }];
48 | }]
49 | setNameWithFormat:@"+rac_sendAsynchronousRequest: %@", request];
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSUserDefaults+RACSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSUserDefaults+RACSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Matt Diephouse on 12/19/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACChannelTerminal;
12 |
13 | @interface NSUserDefaults (RACSupport)
14 |
15 | /// Creates and returns a terminal for binding the user defaults key.
16 | ///
17 | /// **Note:** The value in the user defaults is *asynchronously* updated with
18 | /// values sent to the channel.
19 | ///
20 | /// key - The user defaults key to create the channel terminal for.
21 | ///
22 | /// Returns a channel terminal that sends the value of the user defaults key
23 | /// upon subscription, sends an updated value whenever the default changes, and
24 | /// updates the default asynchronously with values it receives.
25 | - (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/NSUserDefaults+RACSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSUserDefaults+RACSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Matt Diephouse on 12/19/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "NSUserDefaults+RACSupport.h"
10 | #import "RACEXTScope.h"
11 | #import "NSNotificationCenter+RACSupport.h"
12 | #import "NSObject+RACDeallocating.h"
13 | #import "RACChannel.h"
14 | #import "RACScheduler.h"
15 | #import "RACSignal+Operations.h"
16 |
17 | @implementation NSUserDefaults (RACSupport)
18 |
19 | - (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key {
20 | RACChannel *channel = [RACChannel new];
21 |
22 | RACScheduler *scheduler = [RACScheduler scheduler];
23 | __block BOOL ignoreNextValue = NO;
24 |
25 | @weakify(self);
26 | [[[[[[[NSNotificationCenter.defaultCenter
27 | rac_addObserverForName:NSUserDefaultsDidChangeNotification object:self]
28 | map:^(id _) {
29 | @strongify(self);
30 | return [self objectForKey:key];
31 | }]
32 | startWith:[self objectForKey:key]]
33 | // Don't send values that were set on the other side of the terminal.
34 | filter:^ BOOL (id _) {
35 | if (RACScheduler.currentScheduler == scheduler && ignoreNextValue) {
36 | ignoreNextValue = NO;
37 | return NO;
38 | }
39 | return YES;
40 | }]
41 | distinctUntilChanged]
42 | takeUntil:self.rac_willDeallocSignal]
43 | subscribe:channel.leadingTerminal];
44 |
45 | [[channel.leadingTerminal
46 | deliverOn:scheduler]
47 | subscribeNext:^(id value) {
48 | @strongify(self);
49 | ignoreNextValue = YES;
50 | [self setObject:value forKey:key];
51 | }];
52 |
53 | return channel.followingTerminal;
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACArraySequence.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACArraySequence.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "RACSequence.h"
10 |
11 | // Private class that adapts an array to the RACSequence interface.
12 | @interface RACArraySequence : RACSequence
13 |
14 | // Returns a sequence for enumerating over the given array, starting from the
15 | // given offset. The array will be copied to prevent mutation.
16 | + (instancetype)sequenceWithArray:(NSArray *)array offset:(NSUInteger)offset;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACBehaviorSubject.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACBehaviorSubject.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/16/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSubject.h"
10 |
11 | /// A behavior subject sends the last value it received when it is subscribed to.
12 | @interface RACBehaviorSubject : RACSubject
13 |
14 | /// Creates a new behavior subject with a default value. If it hasn't received
15 | /// any values when it gets subscribed to, it sends the default value.
16 | + (instancetype)behaviorSubjectWithDefaultValue:(id)value;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACBehaviorSubject.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACBehaviorSubject.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/16/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACBehaviorSubject.h"
10 | #import "RACDisposable.h"
11 | #import "RACScheduler+Private.h"
12 |
13 | @interface RACBehaviorSubject ()
14 |
15 | // This property should only be used while synchronized on self.
16 | @property (nonatomic, strong) id currentValue;
17 |
18 | @end
19 |
20 | @implementation RACBehaviorSubject
21 |
22 | #pragma mark Lifecycle
23 |
24 | + (instancetype)behaviorSubjectWithDefaultValue:(id)value {
25 | RACBehaviorSubject *subject = [self subject];
26 | subject.currentValue = value;
27 | return subject;
28 | }
29 |
30 | #pragma mark RACSignal
31 |
32 | - (RACDisposable *)subscribe:(id)subscriber {
33 | RACDisposable *subscriptionDisposable = [super subscribe:subscriber];
34 |
35 | RACDisposable *schedulingDisposable = [RACScheduler.subscriptionScheduler schedule:^{
36 | @synchronized (self) {
37 | [subscriber sendNext:self.currentValue];
38 | }
39 | }];
40 |
41 | return [RACDisposable disposableWithBlock:^{
42 | [subscriptionDisposable dispose];
43 | [schedulingDisposable dispose];
44 | }];
45 | }
46 |
47 | #pragma mark RACSubscriber
48 |
49 | - (void)sendNext:(id)value {
50 | @synchronized (self) {
51 | self.currentValue = value;
52 | [super sendNext:value];
53 | }
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACBlockTrampoline.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACBlockTrampoline.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 10/21/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACTuple;
12 |
13 | // A private class that allows a limited type of dynamic block invocation.
14 | @interface RACBlockTrampoline : NSObject
15 |
16 | // Invokes the given block with the given arguments. All of the block's
17 | // argument types must be objects and it must be typed to return an object.
18 | //
19 | // At this time, it only supports blocks that take up to 15 arguments. Any more
20 | // is just cray.
21 | //
22 | // block - The block to invoke. Must accept as many arguments as are given in
23 | // the arguments array. Cannot be nil.
24 | // arguments - The arguments with which to invoke the block. `RACTupleNil`s will
25 | // be passed as nils.
26 | //
27 | // Returns the return value of invoking the block.
28 | + (id)invokeBlock:(id)block withArguments:(RACTuple *)arguments;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACCompoundDisposable.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACCompoundDisposable.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 11/30/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACDisposable.h"
10 |
11 | /// A disposable of disposables. When it is disposed, it disposes of all its
12 | /// contained disposables.
13 | ///
14 | /// If -addDisposable: is called after the compound disposable has been disposed
15 | /// of, the given disposable is immediately disposed. This allows a compound
16 | /// disposable to act as a stand-in for a disposable that will be delivered
17 | /// asynchronously.
18 | @interface RACCompoundDisposable : RACDisposable
19 |
20 | /// Creates and returns a new compound disposable.
21 | + (instancetype)compoundDisposable;
22 |
23 | /// Creates and returns a new compound disposable containing the given
24 | /// disposables.
25 | + (instancetype)compoundDisposableWithDisposables:(NSArray *)disposables;
26 |
27 | /// Adds the given disposable. If the receiving disposable has already been
28 | /// disposed of, the given disposable is disposed immediately.
29 | ///
30 | /// This method is thread-safe.
31 | ///
32 | /// disposable - The disposable to add. This may be nil, in which case nothing
33 | /// happens.
34 | - (void)addDisposable:(RACDisposable *)disposable;
35 |
36 | /// Removes the specified disposable from the compound disposable (regardless of
37 | /// its disposed status), or does nothing if it's not in the compound disposable.
38 | ///
39 | /// This is mainly useful for limiting the memory usage of the compound
40 | /// disposable for long-running operations.
41 | ///
42 | /// This method is thread-safe.
43 | ///
44 | /// disposable - The disposable to remove. This argument may be nil (to make the
45 | /// use of weak references easier).
46 | - (void)removeDisposable:(RACDisposable *)disposable;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACCompoundDisposableProvider.d:
--------------------------------------------------------------------------------
1 | provider RACCompoundDisposable {
2 | probe added(char *compoundDisposable, char *disposable, long newTotal);
3 | probe removed(char *compoundDisposable, char *disposable, long newTotal);
4 | };
5 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACDelegateProxy.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACDelegateProxy.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Cody Krieger on 5/19/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSignal;
12 |
13 | // A private delegate object suitable for using
14 | // -rac_signalForSelector:fromProtocol: upon.
15 | @interface RACDelegateProxy : NSObject
16 |
17 | // The delegate to which messages should be forwarded if not handled by
18 | // any -signalForSelector: applications.
19 | @property (nonatomic, unsafe_unretained) id rac_proxiedDelegate;
20 |
21 | // Creates a delegate proxy capable of responding to selectors from `protocol`.
22 | - (instancetype)initWithProtocol:(Protocol *)protocol;
23 |
24 | // Calls -rac_signalForSelector:fromProtocol: using the `protocol` specified
25 | // during initialization.
26 | - (RACSignal *)signalForSelector:(SEL)selector;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACDelegateProxy.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACDelegateProxy.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Cody Krieger on 5/19/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACDelegateProxy.h"
10 | #import "NSObject+RACSelectorSignal.h"
11 | #import
12 |
13 | @interface RACDelegateProxy () {
14 | // Declared as an ivar to avoid method naming conflicts.
15 | Protocol *_protocol;
16 | }
17 |
18 | @end
19 |
20 | @implementation RACDelegateProxy
21 |
22 | #pragma mark Lifecycle
23 |
24 | - (instancetype)initWithProtocol:(Protocol *)protocol {
25 | NSCParameterAssert(protocol != NULL);
26 |
27 | self = [super init];
28 | if (self == nil) return nil;
29 |
30 | class_addProtocol(self.class, protocol);
31 |
32 | _protocol = protocol;
33 |
34 | return self;
35 | }
36 |
37 | #pragma mark API
38 |
39 | - (RACSignal *)signalForSelector:(SEL)selector {
40 | return [self rac_signalForSelector:selector fromProtocol:_protocol];
41 | }
42 |
43 | #pragma mark NSObject
44 |
45 | - (BOOL)isProxy {
46 | return YES;
47 | }
48 |
49 | - (void)forwardInvocation:(NSInvocation *)invocation {
50 | [invocation invokeWithTarget:self.rac_proxiedDelegate];
51 | }
52 |
53 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector {
54 | // Look for the selector as an optional instance method.
55 | struct objc_method_description methodDescription = protocol_getMethodDescription(_protocol, selector, NO, YES);
56 |
57 | if (methodDescription.name == NULL) {
58 | // Then fall back to looking for a required instance
59 | // method.
60 | methodDescription = protocol_getMethodDescription(_protocol, selector, YES, YES);
61 | if (methodDescription.name == NULL) return [super methodSignatureForSelector:selector];
62 | }
63 |
64 | return [NSMethodSignature signatureWithObjCTypes:methodDescription.types];
65 | }
66 |
67 | - (BOOL)respondsToSelector:(SEL)selector {
68 | // Add the delegate to the autorelease pool, so it doesn't get deallocated
69 | // between this method call and -forwardInvocation:.
70 | __autoreleasing id delegate = self.rac_proxiedDelegate;
71 | if ([delegate respondsToSelector:selector]) return YES;
72 |
73 | return [super respondsToSelector:selector];
74 | }
75 |
76 | @end
77 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACDisposable.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACDisposable.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/16/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACScopedDisposable;
12 |
13 | /// A disposable encapsulates the work necessary to tear down and cleanup a
14 | /// subscription.
15 | @interface RACDisposable : NSObject
16 |
17 | /// Whether the receiver has been disposed.
18 | ///
19 | /// Use of this property is discouraged, since it may be set to `YES`
20 | /// concurrently at any time.
21 | ///
22 | /// This property is not KVO-compliant.
23 | @property (atomic, assign, getter = isDisposed, readonly) BOOL disposed;
24 |
25 | + (instancetype)disposableWithBlock:(void (^)(void))block;
26 |
27 | /// Performs the disposal work. Can be called multiple times, though subsequent
28 | /// calls won't do anything.
29 | - (void)dispose;
30 |
31 | /// Returns a new disposable which will dispose of this disposable when it gets
32 | /// dealloc'd.
33 | - (RACScopedDisposable *)asScopedDisposable;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACDisposable.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACDisposable.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/16/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACDisposable.h"
10 | #import "RACScopedDisposable.h"
11 | #import
12 |
13 | @interface RACDisposable () {
14 | // A copied block of type void (^)(void) containing the logic for disposal,
15 | // a pointer to `self` if no logic should be performed upon disposal, or
16 | // NULL if the receiver is already disposed.
17 | //
18 | // This should only be used atomically.
19 | void * volatile _disposeBlock;
20 | }
21 |
22 | @end
23 |
24 | @implementation RACDisposable
25 |
26 | #pragma mark Properties
27 |
28 | - (BOOL)isDisposed {
29 | return _disposeBlock == NULL;
30 | }
31 |
32 | #pragma mark Lifecycle
33 |
34 | - (id)init {
35 | self = [super init];
36 | if (self == nil) return nil;
37 |
38 | _disposeBlock = (__bridge void *)self;
39 | OSMemoryBarrier();
40 |
41 | return self;
42 | }
43 |
44 | - (id)initWithBlock:(void (^)(void))block {
45 | NSCParameterAssert(block != nil);
46 |
47 | self = [super init];
48 | if (self == nil) return nil;
49 |
50 | _disposeBlock = (void *)CFBridgingRetain([block copy]);
51 | OSMemoryBarrier();
52 |
53 | return self;
54 | }
55 |
56 | + (instancetype)disposableWithBlock:(void (^)(void))block {
57 | return [[self alloc] initWithBlock:block];
58 | }
59 |
60 | - (void)dealloc {
61 | if (_disposeBlock == NULL || _disposeBlock == (__bridge void *)self) return;
62 |
63 | CFRelease(_disposeBlock);
64 | _disposeBlock = NULL;
65 | }
66 |
67 | #pragma mark Disposal
68 |
69 | - (void)dispose {
70 | void (^disposeBlock)(void) = NULL;
71 |
72 | while (YES) {
73 | void *blockPtr = _disposeBlock;
74 | if (OSAtomicCompareAndSwapPtrBarrier(blockPtr, NULL, &_disposeBlock)) {
75 | if (blockPtr != (__bridge void *)self) {
76 | disposeBlock = CFBridgingRelease(blockPtr);
77 | }
78 |
79 | break;
80 | }
81 | }
82 |
83 | if (disposeBlock != nil) disposeBlock();
84 | }
85 |
86 | #pragma mark Scoped Disposables
87 |
88 | - (RACScopedDisposable *)asScopedDisposable {
89 | return [RACScopedDisposable scopedDisposableWithDisposable:self];
90 | }
91 |
92 | @end
93 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACDynamicSequence.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACDynamicSequence.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "RACSequence.h"
10 |
11 | // Private class that implements a sequence dynamically using blocks.
12 | @interface RACDynamicSequence : RACSequence
13 |
14 | // Returns a sequence which evaluates `dependencyBlock` only once, the first
15 | // time either `headBlock` or `tailBlock` is evaluated. The result of
16 | // `dependencyBlock` will be passed into `headBlock` and `tailBlock` when
17 | // invoked.
18 | + (RACSequence *)sequenceWithLazyDependency:(id (^)(void))dependencyBlock headBlock:(id (^)(id dependency))headBlock tailBlock:(RACSequence *(^)(id dependency))tailBlock;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACDynamicSignal.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACDynamicSignal.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-10-10.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSignal.h"
10 |
11 | // A private `RACSignal` subclasses that implements its subscription behavior
12 | // using a block.
13 | @interface RACDynamicSignal : RACSignal
14 |
15 | + (RACSignal *)createSignal:(RACDisposable * (^)(id subscriber))didSubscribe;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACDynamicSignal.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACDynamicSignal.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-10-10.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACDynamicSignal.h"
10 | #import "RACEXTScope.h"
11 | #import "RACCompoundDisposable.h"
12 | #import "RACPassthroughSubscriber.h"
13 | #import "RACScheduler+Private.h"
14 | #import "RACSubscriber.h"
15 | #import
16 |
17 | @interface RACDynamicSignal ()
18 |
19 | // The block to invoke for each subscriber.
20 | @property (nonatomic, copy, readonly) RACDisposable * (^didSubscribe)(id subscriber);
21 |
22 | @end
23 |
24 | @implementation RACDynamicSignal
25 |
26 | #pragma mark Lifecycle
27 |
28 | + (RACSignal *)createSignal:(RACDisposable * (^)(id subscriber))didSubscribe {
29 | RACDynamicSignal *signal = [[self alloc] init];
30 | signal->_didSubscribe = [didSubscribe copy];
31 | return [signal setNameWithFormat:@"+createSignal:"];
32 | }
33 |
34 | #pragma mark Managing Subscribers
35 |
36 | - (RACDisposable *)subscribe:(id)subscriber {
37 | NSCParameterAssert(subscriber != nil);
38 |
39 | RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable];
40 | subscriber = [[RACPassthroughSubscriber alloc] initWithSubscriber:subscriber signal:self disposable:disposable];
41 |
42 | if (self.didSubscribe != NULL) {
43 | RACDisposable *schedulingDisposable = [RACScheduler.subscriptionScheduler schedule:^{
44 | RACDisposable *innerDisposable = self.didSubscribe(subscriber);
45 | [disposable addDisposable:innerDisposable];
46 | }];
47 |
48 | [disposable addDisposable:schedulingDisposable];
49 | }
50 |
51 | return disposable;
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACEagerSequence.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACEagerSequence.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 02/01/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACArraySequence.h"
10 |
11 | // Private class that implements an eager sequence.
12 | @interface RACEagerSequence : RACArraySequence
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACEagerSequence.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACEagerSequence.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 02/01/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACEagerSequence.h"
10 | #import "NSObject+RACDescription.h"
11 | #import "RACArraySequence.h"
12 |
13 | @implementation RACEagerSequence
14 |
15 | #pragma mark RACStream
16 |
17 | + (instancetype)return:(id)value {
18 | return [[self sequenceWithArray:@[ value ] offset:0] setNameWithFormat:@"+return: %@", [value rac_description]];
19 | }
20 |
21 | - (instancetype)bind:(RACStreamBindBlock (^)(void))block {
22 | NSCParameterAssert(block != nil);
23 | RACStreamBindBlock bindBlock = block();
24 | NSArray *currentArray = self.array;
25 | NSMutableArray *resultArray = [NSMutableArray arrayWithCapacity:currentArray.count];
26 |
27 | for (id value in currentArray) {
28 | BOOL stop = NO;
29 | RACSequence *boundValue = (id)bindBlock(value, &stop);
30 | if (boundValue == nil) break;
31 |
32 | for (id x in boundValue) {
33 | [resultArray addObject:x];
34 | }
35 |
36 | if (stop) break;
37 | }
38 |
39 | return [[self.class sequenceWithArray:resultArray offset:0] setNameWithFormat:@"[%@] -bind:", self.name];
40 | }
41 |
42 | - (instancetype)concat:(RACSequence *)sequence {
43 | NSCParameterAssert(sequence != nil);
44 | NSCParameterAssert([sequence isKindOfClass:RACSequence.class]);
45 |
46 | NSArray *array = [self.array arrayByAddingObjectsFromArray:sequence.array];
47 | return [[self.class sequenceWithArray:array offset:0] setNameWithFormat:@"[%@] -concat: %@", self.name, sequence];
48 | }
49 |
50 | #pragma mark Extended methods
51 |
52 | - (RACSequence *)eagerSequence {
53 | return self;
54 | }
55 |
56 | - (RACSequence *)lazySequence {
57 | return [RACArraySequence sequenceWithArray:self.array offset:0];
58 | }
59 |
60 | - (id)foldRightWithStart:(id)start reduce:(id (^)(id, RACSequence *rest))reduce {
61 | return [super foldRightWithStart:start reduce:^(id first, RACSequence *rest) {
62 | return reduce(first, rest.eagerSequence);
63 | }];
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACEmptySequence.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACEmptySequence.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "RACSequence.h"
10 |
11 | // Private class representing an empty sequence.
12 | @interface RACEmptySequence : RACSequence
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACEmptySequence.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACEmptySequence.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "RACEmptySequence.h"
10 |
11 | @implementation RACEmptySequence
12 |
13 | #pragma mark Lifecycle
14 |
15 | + (instancetype)empty {
16 | static id singleton;
17 | static dispatch_once_t pred;
18 |
19 | dispatch_once(&pred, ^{
20 | singleton = [[self alloc] init];
21 | });
22 |
23 | return singleton;
24 | }
25 |
26 | #pragma mark RACSequence
27 |
28 | - (id)head {
29 | return nil;
30 | }
31 |
32 | - (RACSequence *)tail {
33 | return nil;
34 | }
35 |
36 | - (RACSequence *)bind:(RACStreamBindBlock)bindBlock passingThroughValuesFromSequence:(RACSequence *)passthroughSequence {
37 | return passthroughSequence ?: self;
38 | }
39 |
40 | #pragma mark NSCoding
41 |
42 | - (Class)classForCoder {
43 | // Empty sequences should be encoded as themselves, not array sequences.
44 | return self.class;
45 | }
46 |
47 | - (id)initWithCoder:(NSCoder *)coder {
48 | // Return the singleton.
49 | return self.class.empty;
50 | }
51 |
52 | - (void)encodeWithCoder:(NSCoder *)coder {
53 | }
54 |
55 | #pragma mark NSObject
56 |
57 | - (NSString *)description {
58 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@ }", self.class, self, self.name];
59 | }
60 |
61 | - (NSUInteger)hash {
62 | // This hash isn't ideal, but it's better than -[RACSequence hash], which
63 | // would just be zero because we have no head.
64 | return (NSUInteger)(__bridge void *)self;
65 | }
66 |
67 | - (BOOL)isEqual:(RACSequence *)seq {
68 | return (self == seq);
69 | }
70 |
71 | @end
72 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACEmptySignal.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACEmptySignal.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-10-10.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSignal.h"
10 |
11 | // A private `RACSignal` subclasses that synchronously sends completed to any
12 | // subscribers.
13 | @interface RACEmptySignal : RACSignal
14 |
15 | + (RACSignal *)empty;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACEmptySignal.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACEmptySignal.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-10-10.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACEmptySignal.h"
10 | #import "RACScheduler+Private.h"
11 | #import "RACSubscriber.h"
12 |
13 | @implementation RACEmptySignal
14 |
15 | #pragma mark Properties
16 |
17 | // Only allow this signal's name to be customized in DEBUG, since it's
18 | // a singleton in release builds (see +empty).
19 | - (void)setName:(NSString *)name {
20 | #ifdef DEBUG
21 | [super setName:name];
22 | #endif
23 | }
24 |
25 | - (NSString *)name {
26 | #ifdef DEBUG
27 | return super.name;
28 | #else
29 | return @"+empty";
30 | #endif
31 | }
32 |
33 | #pragma mark Lifecycle
34 |
35 | + (RACSignal *)empty {
36 | #ifdef DEBUG
37 | // Create multiple instances of this class in DEBUG so users can set custom
38 | // names on each.
39 | return [[[self alloc] init] setNameWithFormat:@"+empty"];
40 | #else
41 | static id singleton;
42 | static dispatch_once_t pred;
43 |
44 | dispatch_once(&pred, ^{
45 | singleton = [[self alloc] init];
46 | });
47 |
48 | return singleton;
49 | #endif
50 | }
51 |
52 | #pragma mark Subscription
53 |
54 | - (RACDisposable *)subscribe:(id)subscriber {
55 | NSCParameterAssert(subscriber != nil);
56 |
57 | return [RACScheduler.subscriptionScheduler schedule:^{
58 | [subscriber sendCompleted];
59 | }];
60 | }
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACErrorSignal.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACErrorSignal.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-10-10.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSignal.h"
10 |
11 | // A private `RACSignal` subclasses that synchronously sends an error to any
12 | // subscribers.
13 | @interface RACErrorSignal : RACSignal
14 |
15 | + (RACSignal *)error:(NSError *)error;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACErrorSignal.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACErrorSignal.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-10-10.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACErrorSignal.h"
10 | #import "RACScheduler+Private.h"
11 | #import "RACSubscriber.h"
12 |
13 | @interface RACErrorSignal ()
14 |
15 | // The error to send upon subscription.
16 | @property (nonatomic, strong, readonly) NSError *error;
17 |
18 | @end
19 |
20 | @implementation RACErrorSignal
21 |
22 | #pragma mark Lifecycle
23 |
24 | + (RACSignal *)error:(NSError *)error {
25 | RACErrorSignal *signal = [[self alloc] init];
26 | signal->_error = error;
27 |
28 | #ifdef DEBUG
29 | [signal setNameWithFormat:@"+error: %@", error];
30 | #else
31 | signal.name = @"+error:";
32 | #endif
33 |
34 | return signal;
35 | }
36 |
37 | #pragma mark Subscription
38 |
39 | - (RACDisposable *)subscribe:(id)subscriber {
40 | NSCParameterAssert(subscriber != nil);
41 |
42 | return [RACScheduler.subscriptionScheduler schedule:^{
43 | [subscriber sendError:self.error];
44 | }];
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACEvent.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACEvent.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-01-07.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /// Describes the type of a RACEvent.
12 | ///
13 | /// RACEventTypeCompleted - A `completed` event.
14 | /// RACEventTypeError - An `error` event.
15 | /// RACEventTypeNext - A `next` event.
16 | typedef enum : NSUInteger {
17 | RACEventTypeCompleted,
18 | RACEventTypeError,
19 | RACEventTypeNext
20 | } RACEventType;
21 |
22 | /// Represents an event sent by a RACSignal.
23 | ///
24 | /// This corresponds to the `Notification` class in Rx.
25 | @interface RACEvent : NSObject
26 |
27 | /// Returns a singleton RACEvent representing the `completed` event.
28 | + (instancetype)completedEvent;
29 |
30 | /// Returns a new event of type RACEventTypeError, containing the given error.
31 | + (instancetype)eventWithError:(NSError *)error;
32 |
33 | /// Returns a new event of type RACEventTypeNext, containing the given value.
34 | + (instancetype)eventWithValue:(id)value;
35 |
36 | /// The type of event represented by the receiver.
37 | @property (nonatomic, assign, readonly) RACEventType eventType;
38 |
39 | /// Returns whether the receiver is of type RACEventTypeCompleted or
40 | /// RACEventTypeError.
41 | @property (nonatomic, getter = isFinished, assign, readonly) BOOL finished;
42 |
43 | /// The error associated with an event of type RACEventTypeError. This will be
44 | /// nil for all other event types.
45 | @property (nonatomic, strong, readonly) NSError *error;
46 |
47 | /// The value associated with an event of type RACEventTypeNext. This will be
48 | /// nil for all other event types.
49 | @property (nonatomic, strong, readonly) id value;
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACGroupedSignal.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACGroupedSignal.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 5/2/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSubject.h"
10 |
11 | /// A grouped signal is used by -[RACSignal groupBy:transform:].
12 | @interface RACGroupedSignal : RACSubject
13 |
14 | /// The key shared by the group.
15 | @property (nonatomic, readonly, copy) id key;
16 |
17 | + (instancetype)signalWithKey:(id)key;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACGroupedSignal.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACGroupedSignal.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 5/2/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACGroupedSignal.h"
10 |
11 | @interface RACGroupedSignal ()
12 | @property (nonatomic, copy) id key;
13 | @end
14 |
15 | @implementation RACGroupedSignal
16 |
17 | #pragma mark API
18 |
19 | + (instancetype)signalWithKey:(id)key {
20 | RACGroupedSignal *subject = [self subject];
21 | subject.key = key;
22 | return subject;
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACImmediateScheduler.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACImmediateScheduler.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 11/30/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACScheduler.h"
10 |
11 | // A private scheduler which immediately executes its scheduled blocks.
12 | @interface RACImmediateScheduler : RACScheduler
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACImmediateScheduler.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACImmediateScheduler.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 11/30/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACImmediateScheduler.h"
10 | #import "RACScheduler+Private.h"
11 |
12 | @implementation RACImmediateScheduler
13 |
14 | #pragma mark Lifecycle
15 |
16 | - (id)init {
17 | return [super initWithName:@"com.ReactiveCocoa.RACScheduler.immediateScheduler"];
18 | }
19 |
20 | #pragma mark RACScheduler
21 |
22 | - (RACDisposable *)schedule:(void (^)(void))block {
23 | NSCParameterAssert(block != NULL);
24 |
25 | block();
26 | return nil;
27 | }
28 |
29 | - (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block {
30 | NSCParameterAssert(date != nil);
31 | NSCParameterAssert(block != NULL);
32 |
33 | [NSThread sleepUntilDate:date];
34 | block();
35 |
36 | return nil;
37 | }
38 |
39 | - (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block {
40 | NSCAssert(NO, @"+[RACScheduler immediateScheduler] does not support %@.", NSStringFromSelector(_cmd));
41 | return nil;
42 | }
43 |
44 | - (RACDisposable *)scheduleRecursiveBlock:(RACSchedulerRecursiveBlock)recursiveBlock {
45 | for (__block NSUInteger remaining = 1; remaining > 0; remaining--) {
46 | recursiveBlock(^{
47 | remaining++;
48 | });
49 | }
50 |
51 | return nil;
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACIndexSetSequence.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACIndexSetSequence.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Sergey Gavrilyuk on 12/18/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSequence.h"
10 |
11 | // Private class that adapts an array to the RACSequence interface.
12 | @interface RACIndexSetSequence : RACSequence
13 |
14 | + (instancetype)sequenceWithIndexSet:(NSIndexSet *)indexSet;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACKVOProxy.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACKVOProxy.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Richard Speyer on 4/10/14.
6 | // Copyright (c) 2014 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /// A singleton that can act as a proxy between a KVO observation and a RAC
12 | /// subscriber, in order to protect against KVO lifetime issues.
13 | @interface RACKVOProxy : NSObject
14 |
15 | /// Returns the singleton KVO proxy object.
16 | + (instancetype)sharedProxy;
17 |
18 | /// Registers an observer with the proxy, such that when the proxy receives a
19 | /// KVO change with the given context, it forwards it to the observer.
20 | ///
21 | /// observer - True observer of the KVO change. Must not be nil.
22 | /// context - Arbitrary context object used to differentiate multiple
23 | /// observations of the same keypath. Must be unique, cannot be nil.
24 | - (void)addObserver:(__weak NSObject *)observer forContext:(void *)context;
25 |
26 | /// Removes an observer from the proxy. Parameters must match those passed to
27 | /// addObserver:forContext:.
28 | ///
29 | /// observer - True observer of the KVO change. Must not be nil.
30 | /// context - Arbitrary context object used to differentiate multiple
31 | /// observations of the same keypath. Must be unique, cannot be nil.
32 | - (void)removeObserver:(NSObject *)observer forContext:(void *)context;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACKVOProxy.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACKVOProxy.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Richard Speyer on 4/10/14.
6 | // Copyright (c) 2014 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACKVOProxy.h"
10 |
11 | @interface RACKVOProxy()
12 |
13 | @property (strong, nonatomic, readonly) NSMapTable *trampolines;
14 | @property (strong, nonatomic, readonly) dispatch_queue_t queue;
15 |
16 | @end
17 |
18 | @implementation RACKVOProxy
19 |
20 | + (instancetype)sharedProxy {
21 | static RACKVOProxy *proxy;
22 | static dispatch_once_t onceToken;
23 |
24 | dispatch_once(&onceToken, ^{
25 | proxy = [[self alloc] init];
26 | });
27 |
28 | return proxy;
29 | }
30 |
31 | - (instancetype)init {
32 | self = [super init];
33 | if (self == nil) return nil;
34 |
35 | _queue = dispatch_queue_create("org.reactivecocoa.ReactiveCocoa.RACKVOProxy", DISPATCH_QUEUE_SERIAL);
36 | _trampolines = [NSMapTable strongToWeakObjectsMapTable];
37 |
38 | return self;
39 | }
40 |
41 | - (void)addObserver:(__weak NSObject *)observer forContext:(void *)context {
42 | NSValue *valueContext = [NSValue valueWithPointer:context];
43 |
44 | dispatch_sync(self.queue, ^{
45 | [self.trampolines setObject:observer forKey:valueContext];
46 | });
47 | }
48 |
49 | - (void)removeObserver:(NSObject *)observer forContext:(void *)context {
50 | NSValue *valueContext = [NSValue valueWithPointer:context];
51 |
52 | dispatch_sync(self.queue, ^{
53 | [self.trampolines removeObjectForKey:valueContext];
54 | });
55 | }
56 |
57 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
58 | NSValue *valueContext = [NSValue valueWithPointer:context];
59 | __block NSObject *trueObserver;
60 |
61 | dispatch_sync(self.queue, ^{
62 | trueObserver = [self.trampolines objectForKey:valueContext];
63 | });
64 |
65 | if (trueObserver != nil) {
66 | [trueObserver observeValueForKeyPath:keyPath ofObject:object change:change context:context];
67 | }
68 | }
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACKVOTrampoline.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACKVOTrampoline.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 1/15/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "NSObject+RACKVOWrapper.h"
11 | #import "RACDisposable.h"
12 |
13 | // A private trampoline object that represents a KVO observation.
14 | //
15 | // Disposing of the trampoline will stop observation.
16 | @interface RACKVOTrampoline : RACDisposable
17 |
18 | // Initializes the receiver with the given parameters.
19 | //
20 | // target - The object whose key path should be observed. Cannot be nil.
21 | // observer - The object that gets notified when the value at the key path
22 | // changes. Can be nil.
23 | // keyPath - The key path on `target` to observe. Cannot be nil.
24 | // options - Any key value observing options to use in the observation.
25 | // block - The block to call when the value at the observed key path changes.
26 | // Cannot be nil.
27 | //
28 | // Returns the initialized object.
29 | - (id)initWithTarget:(__weak NSObject *)target observer:(__weak NSObject *)observer keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options block:(RACKVOBlock)block;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection+Private.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACMulticastConnection+Private.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 4/11/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACMulticastConnection.h"
10 |
11 | @class RACSubject;
12 |
13 | @interface RACMulticastConnection ()
14 |
15 | - (id)initWithSourceSignal:(RACSignal *)source subject:(RACSubject *)subject;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACMulticastConnection.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACMulticastConnection.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 4/11/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACDisposable;
12 | @class RACSignal;
13 |
14 | /// A multicast connection encapsulates the idea of sharing one subscription to a
15 | /// signal to many subscribers. This is most often needed if the subscription to
16 | /// the underlying signal involves side-effects or shouldn't be called more than
17 | /// once.
18 | ///
19 | /// The multicasted signal is only subscribed to when
20 | /// -[RACMulticastConnection connect] is called. Until that happens, no values
21 | /// will be sent on `signal`. See -[RACMulticastConnection autoconnect] for how
22 | /// -[RACMulticastConnection connect] can be called automatically.
23 | ///
24 | /// Note that you shouldn't create RACMulticastConnection manually. Instead use
25 | /// -[RACSignal publish] or -[RACSignal multicast:].
26 | @interface RACMulticastConnection : NSObject
27 |
28 | /// The multicasted signal.
29 | @property (nonatomic, strong, readonly) RACSignal *signal;
30 |
31 | /// Connect to the underlying signal by subscribing to it. Calling this multiple
32 | /// times does nothing but return the existing connection's disposable.
33 | ///
34 | /// Returns the disposable for the subscription to the multicasted signal.
35 | - (RACDisposable *)connect;
36 |
37 | /// Connects to the underlying signal when the returned signal is first
38 | /// subscribed to, and disposes of the subscription to the multicasted signal
39 | /// when the returned signal has no subscribers.
40 | ///
41 | /// If new subscribers show up after being disposed, they'll subscribe and then
42 | /// be immediately disposed of. The returned signal will never re-connect to the
43 | /// multicasted signal.
44 | ///
45 | /// Returns the autoconnecting signal.
46 | - (RACSignal *)autoconnect;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACObjCRuntime.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACObjCRuntime.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Cody Krieger on 5/19/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | // A private class containing wrappers to runtime functions.
12 | @interface RACObjCRuntime : NSObject
13 |
14 | // Invokes objc_allocateClassPair(). Can be called from ARC code.
15 | + (Class)createClass:(const char *)className inheritingFromClass:(Class)superclass;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACObjCRuntime.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACObjCRuntime.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Cody Krieger on 5/19/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACObjCRuntime.h"
10 | #import
11 |
12 | #if __has_feature(objc_arc)
13 | #error "This file must be compiled without ARC."
14 | #endif
15 |
16 | @implementation RACObjCRuntime
17 |
18 | + (Class)createClass:(const char *)className inheritingFromClass:(Class)superclass {
19 | return objc_allocateClassPair(superclass, className, 0);
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACPassthroughSubscriber.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACPassthroughSubscriber.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-06-13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "RACSubscriber.h"
11 |
12 | @class RACCompoundDisposable;
13 | @class RACSignal;
14 |
15 | // A private subscriber that passes through all events to another subscriber
16 | // while not disposed.
17 | @interface RACPassthroughSubscriber : NSObject
18 |
19 | // Initializes the receiver to pass through events until disposed.
20 | //
21 | // subscriber - The subscriber to forward events to. This must not be nil.
22 | // signal - The signal that will be sending events to the receiver.
23 | // disposable - When this disposable is disposed, no more events will be
24 | // forwarded. This must not be nil.
25 | //
26 | // Returns an initialized passthrough subscriber.
27 | - (instancetype)initWithSubscriber:(id)subscriber signal:(RACSignal *)signal disposable:(RACCompoundDisposable *)disposable;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler+Subclass.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACQueueScheduler+Subclass.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 6/6/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACQueueScheduler.h"
10 | #import "RACScheduler+Subclass.h"
11 |
12 | /// An interface for use by GCD queue-based subclasses.
13 | ///
14 | /// See RACScheduler+Subclass.h for subclassing notes.
15 | @interface RACQueueScheduler ()
16 |
17 | /// The queue on which blocks are enqueued.
18 | #if OS_OBJECT_HAVE_OBJC_SUPPORT
19 | @property (nonatomic, strong, readonly) dispatch_queue_t queue;
20 | #else
21 | // Swift builds with OS_OBJECT_HAVE_OBJC_SUPPORT=0 for Playgrounds and LLDB :(
22 | @property (nonatomic, assign, readonly) dispatch_queue_t queue;
23 | #endif
24 |
25 | /// Initializes the receiver with the name of the scheduler and the queue which
26 | /// the scheduler should use.
27 | ///
28 | /// name - The name of the scheduler. If nil, a default name will be used.
29 | /// queue - The queue upon which the receiver should enqueue scheduled blocks.
30 | /// This argument must not be NULL.
31 | ///
32 | /// Returns the initialized object.
33 | - (id)initWithName:(NSString *)name queue:(dispatch_queue_t)queue;
34 |
35 | /// Converts a date into a GCD time using dispatch_walltime().
36 | ///
37 | /// date - The date to convert. This must not be nil.
38 | + (dispatch_time_t)wallTimeWithDate:(NSDate *)date;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACQueueScheduler.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACQueueScheduler.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 11/30/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACScheduler.h"
10 |
11 | /// An abstract scheduler which asynchronously enqueues all its work to a Grand
12 | /// Central Dispatch queue.
13 | ///
14 | /// Because RACQueueScheduler is abstract, it should not be instantiated
15 | /// directly. Create a subclass using the `RACQueueScheduler+Subclass.h`
16 | /// interface and use that instead.
17 | @interface RACQueueScheduler : RACScheduler
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACReplaySubject.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACReplaySubject.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/14/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSubject.h"
10 |
11 | extern const NSUInteger RACReplaySubjectUnlimitedCapacity;
12 |
13 | /// A replay subject saves the values it is sent (up to its defined capacity)
14 | /// and resends those to new subscribers. It will also replay an error or
15 | /// completion.
16 | @interface RACReplaySubject : RACSubject
17 |
18 | /// Creates a new replay subject with the given capacity. A capacity of
19 | /// RACReplaySubjectUnlimitedCapacity means values are never trimmed.
20 | + (instancetype)replaySubjectWithCapacity:(NSUInteger)capacity;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACReturnSignal.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACReturnSignal.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-10-10.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSignal.h"
10 |
11 | // A private `RACSignal` subclasses that synchronously sends a value to any
12 | // subscribers, then completes.
13 | @interface RACReturnSignal : RACSignal
14 |
15 | + (RACSignal *)return:(id)value;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACReturnSignal.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACReturnSignal.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-10-10.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACReturnSignal.h"
10 | #import "RACScheduler+Private.h"
11 | #import "RACSubscriber.h"
12 | #import "RACUnit.h"
13 |
14 | @interface RACReturnSignal ()
15 |
16 | // The value to send upon subscription.
17 | @property (nonatomic, strong, readonly) id value;
18 |
19 | @end
20 |
21 | @implementation RACReturnSignal
22 |
23 | #pragma mark Properties
24 |
25 | // Only allow this signal's name to be customized in DEBUG, since it's
26 | // potentially a singleton in release builds (see +return:).
27 | - (void)setName:(NSString *)name {
28 | #ifdef DEBUG
29 | [super setName:name];
30 | #endif
31 | }
32 |
33 | - (NSString *)name {
34 | #ifdef DEBUG
35 | return super.name;
36 | #else
37 | return @"+return:";
38 | #endif
39 | }
40 |
41 | #pragma mark Lifecycle
42 |
43 | + (RACSignal *)return:(id)value {
44 | #ifndef DEBUG
45 | // In release builds, use singletons for two very common cases.
46 | if (value == RACUnit.defaultUnit) {
47 | static RACReturnSignal *unitSingleton;
48 | static dispatch_once_t unitPred;
49 |
50 | dispatch_once(&unitPred, ^{
51 | unitSingleton = [[self alloc] init];
52 | unitSingleton->_value = RACUnit.defaultUnit;
53 | });
54 |
55 | return unitSingleton;
56 | } else if (value == nil) {
57 | static RACReturnSignal *nilSingleton;
58 | static dispatch_once_t nilPred;
59 |
60 | dispatch_once(&nilPred, ^{
61 | nilSingleton = [[self alloc] init];
62 | nilSingleton->_value = nil;
63 | });
64 |
65 | return nilSingleton;
66 | }
67 | #endif
68 |
69 | RACReturnSignal *signal = [[self alloc] init];
70 | signal->_value = value;
71 |
72 | #ifdef DEBUG
73 | [signal setNameWithFormat:@"+return: %@", value];
74 | #endif
75 |
76 | return signal;
77 | }
78 |
79 | #pragma mark Subscription
80 |
81 | - (RACDisposable *)subscribe:(id)subscriber {
82 | NSCParameterAssert(subscriber != nil);
83 |
84 | return [RACScheduler.subscriptionScheduler schedule:^{
85 | [subscriber sendNext:self.value];
86 | [subscriber sendCompleted];
87 | }];
88 | }
89 |
90 | @end
91 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACScheduler+Private.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACScheduler+Private.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 11/29/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACScheduler.h"
10 |
11 | // The thread-specific current scheduler key.
12 | extern NSString * const RACSchedulerCurrentSchedulerKey;
13 |
14 | // A private interface for internal RAC use only.
15 | @interface RACScheduler ()
16 |
17 | // A dedicated scheduler that fills two requirements:
18 | //
19 | // 1. By the time subscription happens, we need a valid +currentScheduler.
20 | // 2. Subscription should happen as soon as possible.
21 | //
22 | // To fulfill those two, if we already have a valid +currentScheduler, it
23 | // immediately executes scheduled blocks. If we don't, it will execute scheduled
24 | // blocks with a private background scheduler.
25 | + (instancetype)subscriptionScheduler;
26 |
27 | // Initializes the receiver with the given name.
28 | //
29 | // name - The name of the scheduler. If nil, a default name will be used.
30 | //
31 | // Returns the initialized object.
32 | - (id)initWithName:(NSString *)name;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACScheduler+Subclass.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACScheduler.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Miķelis Vindavs on 5/27/14.
6 | // Copyright (c) 2014 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "RACScheduler.h"
11 |
12 | /// An interface for use by subclasses.
13 | ///
14 | /// Subclasses should use `-performAsCurrentScheduler:` to do the actual block
15 | /// invocation so that +[RACScheduler currentScheduler] behaves as expected.
16 | ///
17 | /// **Note that RACSchedulers are expected to be serial**. Subclasses must honor
18 | /// that contract. See `RACTargetQueueScheduler` for a queue-based scheduler
19 | /// which will enforce the serialization guarantee.
20 | @interface RACScheduler ()
21 |
22 | /// Performs the given block with the receiver as the current scheduler for
23 | /// its thread. This should only be called by subclasses to perform their
24 | /// scheduled blocks.
25 | ///
26 | /// block - The block to execute. Cannot be NULL.
27 | - (void)performAsCurrentScheduler:(void (^)(void))block;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACScopedDisposable.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACScopedDisposable.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/28/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACDisposable.h"
10 |
11 | /// A disposable that calls its own -dispose when it is dealloc'd.
12 | @interface RACScopedDisposable : RACDisposable
13 |
14 | /// Creates a new scoped disposable that will also dispose of the given
15 | /// disposable when it is dealloc'd.
16 | + (instancetype)scopedDisposableWithDisposable:(RACDisposable *)disposable;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACScopedDisposable.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACScopedDisposable.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/28/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACScopedDisposable.h"
10 |
11 | @implementation RACScopedDisposable
12 |
13 | #pragma mark Lifecycle
14 |
15 | + (instancetype)scopedDisposableWithDisposable:(RACDisposable *)disposable {
16 | return [self disposableWithBlock:^{
17 | [disposable dispose];
18 | }];
19 | }
20 |
21 | - (void)dealloc {
22 | [self dispose];
23 | }
24 |
25 | #pragma mark RACDisposable
26 |
27 | - (RACScopedDisposable *)asScopedDisposable {
28 | // totally already are
29 | return self;
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSerialDisposable.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACSerialDisposable.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-07-22.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACDisposable.h"
10 |
11 | /// A disposable that contains exactly one other disposable and allows it to be
12 | /// swapped out atomically.
13 | @interface RACSerialDisposable : RACDisposable
14 |
15 | /// The inner disposable managed by the serial disposable.
16 | ///
17 | /// This property is thread-safe for reading and writing. However, if you want to
18 | /// read the current value _and_ write a new one atomically, use
19 | /// -swapInDisposable: instead.
20 | ///
21 | /// Disposing of the receiver will also dispose of the current disposable set for
22 | /// this property, then set the property to nil. If any new disposable is set
23 | /// after the receiver is disposed, it will be disposed immediately and this
24 | /// property will remain set to nil.
25 | @property (atomic, strong) RACDisposable *disposable;
26 |
27 | /// Creates a serial disposable which will wrap the given disposable.
28 | ///
29 | /// disposable - The value to set for `disposable`. This may be nil.
30 | ///
31 | /// Returns a RACSerialDisposable, or nil if an error occurs.
32 | + (instancetype)serialDisposableWithDisposable:(RACDisposable *)disposable;
33 |
34 | /// Atomically swaps the receiver's `disposable` for `newDisposable`.
35 | ///
36 | /// newDisposable - The new value for `disposable`. If the receiver has already
37 | /// been disposed, this disposable will be too, and `disposable`
38 | /// will remain set to nil. This argument may be nil.
39 | ///
40 | /// Returns the previous value for the `disposable` property.
41 | - (RACDisposable *)swapInDisposable:(RACDisposable *)newDisposable;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSignalProvider.d:
--------------------------------------------------------------------------------
1 | provider RACSignal {
2 | probe next(char *signal, char *subscriber, char *valueDescription);
3 | probe completed(char *signal, char *subscriber);
4 | probe error(char *signal, char *subscriber, char *errorDescription);
5 | };
6 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSignalSequence.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACSignalSequence.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-11-09.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSequence.h"
10 |
11 | @class RACSignal;
12 |
13 | // Private class that adapts a RACSignal to the RACSequence interface.
14 | @interface RACSignalSequence : RACSequence
15 |
16 | // Returns a sequence for enumerating over the given signal.
17 | + (RACSequence *)sequenceWithSignal:(RACSignal *)signal;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSignalSequence.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACSignalSequence.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-11-09.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSignalSequence.h"
10 | #import "RACDisposable.h"
11 | #import "RACReplaySubject.h"
12 | #import "RACSignal+Operations.h"
13 |
14 | @interface RACSignalSequence ()
15 |
16 | // Replays the signal given on initialization.
17 | @property (nonatomic, strong, readonly) RACReplaySubject *subject;
18 |
19 | @end
20 |
21 | @implementation RACSignalSequence
22 |
23 | #pragma mark Lifecycle
24 |
25 | + (RACSequence *)sequenceWithSignal:(RACSignal *)signal {
26 | RACSignalSequence *seq = [[self alloc] init];
27 |
28 | RACReplaySubject *subject = [RACReplaySubject subject];
29 | [signal subscribeNext:^(id value) {
30 | [subject sendNext:value];
31 | } error:^(NSError *error) {
32 | [subject sendError:error];
33 | } completed:^{
34 | [subject sendCompleted];
35 | }];
36 |
37 | seq->_subject = subject;
38 | return seq;
39 | }
40 |
41 | #pragma mark RACSequence
42 |
43 | - (id)head {
44 | id value = [self.subject firstOrDefault:self];
45 |
46 | if (value == self) {
47 | return nil;
48 | } else {
49 | return value ?: NSNull.null;
50 | }
51 | }
52 |
53 | - (RACSequence *)tail {
54 | RACSequence *sequence = [self.class sequenceWithSignal:[self.subject skip:1]];
55 | sequence.name = self.name;
56 | return sequence;
57 | }
58 |
59 | - (NSArray *)array {
60 | return self.subject.toArray;
61 | }
62 |
63 | #pragma mark NSObject
64 |
65 | - (NSString *)description {
66 | // Synchronously accumulate the values that have been sent so far.
67 | NSMutableArray *values = [NSMutableArray array];
68 | RACDisposable *disposable = [self.subject subscribeNext:^(id value) {
69 | @synchronized (values) {
70 | [values addObject:value ?: NSNull.null];
71 | }
72 | }];
73 |
74 | [disposable dispose];
75 |
76 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@, values = %@ … }", self.class, self, self.name, values];
77 | }
78 |
79 | @end
80 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACStream+Private.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACStream+Private.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-07-22.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACStream.h"
10 |
11 | @interface RACStream ()
12 |
13 | // Combines a list of streams using the logic of the given block.
14 | //
15 | // streams - The streams to combine.
16 | // block - An operator that combines two streams and returns a new one. The
17 | // returned stream should contain 2-tuples of the streams' combined
18 | // values.
19 | //
20 | // Returns a combined stream.
21 | + (instancetype)join:(id)streams block:(RACStream * (^)(id, id))block;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACStringSequence.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACStringSequence.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "RACSequence.h"
10 |
11 | // Private class that adapts a string to the RACSequence interface.
12 | @interface RACStringSequence : RACSequence
13 |
14 | // Returns a sequence for enumerating over the given string, starting from the
15 | // given character offset. The string will be copied to prevent mutation.
16 | + (RACSequence *)sequenceWithString:(NSString *)string offset:(NSUInteger)offset;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACStringSequence.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACStringSequence.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2012-10-29.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "RACStringSequence.h"
10 |
11 | @interface RACStringSequence ()
12 |
13 | // The string being sequenced.
14 | @property (nonatomic, copy, readonly) NSString *string;
15 |
16 | // The index in the string from which the sequence starts.
17 | @property (nonatomic, assign, readonly) NSUInteger offset;
18 |
19 | @end
20 |
21 | @implementation RACStringSequence
22 |
23 | #pragma mark Lifecycle
24 |
25 | + (RACSequence *)sequenceWithString:(NSString *)string offset:(NSUInteger)offset {
26 | NSCParameterAssert(offset <= string.length);
27 |
28 | if (offset == string.length) return self.empty;
29 |
30 | RACStringSequence *seq = [[self alloc] init];
31 | seq->_string = [string copy];
32 | seq->_offset = offset;
33 | return seq;
34 | }
35 |
36 | #pragma mark RACSequence
37 |
38 | - (id)head {
39 | return [self.string substringWithRange:NSMakeRange(self.offset, 1)];
40 | }
41 |
42 | - (RACSequence *)tail {
43 | RACSequence *sequence = [self.class sequenceWithString:self.string offset:self.offset + 1];
44 | sequence.name = self.name;
45 | return sequence;
46 | }
47 |
48 | - (NSArray *)array {
49 | NSUInteger substringLength = self.string.length - self.offset;
50 | NSMutableArray *array = [NSMutableArray arrayWithCapacity:substringLength];
51 |
52 | [self.string enumerateSubstringsInRange:NSMakeRange(self.offset, substringLength) options:NSStringEnumerationByComposedCharacterSequences usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
53 | [array addObject:substring];
54 | }];
55 |
56 | return [array copy];
57 | }
58 |
59 | #pragma mark NSObject
60 |
61 | - (NSString *)description {
62 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@, string = %@ }", self.class, self, self.name, [self.string substringFromIndex:self.offset]];
63 | }
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSubject.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACSubject.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/9/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSignal.h"
10 | #import "RACSubscriber.h"
11 |
12 | /// A subject can be thought of as a signal that you can manually control by
13 | /// sending next, completed, and error.
14 | ///
15 | /// They're most helpful in bridging the non-RAC world to RAC, since they let you
16 | /// manually control the sending of events.
17 | @interface RACSubject : RACSignal
18 |
19 | /// Returns a new subject.
20 | + (instancetype)subject;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSubscriber+Private.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACSubscriber+Private.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-06-13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSubscriber.h"
10 |
11 | // A simple block-based subscriber.
12 | @interface RACSubscriber : NSObject
13 |
14 | // Creates a new subscriber with the given blocks.
15 | + (instancetype)subscriberWithNext:(void (^)(id x))next error:(void (^)(NSError *error))error completed:(void (^)(void))completed;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSubscriber.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACSubscriber.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/1/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACCompoundDisposable;
12 |
13 | /// Represents any object which can directly receive values from a RACSignal.
14 | ///
15 | /// You generally shouldn't need to implement this protocol. +[RACSignal
16 | /// createSignal:], RACSignal's subscription methods, or RACSubject should work
17 | /// for most uses.
18 | ///
19 | /// Implementors of this protocol may receive messages and values from multiple
20 | /// threads simultaneously, and so should be thread-safe. Subscribers will also
21 | /// be weakly referenced so implementations must allow that.
22 | @protocol RACSubscriber
23 | @required
24 |
25 | /// Sends the next value to subscribers.
26 | ///
27 | /// value - The value to send. This can be `nil`.
28 | - (void)sendNext:(id)value;
29 |
30 | /// Sends the error to subscribers.
31 | ///
32 | /// error - The error to send. This can be `nil`.
33 | ///
34 | /// This terminates the subscription, and invalidates the subscriber (such that
35 | /// it cannot subscribe to anything else in the future).
36 | - (void)sendError:(NSError *)error;
37 |
38 | /// Sends completed to subscribers.
39 | ///
40 | /// This terminates the subscription, and invalidates the subscriber (such that
41 | /// it cannot subscribe to anything else in the future).
42 | - (void)sendCompleted;
43 |
44 | /// Sends the subscriber a disposable that represents one of its subscriptions.
45 | ///
46 | /// A subscriber may receive multiple disposables if it gets subscribed to
47 | /// multiple signals; however, any error or completed events must terminate _all_
48 | /// subscriptions.
49 | - (void)didSubscribeWithDisposable:(RACCompoundDisposable *)disposable;
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACSubscriptingAssignmentTrampoline.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 9/24/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "RACEXTKeyPathCoding.h"
11 |
12 | @class RACSignal;
13 |
14 | /// Assigns a signal to an object property, automatically setting the given key
15 | /// path on every `next`. When the signal completes, the binding is automatically
16 | /// disposed of.
17 | ///
18 | /// There are two different versions of this macro:
19 | ///
20 | /// - RAC(TARGET, KEYPATH, NILVALUE) will bind the `KEYPATH` of `TARGET` to the
21 | /// given signal. If the signal ever sends a `nil` value, the property will be
22 | /// set to `NILVALUE` instead. `NILVALUE` may itself be `nil` for object
23 | /// properties, but an NSValue should be used for primitive properties, to
24 | /// avoid an exception if `nil` is sent (which might occur if an intermediate
25 | /// object is set to `nil`).
26 | /// - RAC(TARGET, KEYPATH) is the same as the above, but `NILVALUE` defaults to
27 | /// `nil`.
28 | ///
29 | /// See -[RACSignal setKeyPath:onObject:nilValue:] for more information about the
30 | /// binding's semantics.
31 | ///
32 | /// Examples
33 | ///
34 | /// RAC(self, objectProperty) = objectSignal;
35 | /// RAC(self, stringProperty, @"foobar") = stringSignal;
36 | /// RAC(self, integerProperty, @42) = integerSignal;
37 | ///
38 | /// WARNING: Under certain conditions, use of this macro can be thread-unsafe.
39 | /// See the documentation of -setKeyPath:onObject:nilValue:.
40 | #define RAC(TARGET, ...) \
41 | metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__)) \
42 | (RAC_(TARGET, __VA_ARGS__, nil)) \
43 | (RAC_(TARGET, __VA_ARGS__))
44 |
45 | /// Do not use this directly. Use the RAC macro above.
46 | #define RAC_(TARGET, KEYPATH, NILVALUE) \
47 | [[RACSubscriptingAssignmentTrampoline alloc] initWithTarget:(TARGET) nilValue:(NILVALUE)][@keypath(TARGET, KEYPATH)]
48 |
49 | @interface RACSubscriptingAssignmentTrampoline : NSObject
50 |
51 | - (id)initWithTarget:(id)target nilValue:(id)nilValue;
52 | - (void)setObject:(RACSignal *)signal forKeyedSubscript:(NSString *)keyPath;
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSubscriptingAssignmentTrampoline.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACSubscriptingAssignmentTrampoline.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 9/24/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSubscriptingAssignmentTrampoline.h"
10 | #import "RACSignal+Operations.h"
11 |
12 | @interface RACSubscriptingAssignmentTrampoline ()
13 |
14 | // The object to bind to.
15 | @property (nonatomic, strong, readonly) id target;
16 |
17 | // A value to use when `nil` is sent on the bound signal.
18 | @property (nonatomic, strong, readonly) id nilValue;
19 |
20 | @end
21 |
22 | @implementation RACSubscriptingAssignmentTrampoline
23 |
24 | - (id)initWithTarget:(id)target nilValue:(id)nilValue {
25 | // This is often a programmer error, but this prevents crashes if the target
26 | // object has unexpectedly deallocated.
27 | if (target == nil) return nil;
28 |
29 | self = [super init];
30 | if (self == nil) return nil;
31 |
32 | _target = target;
33 | _nilValue = nilValue;
34 |
35 | return self;
36 | }
37 |
38 | - (void)setObject:(RACSignal *)signal forKeyedSubscript:(NSString *)keyPath {
39 | [signal setKeyPath:keyPath onObject:self.target nilValue:self.nilValue];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSubscriptionScheduler.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACSubscriptionScheduler.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 11/30/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACScheduler.h"
10 |
11 | // A private scheduler used only for subscriptions. See the private
12 | // +[RACScheduler subscriptionScheduler] method for more information.
13 | @interface RACSubscriptionScheduler : RACScheduler
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACSubscriptionScheduler.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACSubscriptionScheduler.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 11/30/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSubscriptionScheduler.h"
10 | #import "RACScheduler+Private.h"
11 |
12 | @interface RACSubscriptionScheduler ()
13 |
14 | // A private background scheduler on which to subscribe if the +currentScheduler
15 | // is unknown.
16 | @property (nonatomic, strong, readonly) RACScheduler *backgroundScheduler;
17 |
18 | @end
19 |
20 | @implementation RACSubscriptionScheduler
21 |
22 | #pragma mark Lifecycle
23 |
24 | - (id)init {
25 | self = [super initWithName:@"com.ReactiveCocoa.RACScheduler.subscriptionScheduler"];
26 | if (self == nil) return nil;
27 |
28 | _backgroundScheduler = [RACScheduler scheduler];
29 |
30 | return self;
31 | }
32 |
33 | #pragma mark RACScheduler
34 |
35 | - (RACDisposable *)schedule:(void (^)(void))block {
36 | NSCParameterAssert(block != NULL);
37 |
38 | if (RACScheduler.currentScheduler == nil) return [self.backgroundScheduler schedule:block];
39 |
40 | block();
41 | return nil;
42 | }
43 |
44 | - (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block {
45 | RACScheduler *scheduler = RACScheduler.currentScheduler ?: self.backgroundScheduler;
46 | return [scheduler after:date schedule:block];
47 | }
48 |
49 | - (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block {
50 | RACScheduler *scheduler = RACScheduler.currentScheduler ?: self.backgroundScheduler;
51 | return [scheduler after:date repeatingEvery:interval withLeeway:leeway schedule:block];
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACTargetQueueScheduler.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACTargetQueueScheduler.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 6/6/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACQueueScheduler.h"
10 |
11 | /// A scheduler that enqueues blocks on a private serial queue, targeting an
12 | /// arbitrary GCD queue.
13 | @interface RACTargetQueueScheduler : RACQueueScheduler
14 |
15 | /// Initializes the receiver with a serial queue that will target the given
16 | /// `targetQueue`.
17 | ///
18 | /// name - The name of the scheduler. If nil, a default name will be used.
19 | /// targetQueue - The queue to target. Cannot be NULL.
20 | ///
21 | /// Returns the initialized object.
22 | - (id)initWithName:(NSString *)name targetQueue:(dispatch_queue_t)targetQueue;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACTargetQueueScheduler.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACTargetQueueScheduler.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 6/6/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACTargetQueueScheduler.h"
10 | #import "RACBacktrace.h"
11 | #import "RACQueueScheduler+Subclass.h"
12 |
13 | @implementation RACTargetQueueScheduler
14 |
15 | #pragma mark Lifecycle
16 |
17 | - (id)initWithName:(NSString *)name targetQueue:(dispatch_queue_t)targetQueue {
18 | NSCParameterAssert(targetQueue != NULL);
19 |
20 | if (name == nil) {
21 | name = [NSString stringWithFormat:@"com.ReactiveCocoa.RACTargetQueueScheduler(%s)", dispatch_queue_get_label(targetQueue)];
22 | }
23 |
24 | dispatch_queue_t queue = dispatch_queue_create(name.UTF8String, DISPATCH_QUEUE_SERIAL);
25 | if (queue == NULL) return nil;
26 |
27 | dispatch_set_target_queue(queue, targetQueue);
28 |
29 | return [super initWithName:name queue:queue];
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACTestScheduler.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACTestScheduler.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-07-06.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACScheduler.h"
10 |
11 | /// A special kind of scheduler that steps through virtualized time.
12 | ///
13 | /// This scheduler class can be used in unit tests to verify asynchronous
14 | /// behaviors without spending significant time waiting.
15 | ///
16 | /// This class can be used from multiple threads, but only one thread can `step`
17 | /// through the enqueued actions at a time. Other threads will wait while the
18 | /// scheduled blocks are being executed.
19 | @interface RACTestScheduler : RACScheduler
20 |
21 | /// Initializes a new test scheduler.
22 | - (instancetype)init;
23 |
24 | /// Executes the next scheduled block, if any.
25 | ///
26 | /// This method will block until the scheduled action has completed.
27 | - (void)step;
28 |
29 | /// Executes up to the next `ticks` scheduled blocks.
30 | ///
31 | /// This method will block until the scheduled actions have completed.
32 | ///
33 | /// ticks - The number of scheduled blocks to execute. If there aren't this many
34 | /// blocks enqueued, all scheduled blocks are executed.
35 | - (void)step:(NSUInteger)ticks;
36 |
37 | /// Executes all of the scheduled blocks on the receiver.
38 | ///
39 | /// This method will block until the scheduled actions have completed.
40 | - (void)stepAll;
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACTupleSequence.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACTupleSequence.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-05-01.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSequence.h"
10 |
11 | // Private class that adapts a RACTuple to the RACSequence interface.
12 | @interface RACTupleSequence : RACSequence
13 |
14 | // Returns a sequence for enumerating over the given backing array (from a
15 | // RACTuple), starting from the given offset.
16 | + (instancetype)sequenceWithTupleBackingArray:(NSArray *)backingArray offset:(NSUInteger)offset;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACTupleSequence.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACTupleSequence.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-05-01.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACTupleSequence.h"
10 | #import "RACTuple.h"
11 |
12 | @interface RACTupleSequence ()
13 |
14 | // The array being sequenced, as taken from RACTuple.backingArray.
15 | @property (nonatomic, strong, readonly) NSArray *tupleBackingArray;
16 |
17 | // The index in the array from which the sequence starts.
18 | @property (nonatomic, assign, readonly) NSUInteger offset;
19 |
20 | @end
21 |
22 | @implementation RACTupleSequence
23 |
24 | #pragma mark Lifecycle
25 |
26 | + (instancetype)sequenceWithTupleBackingArray:(NSArray *)backingArray offset:(NSUInteger)offset {
27 | NSCParameterAssert(offset <= backingArray.count);
28 |
29 | if (offset == backingArray.count) return self.empty;
30 |
31 | RACTupleSequence *seq = [[self alloc] init];
32 | seq->_tupleBackingArray = backingArray;
33 | seq->_offset = offset;
34 | return seq;
35 | }
36 |
37 | #pragma mark RACSequence
38 |
39 | - (id)head {
40 | id object = self.tupleBackingArray[self.offset];
41 | return (object == RACTupleNil.tupleNil ? NSNull.null : object);
42 | }
43 |
44 | - (RACSequence *)tail {
45 | RACSequence *sequence = [self.class sequenceWithTupleBackingArray:self.tupleBackingArray offset:self.offset + 1];
46 | sequence.name = self.name;
47 | return sequence;
48 | }
49 |
50 | - (NSArray *)array {
51 | NSRange range = NSMakeRange(self.offset, self.tupleBackingArray.count - self.offset);
52 | NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:range.length];
53 |
54 | [self.tupleBackingArray enumerateObjectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:range] options:0 usingBlock:^(id object, NSUInteger index, BOOL *stop) {
55 | id mappedObject = (object == RACTupleNil.tupleNil ? NSNull.null : object);
56 | [array addObject:mappedObject];
57 | }];
58 |
59 | return array;
60 | }
61 |
62 | #pragma mark NSObject
63 |
64 | - (NSString *)description {
65 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@, tuple = %@ }", self.class, self, self.name, self.tupleBackingArray];
66 | }
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACUnarySequence.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACUnarySequence.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-05-01.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACSequence.h"
10 |
11 | // Private class representing a sequence of exactly one value.
12 | @interface RACUnarySequence : RACSequence
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACUnarySequence.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACUnarySequence.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-05-01.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACUnarySequence.h"
10 | #import "RACEXTKeyPathCoding.h"
11 | #import "NSObject+RACDescription.h"
12 |
13 | @interface RACUnarySequence ()
14 |
15 | // The single value stored in this sequence.
16 | @property (nonatomic, strong, readwrite) id head;
17 |
18 | @end
19 |
20 | @implementation RACUnarySequence
21 |
22 | #pragma mark Properties
23 |
24 | @synthesize head = _head;
25 |
26 | #pragma mark Lifecycle
27 |
28 | + (instancetype)return:(id)value {
29 | RACUnarySequence *sequence = [[self alloc] init];
30 | sequence.head = value;
31 | return [sequence setNameWithFormat:@"+return: %@", [value rac_description]];
32 | }
33 |
34 | #pragma mark RACSequence
35 |
36 | - (RACSequence *)tail {
37 | return nil;
38 | }
39 |
40 | - (instancetype)bind:(RACStreamBindBlock (^)(void))block {
41 | RACStreamBindBlock bindBlock = block();
42 | BOOL stop = NO;
43 |
44 | RACSequence *result = (id)[bindBlock(self.head, &stop) setNameWithFormat:@"[%@] -bind:", self.name];
45 | return result ?: self.class.empty;
46 | }
47 |
48 | #pragma mark NSCoding
49 |
50 | - (Class)classForCoder {
51 | // Unary sequences should be encoded as themselves, not array sequences.
52 | return self.class;
53 | }
54 |
55 | - (id)initWithCoder:(NSCoder *)coder {
56 | id value = [coder decodeObjectForKey:@keypath(self.head)];
57 | return [self.class return:value];
58 | }
59 |
60 | - (void)encodeWithCoder:(NSCoder *)coder {
61 | if (self.head != nil) [coder encodeObject:self.head forKey:@keypath(self.head)];
62 | }
63 |
64 | #pragma mark NSObject
65 |
66 | - (NSString *)description {
67 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@, head = %@ }", self.class, self, self.name, self.head];
68 | }
69 |
70 | - (NSUInteger)hash {
71 | return [self.head hash];
72 | }
73 |
74 | - (BOOL)isEqual:(RACUnarySequence *)seq {
75 | if (self == seq) return YES;
76 | if (![seq isKindOfClass:RACUnarySequence.class]) return NO;
77 |
78 | return self.head == seq.head || [(NSObject *)self.head isEqual:seq.head];
79 | }
80 |
81 | @end
82 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACUnit.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACUnit.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/27/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /// A unit represents an empty value.
12 | ///
13 | /// It should never be necessary to create a unit yourself. Just use +defaultUnit.
14 | @interface RACUnit : NSObject
15 |
16 | /// A singleton instance.
17 | + (RACUnit *)defaultUnit;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACUnit.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACUnit.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/27/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACUnit.h"
10 |
11 | @implementation RACUnit
12 |
13 | #pragma mark API
14 |
15 | + (RACUnit *)defaultUnit {
16 | static dispatch_once_t onceToken;
17 | static RACUnit *defaultUnit = nil;
18 | dispatch_once(&onceToken, ^{
19 | defaultUnit = [[self alloc] init];
20 | });
21 |
22 | return defaultUnit;
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACValueTransformer.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACValueTransformer.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/6/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | // A private block based transformer.
12 | @interface RACValueTransformer : NSValueTransformer
13 |
14 | + (instancetype)transformerWithBlock:(id (^)(id value))block;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/RACValueTransformer.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACValueTransformer.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 3/6/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACValueTransformer.h"
10 |
11 | @interface RACValueTransformer ()
12 | @property (nonatomic, copy) id (^transformBlock)(id value);
13 | @end
14 |
15 |
16 | @implementation RACValueTransformer
17 |
18 |
19 | #pragma mark NSValueTransformer
20 |
21 | + (BOOL)allowsReverseTransformation {
22 | return NO;
23 | }
24 |
25 | - (id)transformedValue:(id)value {
26 | return self.transformBlock(value);
27 | }
28 |
29 |
30 | #pragma mark API
31 |
32 | @synthesize transformBlock;
33 |
34 | + (instancetype)transformerWithBlock:(id (^)(id value))block {
35 | NSCParameterAssert(block != NULL);
36 |
37 | RACValueTransformer *transformer = [[self alloc] init];
38 | transformer.transformBlock = block;
39 | return transformer;
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIActionSheet+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIActionSheet+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Dave Lee on 2013-06-22.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACDelegateProxy;
12 | @class RACSignal;
13 |
14 | @interface UIActionSheet (RACSignalSupport)
15 |
16 | /// A delegate proxy which will be set as the receiver's delegate when any of the
17 | /// methods in this category are used.
18 | @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy;
19 |
20 | /// Creates a signal for button clicks on the receiver.
21 | ///
22 | /// When this method is invoked, the `rac_delegateProxy` will become the
23 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy
24 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't
25 | /// know how to handle. Setting the receiver's `delegate` afterward is
26 | /// considered undefined behavior.
27 | ///
28 | /// Returns a signal which will send the index of the specific button clicked.
29 | /// The signal will complete when the receiver is deallocated.
30 | - (RACSignal *)rac_buttonClickedSignal;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIActionSheet+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIActionSheet+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Dave Lee on 2013-06-22.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UIActionSheet+RACSignalSupport.h"
10 | #import "RACDelegateProxy.h"
11 | #import "RACSignal+Operations.h"
12 | #import "NSObject+RACDeallocating.h"
13 | #import "NSObject+RACDescription.h"
14 | #import
15 |
16 | @implementation UIActionSheet (RACSignalSupport)
17 |
18 | static void RACUseDelegateProxy(UIActionSheet *self) {
19 | if (self.delegate == self.rac_delegateProxy) return;
20 |
21 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate;
22 | self.delegate = (id)self.rac_delegateProxy;
23 | }
24 |
25 | - (RACDelegateProxy *)rac_delegateProxy {
26 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd);
27 | if (proxy == nil) {
28 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIActionSheetDelegate)];
29 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
30 | }
31 |
32 | return proxy;
33 | }
34 |
35 | - (RACSignal *)rac_buttonClickedSignal {
36 | RACSignal *signal = [[[[self.rac_delegateProxy
37 | signalForSelector:@selector(actionSheet:clickedButtonAtIndex:)]
38 | reduceEach:^(UIActionSheet *actionSheet, NSNumber *buttonIndex) {
39 | return buttonIndex;
40 | }]
41 | takeUntil:self.rac_willDeallocSignal]
42 | setNameWithFormat:@"%@ -rac_buttonClickedSignal", self.rac_description];
43 |
44 | RACUseDelegateProxy(self);
45 |
46 | return signal;
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIAlertView+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIAlertView+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Henrik Hodne on 6/16/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACDelegateProxy;
12 | @class RACSignal;
13 |
14 | @interface UIAlertView (RACSignalSupport)
15 |
16 | /// A delegate proxy which will be set as the receiver's delegate when any of the
17 | /// methods in this category are used.
18 | @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy;
19 |
20 | /// Creates a signal for button clicks on the receiver.
21 | ///
22 | /// When this method is invoked, the `rac_delegateProxy` will become the
23 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy
24 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't
25 | /// know how to handle. Setting the receiver's `delegate` afterward is considered
26 | /// undefined behavior.
27 | ///
28 | /// Note that this signal will not send a value when the alert is dismissed
29 | /// programatically.
30 | ///
31 | /// Returns a signal which will send the index of the specific button clicked.
32 | /// The signal will complete itself when the receiver is deallocated.
33 | - (RACSignal *)rac_buttonClickedSignal;
34 |
35 | /// Creates a signal for dismissal of the receiver.
36 | ///
37 | /// When this method is invoked, the `rac_delegateProxy` will become the
38 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy
39 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't
40 | /// know how to handle. Setting the receiver's `delegate` afterward is considered
41 | /// undefined behavior.
42 | ///
43 | /// Returns a signal which will send the index of the button associated with the
44 | /// dismissal. The signal will complete itself when the receiver is deallocated.
45 | - (RACSignal *)rac_willDismissSignal;
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIAlertView+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIAlertView+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Henrik Hodne on 6/16/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UIAlertView+RACSignalSupport.h"
10 | #import "RACDelegateProxy.h"
11 | #import "RACSignal+Operations.h"
12 | #import "NSObject+RACDeallocating.h"
13 | #import "NSObject+RACDescription.h"
14 | #import
15 |
16 | @implementation UIAlertView (RACSignalSupport)
17 |
18 | static void RACUseDelegateProxy(UIAlertView *self) {
19 | if (self.delegate == self.rac_delegateProxy) return;
20 |
21 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate;
22 | self.delegate = (id)self.rac_delegateProxy;
23 | }
24 |
25 | - (RACDelegateProxy *)rac_delegateProxy {
26 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd);
27 | if (proxy == nil) {
28 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIAlertViewDelegate)];
29 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
30 | }
31 |
32 | return proxy;
33 | }
34 |
35 | - (RACSignal *)rac_buttonClickedSignal {
36 | RACSignal *signal = [[[[self.rac_delegateProxy
37 | signalForSelector:@selector(alertView:clickedButtonAtIndex:)]
38 | reduceEach:^(UIAlertView *alertView, NSNumber *buttonIndex) {
39 | return buttonIndex;
40 | }]
41 | takeUntil:self.rac_willDeallocSignal]
42 | setNameWithFormat:@"%@ -rac_buttonClickedSignal", self.rac_description];
43 |
44 | RACUseDelegateProxy(self);
45 |
46 | return signal;
47 | }
48 |
49 | - (RACSignal *)rac_willDismissSignal {
50 | RACSignal *signal = [[[[self.rac_delegateProxy
51 | signalForSelector:@selector(alertView:willDismissWithButtonIndex:)]
52 | reduceEach:^(UIAlertView *alertView, NSNumber *buttonIndex) {
53 | return buttonIndex;
54 | }]
55 | takeUntil:self.rac_willDeallocSignal]
56 | setNameWithFormat:@"%@ -rac_willDismissSignal", self.rac_description];
57 |
58 | RACUseDelegateProxy(self);
59 |
60 | return signal;
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+RACCommandSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Kyle LeNeau on 3/27/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACCommand;
12 |
13 | @interface UIBarButtonItem (RACCommandSupport)
14 |
15 | /// Sets the control's command. When the control is clicked, the command is
16 | /// executed with the sender of the event. The control's enabledness is bound
17 | /// to the command's `canExecute`.
18 | ///
19 | /// Note: this will reset the control's target and action.
20 | @property (nonatomic, strong) RACCommand *rac_command;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIBarButtonItem+RACCommandSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+RACCommandSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Kyle LeNeau on 3/27/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UIBarButtonItem+RACCommandSupport.h"
10 | #import "RACEXTKeyPathCoding.h"
11 | #import "RACCommand.h"
12 | #import "RACDisposable.h"
13 | #import "RACSignal+Operations.h"
14 | #import
15 |
16 | static void *UIControlRACCommandKey = &UIControlRACCommandKey;
17 | static void *UIControlEnabledDisposableKey = &UIControlEnabledDisposableKey;
18 |
19 | @implementation UIBarButtonItem (RACCommandSupport)
20 |
21 | - (RACCommand *)rac_command {
22 | return objc_getAssociatedObject(self, UIControlRACCommandKey);
23 | }
24 |
25 | - (void)setRac_command:(RACCommand *)command {
26 | objc_setAssociatedObject(self, UIControlRACCommandKey, command, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
27 |
28 | // Check for stored signal in order to remove it and add a new one
29 | RACDisposable *disposable = objc_getAssociatedObject(self, UIControlEnabledDisposableKey);
30 | [disposable dispose];
31 |
32 | if (command == nil) return;
33 |
34 | disposable = [command.enabled setKeyPath:@keypath(self.enabled) onObject:self];
35 | objc_setAssociatedObject(self, UIControlEnabledDisposableKey, disposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
36 |
37 | [self rac_hijackActionAndTargetIfNeeded];
38 | }
39 |
40 | - (void)rac_hijackActionAndTargetIfNeeded {
41 | SEL hijackSelector = @selector(rac_commandPerformAction:);
42 | if (self.target == self && self.action == hijackSelector) return;
43 |
44 | if (self.target != nil) NSLog(@"WARNING: UIBarButtonItem.rac_command hijacks the control's existing target and action.");
45 |
46 | self.target = self;
47 | self.action = hijackSelector;
48 | }
49 |
50 | - (void)rac_commandPerformAction:(id)sender {
51 | [self.rac_command execute:sender];
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIButton+RACCommandSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIButton+RACCommandSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Ash Furrow on 2013-06-06.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACCommand;
12 |
13 | @interface UIButton (RACCommandSupport)
14 |
15 | /// Sets the button's command. When the button is clicked, the command is
16 | /// executed with the sender of the event. The button's enabledness is bound
17 | /// to the command's `canExecute`.
18 | @property (nonatomic, strong) RACCommand *rac_command;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIButton+RACCommandSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIButton+RACCommandSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Ash Furrow on 2013-06-06.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UIButton+RACCommandSupport.h"
10 | #import "RACEXTKeyPathCoding.h"
11 | #import "RACCommand.h"
12 | #import "RACDisposable.h"
13 | #import "RACSignal+Operations.h"
14 | #import
15 |
16 | static void *UIButtonRACCommandKey = &UIButtonRACCommandKey;
17 | static void *UIButtonEnabledDisposableKey = &UIButtonEnabledDisposableKey;
18 |
19 | @implementation UIButton (RACCommandSupport)
20 |
21 | - (RACCommand *)rac_command {
22 | return objc_getAssociatedObject(self, UIButtonRACCommandKey);
23 | }
24 |
25 | - (void)setRac_command:(RACCommand *)command {
26 | objc_setAssociatedObject(self, UIButtonRACCommandKey, command, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
27 |
28 | // Check for stored signal in order to remove it and add a new one
29 | RACDisposable *disposable = objc_getAssociatedObject(self, UIButtonEnabledDisposableKey);
30 | [disposable dispose];
31 |
32 | if (command == nil) return;
33 |
34 | disposable = [command.enabled setKeyPath:@keypath(self.enabled) onObject:self];
35 | objc_setAssociatedObject(self, UIButtonEnabledDisposableKey, disposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
36 |
37 | [self rac_hijackActionAndTargetIfNeeded];
38 | }
39 |
40 | - (void)rac_hijackActionAndTargetIfNeeded {
41 | SEL hijackSelector = @selector(rac_commandPerformAction:);
42 |
43 | for (NSString *selector in [self actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
44 | if (hijackSelector == NSSelectorFromString(selector)) {
45 | return;
46 | }
47 | }
48 |
49 | [self addTarget:self action:hijackSelector forControlEvents:UIControlEventTouchUpInside];
50 | }
51 |
52 | - (void)rac_commandPerformAction:(id)sender {
53 | [self.rac_command execute:sender];
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UICollectionReusableView+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UICollectionReusableView+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Kent Wong on 2013-10-04.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSignal;
12 |
13 | // This category is only applicable to iOS >= 6.0.
14 | @interface UICollectionReusableView (RACSignalSupport)
15 |
16 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon
17 | /// the receiver.
18 | ///
19 | /// Examples
20 | ///
21 | /// [[[self.cancelButton
22 | /// rac_signalForControlEvents:UIControlEventTouchUpInside]
23 | /// takeUntil:self.rac_prepareForReuseSignal]
24 | /// subscribeNext:^(UIButton *x) {
25 | /// // do other things
26 | /// }];
27 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UICollectionReusableView+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UICollectionReusableView+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Kent Wong on 2013-10-04.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UICollectionReusableView+RACSignalSupport.h"
10 | #import "NSObject+RACDescription.h"
11 | #import "NSObject+RACSelectorSignal.h"
12 | #import "RACSignal+Operations.h"
13 | #import "RACUnit.h"
14 | #import
15 |
16 | @implementation UICollectionReusableView (RACSignalSupport)
17 |
18 | - (RACSignal *)rac_prepareForReuseSignal {
19 | RACSignal *signal = objc_getAssociatedObject(self, _cmd);
20 | if (signal != nil) return signal;
21 |
22 | signal = [[[self
23 | rac_signalForSelector:@selector(prepareForReuse)]
24 | mapReplace:RACUnit.defaultUnit]
25 | setNameWithFormat:@"%@ -rac_prepareForReuseSignal", self.rac_description];
26 |
27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
28 | return signal;
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIControl+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 4/17/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSignal;
12 |
13 | @interface UIControl (RACSignalSupport)
14 |
15 | /// Creates and returns a signal that sends the sender of the control event
16 | /// whenever one of the control events is triggered.
17 | - (RACSignal *)rac_signalForControlEvents:(UIControlEvents)controlEvents;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIControl+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 4/17/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UIControl+RACSignalSupport.h"
10 | #import "RACEXTScope.h"
11 | #import "RACCompoundDisposable.h"
12 | #import "RACDisposable.h"
13 | #import "RACSignal.h"
14 | #import "RACSubscriber.h"
15 | #import "NSObject+RACDeallocating.h"
16 | #import "NSObject+RACDescription.h"
17 |
18 | @implementation UIControl (RACSignalSupport)
19 |
20 | - (RACSignal *)rac_signalForControlEvents:(UIControlEvents)controlEvents {
21 | @weakify(self);
22 |
23 | return [[RACSignal
24 | createSignal:^(id subscriber) {
25 | @strongify(self);
26 |
27 | [self addTarget:subscriber action:@selector(sendNext:) forControlEvents:controlEvents];
28 | [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{
29 | [subscriber sendCompleted];
30 | }]];
31 |
32 | return [RACDisposable disposableWithBlock:^{
33 | @strongify(self);
34 | [self removeTarget:subscriber action:@selector(sendNext:) forControlEvents:controlEvents];
35 | }];
36 | }]
37 | setNameWithFormat:@"%@ -rac_signalForControlEvents: %lx", self.rac_description, (unsigned long)controlEvents];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupportPrivate.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIControl+RACSignalSupportPrivate.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 06/08/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACChannelTerminal;
12 |
13 | @interface UIControl (RACSignalSupportPrivate)
14 |
15 | // Adds a RACChannel-based interface to the receiver for the given
16 | // UIControlEvents and exposes it.
17 | //
18 | // controlEvents - A mask of UIControlEvents on which to send new values.
19 | // key - The key whose value should be read and set when a control
20 | // event fires and when a value is sent to the
21 | // RACChannelTerminal respectively.
22 | // nilValue - The value to be assigned to the key when `nil` is sent to the
23 | // RACChannelTerminal.
24 | //
25 | // Returns a RACChannelTerminal which will send future values from the receiver,
26 | // and update the receiver when values are sent to the terminal.
27 | - (RACChannelTerminal *)rac_channelForControlEvents:(UIControlEvents)controlEvents key:(NSString *)key nilValue:(id)nilValue;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIControl+RACSignalSupportPrivate.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIControl+RACSignalSupportPrivate.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 06/08/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UIControl+RACSignalSupportPrivate.h"
10 | #import "NSObject+RACDeallocating.h"
11 | #import "NSObject+RACLifting.h"
12 | #import "RACChannel.h"
13 | #import "RACCompoundDisposable.h"
14 | #import "RACDisposable.h"
15 | #import "RACSignal+Operations.h"
16 | #import "UIControl+RACSignalSupport.h"
17 |
18 | @implementation UIControl (RACSignalSupportPrivate)
19 |
20 | - (RACChannelTerminal *)rac_channelForControlEvents:(UIControlEvents)controlEvents key:(NSString *)key nilValue:(id)nilValue {
21 | NSCParameterAssert(key.length > 0);
22 | key = [key copy];
23 | RACChannel *channel = [[RACChannel alloc] init];
24 |
25 | [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{
26 | [channel.followingTerminal sendCompleted];
27 | }]];
28 |
29 | RACSignal *eventSignal = [[[self
30 | rac_signalForControlEvents:controlEvents]
31 | mapReplace:key]
32 | takeUntil:[[channel.followingTerminal
33 | ignoreValues]
34 | catchTo:RACSignal.empty]];
35 | [[self
36 | rac_liftSelector:@selector(valueForKey:) withSignals:eventSignal, nil]
37 | subscribe:channel.followingTerminal];
38 |
39 | RACSignal *valuesSignal = [channel.followingTerminal
40 | map:^(id value) {
41 | return value ?: nilValue;
42 | }];
43 | [self rac_liftSelector:@selector(setValue:forKey:) withSignals:valuesSignal, [RACSignal return:key], nil];
44 |
45 | return channel.leadingTerminal;
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIDatePicker+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIDatePicker+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 20/07/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACChannelTerminal;
12 |
13 | @interface UIDatePicker (RACSignalSupport)
14 |
15 | /// Creates a new RACChannel-based binding to the receiver.
16 | ///
17 | /// nilValue - The date to set when the terminal receives `nil`.
18 | ///
19 | /// Returns a RACChannelTerminal that sends the receiver's date whenever the
20 | /// UIControlEventValueChanged control event is fired, and sets the date to the
21 | /// values it receives.
22 | - (RACChannelTerminal *)rac_newDateChannelWithNilValue:(NSDate *)nilValue;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIDatePicker+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIDatePicker+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 20/07/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UIDatePicker+RACSignalSupport.h"
10 | #import "RACEXTKeyPathCoding.h"
11 | #import "UIControl+RACSignalSupportPrivate.h"
12 |
13 | @implementation UIDatePicker (RACSignalSupport)
14 |
15 | - (RACChannelTerminal *)rac_newDateChannelWithNilValue:(NSDate *)nilValue {
16 | return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.date) nilValue:nilValue];
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIGestureRecognizer+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Vera on 5/5/13.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSignal;
12 |
13 | @interface UIGestureRecognizer (RACSignalSupport)
14 |
15 | /// Returns a signal that sends the receiver when its gesture occurs.
16 | - (RACSignal *)rac_gestureSignal;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIGestureRecognizer+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIGestureRecognizer+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Vera on 5/5/13.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import "UIGestureRecognizer+RACSignalSupport.h"
10 | #import "RACEXTScope.h"
11 | #import "NSObject+RACDeallocating.h"
12 | #import "NSObject+RACDescription.h"
13 | #import "RACCompoundDisposable.h"
14 | #import "RACDisposable.h"
15 | #import "RACSignal.h"
16 | #import "RACSubscriber.h"
17 |
18 | @implementation UIGestureRecognizer (RACSignalSupport)
19 |
20 | - (RACSignal *)rac_gestureSignal {
21 | @weakify(self);
22 |
23 | return [[RACSignal
24 | createSignal:^(id subscriber) {
25 | @strongify(self);
26 |
27 | [self addTarget:subscriber action:@selector(sendNext:)];
28 | [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{
29 | [subscriber sendCompleted];
30 | }]];
31 |
32 | return [RACDisposable disposableWithBlock:^{
33 | @strongify(self);
34 | [self removeTarget:subscriber action:@selector(sendNext:)];
35 | }];
36 | }]
37 | setNameWithFormat:@"%@ -rac_gestureSignal", self.rac_description];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIImagePickerController+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImagePickerController+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Timur Kuchkarov on 28.03.14.
6 | // Copyright (c) 2014 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACDelegateProxy;
12 | @class RACSignal;
13 |
14 | @interface UIImagePickerController (RACSignalSupport)
15 |
16 | /// A delegate proxy which will be set as the receiver's delegate when any of the
17 | /// methods in this category are used.
18 | @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy;
19 |
20 | /// Creates a signal for every new selected image.
21 | ///
22 | /// When this method is invoked, the `rac_delegateProxy` will become the
23 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy
24 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't
25 | /// know how to handle. Setting the receiver's `delegate` afterward is considered
26 | /// undefined behavior.
27 | ///
28 | /// Returns a signal which will send the dictionary with info for the selected image.
29 | /// Caller is responsible for picker controller dismissal. The signal will complete
30 | /// itself when the receiver is deallocated or when user cancels selection.
31 | - (RACSignal *)rac_imageSelectedSignal;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIImagePickerController+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImagePickerController+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Timur Kuchkarov on 28.03.14.
6 | // Copyright (c) 2014 GitHub. All rights reserved.
7 | //
8 |
9 | #import "UIImagePickerController+RACSignalSupport.h"
10 | #import "RACDelegateProxy.h"
11 | #import "RACSignal+Operations.h"
12 | #import "NSObject+RACDeallocating.h"
13 | #import "NSObject+RACDescription.h"
14 | #import
15 |
16 | @implementation UIImagePickerController (RACSignalSupport)
17 |
18 | static void RACUseDelegateProxy(UIImagePickerController *self) {
19 | if (self.delegate == self.rac_delegateProxy) return;
20 |
21 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate;
22 | self.delegate = (id)self.rac_delegateProxy;
23 | }
24 |
25 | - (RACDelegateProxy *)rac_delegateProxy {
26 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd);
27 | if (proxy == nil) {
28 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIImagePickerControllerDelegate)];
29 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
30 | }
31 |
32 | return proxy;
33 | }
34 |
35 | - (RACSignal *)rac_imageSelectedSignal {
36 | RACSignal *pickerCancelledSignal = [[self.rac_delegateProxy
37 | signalForSelector:@selector(imagePickerControllerDidCancel:)]
38 | merge:self.rac_willDeallocSignal];
39 |
40 | RACSignal *imagePickerSignal = [[[[self.rac_delegateProxy
41 | signalForSelector:@selector(imagePickerController:didFinishPickingMediaWithInfo:)]
42 | reduceEach:^(UIImagePickerController *pickerController, NSDictionary *userInfo) {
43 | return userInfo;
44 | }]
45 | takeUntil:pickerCancelledSignal]
46 | setNameWithFormat:@"%@ -rac_imageSelectedSignal", self.rac_description];
47 |
48 | RACUseDelegateProxy(self);
49 |
50 | return imagePickerSignal;
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIRefreshControl+RACCommandSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIRefreshControl+RACCommandSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Dave Lee on 2013-10-17.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACCommand;
12 |
13 | @interface UIRefreshControl (RACCommandSupport)
14 |
15 | /// Manipulate the RACCommand property associated with this refresh control.
16 | ///
17 | /// When this refresh control is activated by the user, the command will be
18 | /// executed. Upon completion or error of the execution signal, -endRefreshing
19 | /// will be invoked.
20 | @property (nonatomic, strong) RACCommand *rac_command;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIRefreshControl+RACCommandSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIRefreshControl+RACCommandSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Dave Lee on 2013-10-17.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UIRefreshControl+RACCommandSupport.h"
10 | #import "RACEXTKeyPathCoding.h"
11 | #import "RACCommand.h"
12 | #import "RACCompoundDisposable.h"
13 | #import "RACDisposable.h"
14 | #import "RACSignal.h"
15 | #import "RACSignal+Operations.h"
16 | #import "UIControl+RACSignalSupport.h"
17 | #import
18 |
19 | static void *UIRefreshControlRACCommandKey = &UIRefreshControlRACCommandKey;
20 | static void *UIRefreshControlDisposableKey = &UIRefreshControlDisposableKey;
21 |
22 | @implementation UIRefreshControl (RACCommandSupport)
23 |
24 | - (RACCommand *)rac_command {
25 | return objc_getAssociatedObject(self, UIRefreshControlRACCommandKey);
26 | }
27 |
28 | - (void)setRac_command:(RACCommand *)command {
29 | objc_setAssociatedObject(self, UIRefreshControlRACCommandKey, command, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
30 |
31 | // Dispose of any active command associations.
32 | [objc_getAssociatedObject(self, UIRefreshControlDisposableKey) dispose];
33 |
34 | if (command == nil) return;
35 |
36 | // Like RAC(self, enabled) = command.enabled; but with access to disposable.
37 | RACDisposable *enabledDisposable = [command.enabled setKeyPath:@keypath(self.enabled) onObject:self];
38 |
39 | RACDisposable *executionDisposable = [[[[self
40 | rac_signalForControlEvents:UIControlEventValueChanged]
41 | map:^(UIRefreshControl *x) {
42 | return [[[command
43 | execute:x]
44 | catchTo:[RACSignal empty]]
45 | then:^{
46 | return [RACSignal return:x];
47 | }];
48 | }]
49 | concat]
50 | subscribeNext:^(UIRefreshControl *x) {
51 | [x endRefreshing];
52 | }];
53 |
54 | RACDisposable *commandDisposable = [RACCompoundDisposable compoundDisposableWithDisposables:@[ enabledDisposable, executionDisposable ]];
55 | objc_setAssociatedObject(self, UIRefreshControlDisposableKey, commandDisposable, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
56 | }
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UISegmentedControl+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UISegmentedControl+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 20/07/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACChannelTerminal;
12 |
13 | @interface UISegmentedControl (RACSignalSupport)
14 |
15 | /// Creates a new RACChannel-based binding to the receiver.
16 | ///
17 | /// nilValue - The segment to select when the terminal receives `nil`.
18 | ///
19 | /// Returns a RACChannelTerminal that sends the receiver's currently selected
20 | /// segment's index whenever the UIControlEventValueChanged control event is
21 | /// fired, and sets the selected segment index to the values it receives.
22 | - (RACChannelTerminal *)rac_newSelectedSegmentIndexChannelWithNilValue:(NSNumber *)nilValue;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UISegmentedControl+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UISegmentedControl+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 20/07/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UISegmentedControl+RACSignalSupport.h"
10 | #import "RACEXTKeyPathCoding.h"
11 | #import "UIControl+RACSignalSupportPrivate.h"
12 |
13 | @implementation UISegmentedControl (RACSignalSupport)
14 |
15 | - (RACChannelTerminal *)rac_newSelectedSegmentIndexChannelWithNilValue:(NSNumber *)nilValue {
16 | return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.selectedSegmentIndex) nilValue:nilValue];
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UISlider+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UISlider+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 20/07/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACChannelTerminal;
12 |
13 | @interface UISlider (RACSignalSupport)
14 |
15 | /// Creates a new RACChannel-based binding to the receiver.
16 | ///
17 | /// nilValue - The value to set when the terminal receives `nil`.
18 | ///
19 | /// Returns a RACChannelTerminal that sends the receiver's value whenever the
20 | /// UIControlEventValueChanged control event is fired, and sets the value to the
21 | /// values it receives.
22 | - (RACChannelTerminal *)rac_newValueChannelWithNilValue:(NSNumber *)nilValue;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UISlider+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UISlider+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 20/07/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UISlider+RACSignalSupport.h"
10 | #import "RACEXTKeyPathCoding.h"
11 | #import "UIControl+RACSignalSupportPrivate.h"
12 |
13 | @implementation UISlider (RACSignalSupport)
14 |
15 | - (RACChannelTerminal *)rac_newValueChannelWithNilValue:(NSNumber *)nilValue {
16 | return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.value) nilValue:nilValue];
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIStepper+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIStepper+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 20/07/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACChannelTerminal;
12 |
13 | @interface UIStepper (RACSignalSupport)
14 |
15 | /// Creates a new RACChannel-based binding to the receiver.
16 | ///
17 | /// nilValue - The value to set when the terminal receives `nil`.
18 | ///
19 | /// Returns a RACChannelTerminal that sends the receiver's value whenever the
20 | /// UIControlEventValueChanged control event is fired, and sets the value to the
21 | /// values it receives.
22 | - (RACChannelTerminal *)rac_newValueChannelWithNilValue:(NSNumber *)nilValue;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UIStepper+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIStepper+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 20/07/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UIStepper+RACSignalSupport.h"
10 | #import "RACEXTKeyPathCoding.h"
11 | #import "UIControl+RACSignalSupportPrivate.h"
12 |
13 | @implementation UIStepper (RACSignalSupport)
14 |
15 | - (RACChannelTerminal *)rac_newValueChannelWithNilValue:(NSNumber *)nilValue {
16 | return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.value) nilValue:nilValue];
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UISwitch+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UISwitch+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 20/07/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACChannelTerminal;
12 |
13 | @interface UISwitch (RACSignalSupport)
14 |
15 | /// Creates a new RACChannel-based binding to the receiver.
16 | ///
17 | /// Returns a RACChannelTerminal that sends whether the receiver is on whenever
18 | /// the UIControlEventValueChanged control event is fired, and sets it on or off
19 | /// when it receives @YES or @NO respectively.
20 | - (RACChannelTerminal *)rac_newOnChannel;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UISwitch+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UISwitch+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Uri Baghin on 20/07/2013.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UISwitch+RACSignalSupport.h"
10 | #import "RACEXTKeyPathCoding.h"
11 | #import "UIControl+RACSignalSupportPrivate.h"
12 |
13 | @implementation UISwitch (RACSignalSupport)
14 |
15 | - (RACChannelTerminal *)rac_newOnChannel {
16 | return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.on) nilValue:@NO];
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UITableViewCell+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UITableViewCell+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-07-22.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSignal;
12 |
13 | @interface UITableViewCell (RACSignalSupport)
14 |
15 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon
16 | /// the receiver.
17 | ///
18 | /// Examples
19 | ///
20 | /// [[[self.cancelButton
21 | /// rac_signalForControlEvents:UIControlEventTouchUpInside]
22 | /// takeUntil:self.rac_prepareForReuseSignal]
23 | /// subscribeNext:^(UIButton *x) {
24 | /// // do other things
25 | /// }];
26 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UITableViewCell+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UITableViewCell+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Justin Spahr-Summers on 2013-07-22.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UITableViewCell+RACSignalSupport.h"
10 | #import "NSObject+RACDescription.h"
11 | #import "NSObject+RACSelectorSignal.h"
12 | #import "RACSignal+Operations.h"
13 | #import "RACUnit.h"
14 | #import
15 |
16 | @implementation UITableViewCell (RACSignalSupport)
17 |
18 | - (RACSignal *)rac_prepareForReuseSignal {
19 | RACSignal *signal = objc_getAssociatedObject(self, _cmd);
20 | if (signal != nil) return signal;
21 |
22 | signal = [[[self
23 | rac_signalForSelector:@selector(prepareForReuse)]
24 | mapReplace:RACUnit.defaultUnit]
25 | setNameWithFormat:@"%@ -rac_prepareForReuseSignal", self.rac_description];
26 |
27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
28 | return signal;
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UITableViewHeaderFooterView+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UITableViewHeaderFooterView+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Syo Ikeda on 12/30/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACSignal;
12 |
13 | // This category is only applicable to iOS >= 6.0.
14 | @interface UITableViewHeaderFooterView (RACSignalSupport)
15 |
16 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon
17 | /// the receiver.
18 | ///
19 | /// Examples
20 | ///
21 | /// [[[self.cancelButton
22 | /// rac_signalForControlEvents:UIControlEventTouchUpInside]
23 | /// takeUntil:self.rac_prepareForReuseSignal]
24 | /// subscribeNext:^(UIButton *x) {
25 | /// // do other things
26 | /// }];
27 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UITableViewHeaderFooterView+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UITableViewHeaderFooterView+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Syo Ikeda on 12/30/13.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UITableViewHeaderFooterView+RACSignalSupport.h"
10 | #import "NSObject+RACDescription.h"
11 | #import "NSObject+RACSelectorSignal.h"
12 | #import "RACSignal+Operations.h"
13 | #import "RACUnit.h"
14 | #import
15 |
16 | @implementation UITableViewHeaderFooterView (RACSignalSupport)
17 |
18 | - (RACSignal *)rac_prepareForReuseSignal {
19 | RACSignal *signal = objc_getAssociatedObject(self, _cmd);
20 | if (signal != nil) return signal;
21 |
22 | signal = [[[self
23 | rac_signalForSelector:@selector(prepareForReuse)]
24 | mapReplace:RACUnit.defaultUnit]
25 | setNameWithFormat:@"%@ -rac_prepareForReuseSignal", self.rac_description];
26 |
27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
28 | return signal;
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UITextField+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UITextField+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 4/17/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACChannelTerminal;
12 | @class RACSignal;
13 |
14 | @interface UITextField (RACSignalSupport)
15 |
16 | /// Creates and returns a signal for the text of the field. It always starts with
17 | /// the current text. The signal sends next when the UIControlEventEditingChanged
18 | /// or UIControlEventEditingDidBegin control event is fired on the control.
19 | - (RACSignal *)rac_textSignal;
20 |
21 | /// Creates a new RACChannel-based binding to the receiver.
22 | ///
23 | /// Returns a RACChannelTerminal that sends the receiver's text whenever the
24 | /// UIControlEventEditingChanged or UIControlEventEditingDidBegin control event
25 | /// is fired, and sets the text to the values it receives.
26 | - (RACChannelTerminal *)rac_newTextChannel;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UITextField+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UITextField+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Josh Abernathy on 4/17/12.
6 | // Copyright (c) 2012 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "UITextField+RACSignalSupport.h"
10 | #import "RACEXTKeyPathCoding.h"
11 | #import "RACEXTScope.h"
12 | #import "NSObject+RACDeallocating.h"
13 | #import "NSObject+RACDescription.h"
14 | #import "RACSignal+Operations.h"
15 | #import "UIControl+RACSignalSupport.h"
16 | #import "UIControl+RACSignalSupportPrivate.h"
17 |
18 | @implementation UITextField (RACSignalSupport)
19 |
20 | - (RACSignal *)rac_textSignal {
21 | @weakify(self);
22 | return [[[[[RACSignal
23 | defer:^{
24 | @strongify(self);
25 | return [RACSignal return:self];
26 | }]
27 | concat:[self rac_signalForControlEvents:UIControlEventEditingChanged | UIControlEventEditingDidBegin]]
28 | map:^(UITextField *x) {
29 | return x.text;
30 | }]
31 | takeUntil:self.rac_willDeallocSignal]
32 | setNameWithFormat:@"%@ -rac_textSignal", self.rac_description];
33 | }
34 |
35 | - (RACChannelTerminal *)rac_newTextChannel {
36 | return [self rac_channelForControlEvents:UIControlEventEditingChanged | UIControlEventEditingDidBegin key:@keypath(self.text) nilValue:@""];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UITextView+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UITextView+RACSignalSupport.h
3 | // ReactiveCocoa
4 | //
5 | // Created by Cody Krieger on 5/18/12.
6 | // Copyright (c) 2012 Cody Krieger. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACDelegateProxy;
12 | @class RACSignal;
13 |
14 | @interface UITextView (RACSignalSupport)
15 |
16 | /// A delegate proxy which will be set as the receiver's delegate when any of the
17 | /// methods in this category are used.
18 | @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy;
19 |
20 | /// Creates a signal for the text of the receiver.
21 | ///
22 | /// When this method is invoked, the `rac_delegateProxy` will become the
23 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy
24 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't
25 | /// know how to handle. Setting the receiver's `delegate` afterward is
26 | /// considered undefined behavior.
27 | ///
28 | /// Returns a signal which will send the current text upon subscription, then
29 | /// again whenever the receiver's text is changed. The signal will complete when
30 | /// the receiver is deallocated.
31 | - (RACSignal *)rac_textSignal;
32 |
33 | @end
34 |
35 | @interface UITextView (RACSignalSupportUnavailable)
36 |
37 | - (RACSignal *)rac_signalForDelegateMethod:(SEL)method __attribute__((unavailable("Use -rac_signalForSelector:fromProtocol: instead")));
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Pods/ReactiveCocoa/ReactiveCocoa/UITextView+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UITextView+RACSignalSupport.m
3 | // ReactiveCocoa
4 | //
5 | // Created by Cody Krieger on 5/18/12.
6 | // Copyright (c) 2012 Cody Krieger. All rights reserved.
7 | //
8 |
9 | #import "UITextView+RACSignalSupport.h"
10 | #import "RACEXTScope.h"
11 | #import "NSObject+RACDeallocating.h"
12 | #import "NSObject+RACDescription.h"
13 | #import "RACDelegateProxy.h"
14 | #import "RACSignal+Operations.h"
15 | #import "RACTuple.h"
16 | #import
17 |
18 | @implementation UITextView (RACSignalSupport)
19 |
20 | static void RACUseDelegateProxy(UITextView *self) {
21 | if (self.delegate == self.rac_delegateProxy) return;
22 |
23 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate;
24 | self.delegate = (id)self.rac_delegateProxy;
25 | }
26 |
27 | - (RACDelegateProxy *)rac_delegateProxy {
28 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd);
29 | if (proxy == nil) {
30 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UITextViewDelegate)];
31 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
32 | }
33 |
34 | return proxy;
35 | }
36 |
37 | - (RACSignal *)rac_textSignal {
38 | @weakify(self);
39 | RACSignal *signal = [[[[[RACSignal
40 | defer:^{
41 | @strongify(self);
42 | return [RACSignal return:RACTuplePack(self)];
43 | }]
44 | concat:[self.rac_delegateProxy signalForSelector:@selector(textViewDidChange:)]]
45 | reduceEach:^(UITextView *x) {
46 | return x.text;
47 | }]
48 | takeUntil:self.rac_willDeallocSignal]
49 | setNameWithFormat:@"%@ -rac_textSignal", self.rac_description];
50 |
51 | RACUseDelegateProxy(self);
52 |
53 | return signal;
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ReactiveCocoaUtilityDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
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 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ReactiveCocoaUtilityDemo/Pods-ReactiveCocoaUtilityDemo-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## ReactiveCocoa
5 |
6 | **Copyright (c) 2012 - 2015, GitHub, Inc.**
7 | **All rights reserved.**
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of
10 | this software and associated documentation files (the "Software"), to deal in
11 | the Software without restriction, including without limitation the rights to
12 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13 | the Software, and to permit persons to whom the Software is furnished to do so,
14 | subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 |
26 | Generated by CocoaPods - http://cocoapods.org
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ReactiveCocoaUtilityDemo/Pods-ReactiveCocoaUtilityDemo-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | **Copyright (c) 2012 - 2015, GitHub, Inc.**
18 | **All rights reserved.**
19 |
20 | Permission is hereby granted, free of charge, to any person obtaining a copy of
21 | this software and associated documentation files (the "Software"), to deal in
22 | the Software without restriction, including without limitation the rights to
23 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
24 | the Software, and to permit persons to whom the Software is furnished to do so,
25 | subject to the following conditions:
26 |
27 | The above copyright notice and this permission notice shall be included in all
28 | copies or substantial portions of the Software.
29 |
30 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
32 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
33 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
34 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
35 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 |
37 | Title
38 | ReactiveCocoa
39 | Type
40 | PSGroupSpecifier
41 |
42 |
43 | FooterText
44 | Generated by CocoaPods - http://cocoapods.org
45 | Title
46 |
47 | Type
48 | PSGroupSpecifier
49 |
50 |
51 | StringsTable
52 | Acknowledgements
53 | Title
54 | Acknowledgements
55 |
56 |
57 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ReactiveCocoaUtilityDemo/Pods-ReactiveCocoaUtilityDemo-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ReactiveCocoaUtilityDemo : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ReactiveCocoaUtilityDemo
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ReactiveCocoaUtilityDemo/Pods-ReactiveCocoaUtilityDemo-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | FOUNDATION_EXPORT double Pods_ReactiveCocoaUtilityDemoVersionNumber;
5 | FOUNDATION_EXPORT const unsigned char Pods_ReactiveCocoaUtilityDemoVersionString[];
6 |
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ReactiveCocoaUtilityDemo/Pods-ReactiveCocoaUtilityDemo.debug.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
3 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/ReactiveCocoa.framework/Headers"
4 | OTHER_LDFLAGS = $(inherited) -framework "ReactiveCocoa"
5 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-ReactiveCocoaUtilityDemo
6 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ReactiveCocoaUtilityDemo/Pods-ReactiveCocoaUtilityDemo.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ReactiveCocoaUtilityDemo {
2 | umbrella header "Pods-ReactiveCocoaUtilityDemo-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ReactiveCocoaUtilityDemo/Pods-ReactiveCocoaUtilityDemo.release.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
3 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/ReactiveCocoa.framework/Headers"
4 | OTHER_LDFLAGS = $(inherited) -framework "ReactiveCocoa"
5 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-ReactiveCocoaUtilityDemo
6 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Pods/Target Support Files/ReactiveCocoa/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 2.4.7
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/ReactiveCocoa/ReactiveCocoa-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_ReactiveCocoa : NSObject
3 | @end
4 | @implementation PodsDummy_ReactiveCocoa
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/ReactiveCocoa/ReactiveCocoa-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/ReactiveCocoa/ReactiveCocoa.modulemap:
--------------------------------------------------------------------------------
1 | framework module ReactiveCocoa {
2 | umbrella header "ReactiveCocoa-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 |
7 | private header "RACMulticastConnection+Private.h"
8 | private header "RACScheduler+Private.h"
9 | private header "RACStream+Private.h"
10 | private header "RACSubscriber+Private.h"
11 | }
12 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/ReactiveCocoa/ReactiveCocoa.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ReactiveCocoa" "${PODS_ROOT}/Headers/Public"
3 | PODS_ROOT = ${SRCROOT}
4 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ReactiveCocoaUtilityDemo
2 |
3 | ReactiveCocoa实用案例
4 |
5 | 项目共包含三个案例:
6 |
7 | 1. 登录或注册时的输入基本验证
8 | 2. 搜索
9 | 3. 解决block嵌套
10 |
11 | 本文相关博客讲解:
12 |
13 | [ReactiveCocoa实用案例](http://www.brighttj.com/ios/ios-reactivecocoa-utility-demo.html)
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo.xcodeproj/project.xcworkspace/xcuserdata/tangjr.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saitjr/ReactiveCocoaUtilityDemo/6b1586a2af3fa2270b3c7e97bcdb82519ec24552/ReactiveCocoaUtilityDemo.xcodeproj/project.xcworkspace/xcuserdata/tangjr.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo.xcodeproj/xcuserdata/tangjr.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ReactiveCocoaUtilityDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 961A3BF81BD69DDD0049F266
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo.xcworkspace/xcuserdata/tangjr.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saitjr/ReactiveCocoaUtilityDemo/6b1586a2af3fa2270b3c7e97bcdb82519ec24552/ReactiveCocoaUtilityDemo.xcworkspace/xcuserdata/tangjr.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo.xcworkspace/xcuserdata/tangjr.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ReactiveCocoaUtilityDemo
4 | //
5 | // Created by TangJR on 10/21/15.
6 | // Copyright © 2015 tangjr. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // ReactiveCocoaUtilityDemo
4 | //
5 | // Created by TangJR on 10/21/15.
6 | // Copyright © 2015 tangjr. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/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 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/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 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // ReactiveCocoaUtilityDemo
4 | //
5 | // Created by TangJR on 10/21/15.
6 | // Copyright © 2015 tangjr. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/block嵌套/BlockViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // BlockViewController.h
3 | // ReactiveCocoaUtilityDemo
4 | //
5 | // Created by TangJR on 10/21/15.
6 | // Copyright © 2015 tangjr. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BlockViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/block嵌套/BlockViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // BlockViewController.m
3 | // ReactiveCocoaUtilityDemo
4 | //
5 | // Created by TangJR on 10/21/15.
6 | // Copyright © 2015 tangjr. All rights reserved.
7 | //
8 |
9 | #import "BlockViewController.h"
10 | #import "ReactiveCocoa.h"
11 |
12 | @interface BlockViewController ()
13 |
14 | @end
15 |
16 | @implementation BlockViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view.
21 |
22 | [self setupRequestSignal];
23 | }
24 |
25 | - (void)setupRequestSignal {
26 |
27 | // 假设发起两个请求
28 | // request1与request2是自定义方法,会返回两个信号
29 | RACSignal *signal1 = [self request1];
30 | RACSignal *signal2 = [self request2];
31 |
32 | [[signal1 concat:signal2] subscribeNext:^(id x) {
33 |
34 | NSLog(@"%@", x);
35 | }];
36 | }
37 |
38 | - (RACSignal *)request1 {
39 |
40 | return [RACSignal createSignal:^RACDisposable *(id subscriber) {
41 |
42 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
43 |
44 | [subscriber sendNext:@"请求1完成"];
45 | [subscriber sendCompleted];
46 | });
47 |
48 | return nil;
49 | }];
50 | }
51 |
52 | - (RACSignal *)request2 {
53 |
54 | return [RACSignal createSignal:^RACDisposable *(id subscriber) {
55 |
56 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
57 |
58 | [subscriber sendNext:@"请求2完成"];
59 | [subscriber sendCompleted];
60 | });
61 |
62 | return nil;
63 | }];
64 | }
65 |
66 | @end
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ReactiveCocoaUtilityDemo
4 | //
5 | // Created by TangJR on 10/21/15.
6 | // Copyright © 2015 tangjr. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/搜索/SearchViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SearchViewController.h
3 | // ReactiveCocoaUtilityDemo
4 | //
5 | // Created by TangJR on 10/21/15.
6 | // Copyright © 2015 tangjr. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SearchViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ReactiveCocoaUtilityDemo/搜索/SearchViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SearchViewController.m
3 | // ReactiveCocoaUtilityDemo
4 | //
5 | // Created by TangJR on 10/21/15.
6 | // Copyright © 2015 tangjr. All rights reserved.
7 | //
8 |
9 | /*
10 |
11 | 案例二:搜索
12 |
13 | 搜索结果并没有显示到界面上,只是进行的原样输出
14 |
15 | */
16 |
17 | #import "SearchViewController.h"
18 | #import "ReactiveCocoa.h"
19 |
20 | @interface SearchViewController ()
21 |
22 | @property (weak, nonatomic) IBOutlet UITextField *searchTextField;
23 |
24 | @end
25 |
26 | @implementation SearchViewController
27 |
28 | - (void)viewDidLoad {
29 | [super viewDidLoad];
30 | // Do any additional setup after loading the view.
31 |
32 | [self setupSearchSignal];
33 | }
34 |
35 | - (void)setupSearchSignal {
36 |
37 | @weakify(self);
38 | [[[[[self.searchTextField.rac_textSignal
39 | // 先将不合法的搜索词过滤掉(返回的bool值决定了signal是否继续向下传递)
40 | filter:^BOOL(NSString *searchKeyword) {
41 |
42 | return @(searchKeyword.length);
43 | }]
44 | // 因为没必要每次一输入便进行网络请求,所以0.5s之后,才进行搜索。(throttle是在规定时间后,信号继续向下传递)
45 | throttle:0.5]
46 | // 网络请求将会返回signal,所以直接使用flattenMap来映射,而不必用map
47 | flattenMap:^RACStream *(NSString *searchKeyword) {
48 |
49 | @strongify(self);
50 | // 发起网络请求
51 | return [self searchWithKeyword:searchKeyword];
52 | }]
53 | // 回到主线程,因为在signal订阅中可能更新界面
54 | deliverOnMainThread]
55 | // 订阅网络请求返回的信号
56 | subscribeNext:^(id x) {
57 |
58 | NSLog(@"%@", x);
59 | }];
60 | }
61 |
62 | - (RACSignal *)searchWithKeyword:(NSString *)keyword {
63 |
64 | return [RACSignal createSignal:^RACDisposable *(id subscriber) {
65 |
66 | // 模拟网络请求
67 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
68 |
69 | [subscriber sendNext:keyword];
70 | [subscriber sendCompleted];
71 | });
72 |
73 | return nil;
74 | }];
75 | }
76 |
77 | @end
--------------------------------------------------------------------------------