├── .gitignore ├── Podfile ├── Podfile.lock ├── Pods ├── Headers │ ├── Private │ │ ├── Masonry │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── MASConstraint+Private.h │ │ │ ├── MASConstraint.h │ │ │ ├── MASConstraintMaker.h │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── MASUtilities.h │ │ │ ├── MASViewAttribute.h │ │ │ ├── MASViewConstraint.h │ │ │ ├── Masonry.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ │ ├── View+MASAdditions.h │ │ │ ├── View+MASShorthandAdditions.h │ │ │ └── ViewController+MASAdditions.h │ │ └── ReactiveObjC │ │ │ ├── MKAnnotationView+RACSignalSupport.h │ │ │ ├── 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 │ │ │ ├── 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 │ │ │ ├── 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 │ │ │ ├── ReactiveObjC.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 │ └── Public │ │ ├── Masonry │ │ ├── MASCompositeConstraint.h │ │ ├── MASConstraint+Private.h │ │ ├── MASConstraint.h │ │ ├── MASConstraintMaker.h │ │ ├── MASLayoutConstraint.h │ │ ├── MASUtilities.h │ │ ├── MASViewAttribute.h │ │ ├── MASViewConstraint.h │ │ ├── Masonry.h │ │ ├── NSArray+MASAdditions.h │ │ ├── NSArray+MASShorthandAdditions.h │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ ├── View+MASAdditions.h │ │ ├── View+MASShorthandAdditions.h │ │ └── ViewController+MASAdditions.h │ │ └── ReactiveObjC │ │ ├── MKAnnotationView+RACSignalSupport.h │ │ ├── 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 │ │ ├── RACBehaviorSubject.h │ │ ├── RACBlockTrampoline.h │ │ ├── RACChannel.h │ │ ├── RACCommand.h │ │ ├── RACCompoundDisposable.h │ │ ├── RACDelegateProxy.h │ │ ├── RACDisposable.h │ │ ├── RACDynamicSequence.h │ │ ├── RACDynamicSignal.h │ │ ├── RACEXTKeyPathCoding.h │ │ ├── RACEXTScope.h │ │ ├── RACEagerSequence.h │ │ ├── RACErrorSignal.h │ │ ├── RACEvent.h │ │ ├── RACGroupedSignal.h │ │ ├── RACImmediateScheduler.h │ │ ├── RACIndexSetSequence.h │ │ ├── RACKVOChannel.h │ │ ├── RACKVOProxy.h │ │ ├── RACKVOTrampoline.h │ │ ├── RACMulticastConnection.h │ │ ├── RACPassthroughSubscriber.h │ │ ├── RACQueueScheduler+Subclass.h │ │ ├── RACQueueScheduler.h │ │ ├── RACReplaySubject.h │ │ ├── RACReturnSignal.h │ │ ├── RACScheduler+Subclass.h │ │ ├── RACScheduler.h │ │ ├── RACScopedDisposable.h │ │ ├── RACSequence.h │ │ ├── RACSerialDisposable.h │ │ ├── RACSignal+Operations.h │ │ ├── RACSignal.h │ │ ├── RACSignalSequence.h │ │ ├── RACStream.h │ │ ├── RACStringSequence.h │ │ ├── RACSubject.h │ │ ├── RACSubscriber.h │ │ ├── RACSubscriptingAssignmentTrampoline.h │ │ ├── RACSubscriptionScheduler.h │ │ ├── RACTargetQueueScheduler.h │ │ ├── RACTestScheduler.h │ │ ├── RACTuple.h │ │ ├── RACTupleSequence.h │ │ ├── RACUnarySequence.h │ │ ├── RACUnit.h │ │ ├── RACValueTransformer.h │ │ ├── RACmetamacros.h │ │ ├── ReactiveObjC.h │ │ ├── UIActionSheet+RACSignalSupport.h │ │ ├── UIAlertView+RACSignalSupport.h │ │ ├── UIBarButtonItem+RACCommandSupport.h │ │ ├── UIButton+RACCommandSupport.h │ │ ├── UICollectionReusableView+RACSignalSupport.h │ │ ├── UIControl+RACSignalSupport.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 ├── Masonry │ ├── LICENSE │ ├── Masonry │ │ ├── MASCompositeConstraint.h │ │ ├── MASCompositeConstraint.m │ │ ├── MASConstraint+Private.h │ │ ├── MASConstraint.h │ │ ├── MASConstraint.m │ │ ├── MASConstraintMaker.h │ │ ├── MASConstraintMaker.m │ │ ├── MASLayoutConstraint.h │ │ ├── MASLayoutConstraint.m │ │ ├── MASUtilities.h │ │ ├── MASViewAttribute.h │ │ ├── MASViewAttribute.m │ │ ├── MASViewConstraint.h │ │ ├── MASViewConstraint.m │ │ ├── Masonry.h │ │ ├── NSArray+MASAdditions.h │ │ ├── NSArray+MASAdditions.m │ │ ├── NSArray+MASShorthandAdditions.h │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ ├── NSLayoutConstraint+MASDebugAdditions.m │ │ ├── View+MASAdditions.h │ │ ├── View+MASAdditions.m │ │ ├── View+MASShorthandAdditions.h │ │ ├── ViewController+MASAdditions.h │ │ └── ViewController+MASAdditions.m │ └── README.md ├── Pods.xcodeproj │ └── project.pbxproj ├── ReactiveObjC │ ├── LICENSE.md │ ├── README.md │ └── ReactiveObjC │ │ ├── MKAnnotationView+RACSignalSupport.h │ │ ├── MKAnnotationView+RACSignalSupport.m │ │ ├── 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 │ │ ├── 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 │ │ ├── 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 │ │ ├── ReactiveObjC.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 │ ├── Masonry │ ├── Masonry-dummy.m │ ├── Masonry-prefix.pch │ └── Masonry.xcconfig │ ├── Pods-YasicMetalDemo │ ├── Pods-YasicMetalDemo-acknowledgements.markdown │ ├── Pods-YasicMetalDemo-acknowledgements.plist │ ├── Pods-YasicMetalDemo-dummy.m │ ├── Pods-YasicMetalDemo-frameworks.sh │ ├── Pods-YasicMetalDemo-resources.sh │ ├── Pods-YasicMetalDemo.debug.xcconfig │ └── Pods-YasicMetalDemo.release.xcconfig │ └── ReactiveObjC │ ├── ReactiveObjC-dummy.m │ ├── ReactiveObjC-prefix.pch │ └── ReactiveObjC.xcconfig ├── YasicMetalDemo.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── yasic.xcuserdatad │ └── UserInterfaceState.xcuserstate ├── YasicMetalDemo.xcworkspace └── contents.xcworkspacedata └── YasicMetalDemo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets ├── AppIcon.appiconset │ └── Contents.json ├── Contents.json ├── CubeImage.imageset │ ├── Contents.json │ └── IMG_4946.jpg ├── DogLogo.imageset │ ├── Contents.json │ └── DogLogo.png ├── FilterTargetImage.imageset │ ├── Contents.json │ └── FilterTargetImage.png ├── lookup_000.imageset │ ├── Contents.json │ └── lookup_000.png ├── lookup_001.imageset │ ├── Contents.json │ └── lookup_001.png ├── lookup_002.imageset │ ├── Contents.json │ └── lookup_002.png ├── lookup_003.imageset │ ├── Contents.json │ └── lookup_003.png ├── lookup_004.imageset │ ├── Contents.json │ └── lookup_004.png ├── lookup_005.imageset │ ├── Contents.json │ └── lookup_005.png ├── lookup_006.imageset │ ├── Contents.json │ └── lookup_006.png ├── lut_abao.imageset │ ├── Contents.json │ └── lut_abao.png └── qrcode.imageset │ ├── Contents.json │ └── qrcode.jpg ├── Base.lproj ├── LaunchScreen.storyboard └── Main.storyboard ├── CAMetalLayerPage ├── CAMetalLayerPage.h ├── CAMetalLayerPage.m ├── CustomMetalView.h └── CustomMetalView.m ├── Compute ├── YMDComputeKernelPage.h └── YMDComputeKernelPage.m ├── Core ├── Basic │ ├── Pipeline │ │ ├── YMPipeline.h │ │ └── YMStandardShaderFunctions.metal │ ├── YMBasicTool.h │ ├── YMBasicTool.m │ ├── YMConstants.h │ ├── YMConstants.m │ ├── YMMetalContext.h │ ├── YMMetalContext.m │ ├── YMTexture.h │ └── YMTexture.m ├── Inputs │ ├── YMTextureInput.h │ └── YMTextureInput.m ├── Operations │ ├── YMBasicOperation.h │ ├── YMBasicOperation.m │ ├── YMBrightnessOperation.h │ ├── YMBrightnessOperation.m │ ├── YMBrightnessShader.metal │ ├── YMLUTFilterOperation.h │ ├── YMLUTFilterOperation.m │ ├── YMLUTFilterOperationShader.metal │ ├── YMMetalDefine.h │ ├── YMSaturationOperation.h │ ├── YMSaturationOperation.m │ ├── YMSaturationShader.metal │ ├── YMStylizeOperation.h │ ├── YMStylizeOperation.m │ ├── YMToonOperation.h │ ├── YMToonOperation.m │ ├── YMToonOperation.metal │ ├── YMZoomBlurOperation.h │ ├── YMZoomBlurOperation.m │ └── YMZoomBlurShader.metal └── Outputs │ ├── YMTextureOutput.h │ └── YMTextureOutput.m ├── DepthStencilPage ├── DepthStencilPage.h └── DepthStencilPage.m ├── ImageCube ├── CubeViewController.h └── CubeViewController.m ├── Info.plist ├── LUTFilter ├── Page │ ├── YMDImageLUTFilterPage.h │ ├── YMDImageLUTFilterPage.m │ ├── YMDVideoLUTFilterPage.h │ └── YMDVideoLUTFilterPage.m └── Util │ ├── YMDFilterProcessor.h │ └── YMDFilterProcessor.m ├── Light ├── YMDLightDemoPage.h └── YMDLightDemoPage.m ├── Resource ├── MetalShader │ ├── ComputeKernel.metal │ ├── CubeShaders.metal │ ├── DepthStencilShader.metal │ ├── ImageFilterShaders.metal │ ├── LightKernel.metal │ ├── SamplerDemoShader.metal │ └── VertexDescriptor.metal └── video.mp4 ├── SamplerDemo ├── SamplerDemoPage.h └── SamplerDemoPage.m ├── TextRenderPage ├── GlyphInfo.h ├── GlyphInfo.m ├── TextRenderPage.h └── TextRenderPage.m ├── TrainedModels ├── candy.mlmodel ├── mosaic.mlmodel ├── the_scream.mlmodel └── udnie.mlmodel ├── VertexDescriptor ├── VertexDescrpitorPage.h └── VertexDescrpitorPage.m ├── ViewController.h ├── ViewController.m ├── YMDMacros.h └── main.m /.gitignore: -------------------------------------------------------------------------------- 1 | YasicMetalDemo.xcworkspace/xcshareddata/ 2 | Pods/Pods.xcodeproj/xcuserdata/*.xcuserdatad/ 3 | YasicMetalDemo.xcodeproj/xcuserdata/*.xcuserdatad/ 4 | YasicMetalDemo.xcodeproj/xcuserdata/ 5 | .DS_Store 6 | YasicMetalDemo.xcworkspace/xcuserdata/ 7 | YasicMetalDemo.xcworkspace/xcuserdata/*.xcuserdatad/ 8 | Pods/Pods.xcodeproj/xcuserdata/ 9 | build/ 10 | *.swp 11 | *.xcscheme 12 | 13 | # fastlane specific 14 | fastlane/report.xml 15 | fastlane/Preview.html 16 | fastlane/screenshots 17 | fastlane/test_output 18 | .idea/ 19 | 20 | YasicMetalDemo/Resource/video.mp4 21 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | source 'https://git.coding.net/CocoaPods/Specs.git' 5 | 6 | target 'YasicMetalDemo' do 7 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 8 | # use_frameworks! 9 | pod 'Masonry' 10 | pod 'ReactiveObjC' 11 | 12 | end 13 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Masonry (1.0.2) 3 | - ReactiveObjC (2.1.2) 4 | 5 | DEPENDENCIES: 6 | - Masonry 7 | - ReactiveObjC 8 | 9 | SPEC CHECKSUMS: 10 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e 11 | ReactiveObjC: 7b6782ae39f9ac0f57205c3b0c0b69b9dd7048c0 12 | 13 | PODFILE CHECKSUM: 4f6fb3c04b1616cb465d89f1977ab3b6a6de77da 14 | 15 | COCOAPODS: 1.1.1 16 | -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/MKAnnotationView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/MKAnnotationView+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSArray+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSArray+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSData+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSData+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSDictionary+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSDictionary+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSEnumerator+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSEnumerator+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSFileHandle+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSFileHandle+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSIndexSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSIndexSet+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSInvocation+RACTypeParsing.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSInvocation+RACTypeParsing.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSNotificationCenter+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSNotificationCenter+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSObject+RACDeallocating.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACDeallocating.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSObject+RACDescription.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACDescription.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSObject+RACKVOWrapper.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACKVOWrapper.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSObject+RACLifting.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACLifting.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSObject+RACPropertySubscribing.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACPropertySubscribing.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSObject+RACSelectorSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACSelectorSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSOrderedSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSOrderedSet+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSSet+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSString+RACKeyPathUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSString+RACKeyPathUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSString+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSString+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSString+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSString+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSURLConnection+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSURLConnection+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/NSUserDefaults+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSUserDefaults+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACArraySequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACArraySequence.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACBehaviorSubject.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACBehaviorSubject.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACBlockTrampoline.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACBlockTrampoline.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACChannel.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACChannel.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACCommand.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACCommand.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACCompoundDisposable.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACCompoundDisposable.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACDelegateProxy.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACDelegateProxy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACDisposable.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACDisposable.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACDynamicSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACDynamicSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACDynamicSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACDynamicSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACEXTKeyPathCoding.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/extobjc/RACEXTKeyPathCoding.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACEXTRuntimeExtensions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/extobjc/RACEXTRuntimeExtensions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACEXTScope.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/extobjc/RACEXTScope.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACEagerSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACEagerSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACEmptySequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACEmptySequence.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACEmptySignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACEmptySignal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACErrorSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACErrorSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACEvent.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACEvent.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACGroupedSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACGroupedSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACImmediateScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACImmediateScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACIndexSetSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACIndexSetSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACKVOChannel.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACKVOChannel.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACKVOProxy.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACKVOProxy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACKVOTrampoline.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACKVOTrampoline.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACMulticastConnection+Private.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACMulticastConnection+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACMulticastConnection.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACMulticastConnection.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACPassthroughSubscriber.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACPassthroughSubscriber.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACQueueScheduler+Subclass.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACQueueScheduler+Subclass.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACQueueScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACQueueScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACReplaySubject.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACReplaySubject.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACReturnSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACReturnSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACScheduler+Private.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACScheduler+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACScheduler+Subclass.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACScheduler+Subclass.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACScopedDisposable.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACScopedDisposable.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACSerialDisposable.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSerialDisposable.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACSignal+Operations.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSignal+Operations.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACSignalSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSignalSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACStream+Private.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACStream+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACStream.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACStream.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACStringSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACStringSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACSubject.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSubject.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACSubscriber+Private.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSubscriber+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACSubscriber.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSubscriber.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACSubscriptingAssignmentTrampoline.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSubscriptingAssignmentTrampoline.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACSubscriptionScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSubscriptionScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACTargetQueueScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACTargetQueueScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACTestScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACTestScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACTuple.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACTuple.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACTupleSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACTupleSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACUnarySequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACUnarySequence.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACUnit.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACUnit.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACValueTransformer.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACValueTransformer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/RACmetamacros.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/extobjc/RACmetamacros.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/ReactiveObjC.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/ReactiveObjC.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIActionSheet+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIActionSheet+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIAlertView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIAlertView+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIBarButtonItem+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIBarButtonItem+RACCommandSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIButton+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIButton+RACCommandSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UICollectionReusableView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UICollectionReusableView+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIControl+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIControl+RACSignalSupportPrivate.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupportPrivate.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIDatePicker+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIDatePicker+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIGestureRecognizer+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIGestureRecognizer+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIImagePickerController+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIImagePickerController+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIRefreshControl+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIRefreshControl+RACCommandSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UISegmentedControl+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UISegmentedControl+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UISlider+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UISlider+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UIStepper+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIStepper+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UISwitch+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UISwitch+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UITableViewCell+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UITableViewCell+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UITableViewHeaderFooterView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UITableViewHeaderFooterView+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UITextField+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UITextField+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/ReactiveObjC/UITextView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UITextView+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/MKAnnotationView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/MKAnnotationView+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSArray+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSArray+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSData+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSData+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSDictionary+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSDictionary+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSEnumerator+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSEnumerator+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSFileHandle+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSFileHandle+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSIndexSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSIndexSet+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSInvocation+RACTypeParsing.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSInvocation+RACTypeParsing.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSNotificationCenter+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSNotificationCenter+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSObject+RACDeallocating.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACDeallocating.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSObject+RACDescription.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACDescription.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSObject+RACKVOWrapper.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACKVOWrapper.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSObject+RACLifting.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACLifting.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSObject+RACPropertySubscribing.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACPropertySubscribing.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSObject+RACSelectorSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSObject+RACSelectorSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSOrderedSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSOrderedSet+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSSet+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSString+RACKeyPathUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSString+RACKeyPathUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSString+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSString+RACSequenceAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSString+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSString+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSURLConnection+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSURLConnection+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/NSUserDefaults+RACSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/NSUserDefaults+RACSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACArraySequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACArraySequence.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACBehaviorSubject.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACBehaviorSubject.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACBlockTrampoline.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACBlockTrampoline.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACChannel.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACChannel.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACCommand.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACCommand.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACCompoundDisposable.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACCompoundDisposable.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACDelegateProxy.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACDelegateProxy.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACDisposable.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACDisposable.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACDynamicSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACDynamicSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACDynamicSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACDynamicSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACEXTKeyPathCoding.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/extobjc/RACEXTKeyPathCoding.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACEXTScope.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/extobjc/RACEXTScope.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACEagerSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACEagerSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACErrorSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACErrorSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACEvent.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACEvent.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACGroupedSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACGroupedSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACImmediateScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACImmediateScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACIndexSetSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACIndexSetSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACKVOChannel.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACKVOChannel.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACKVOProxy.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACKVOProxy.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACKVOTrampoline.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACKVOTrampoline.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACMulticastConnection.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACMulticastConnection.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACPassthroughSubscriber.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACPassthroughSubscriber.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACQueueScheduler+Subclass.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACQueueScheduler+Subclass.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACQueueScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACQueueScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACReplaySubject.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACReplaySubject.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACReturnSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACReturnSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACScheduler+Subclass.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACScheduler+Subclass.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACScopedDisposable.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACScopedDisposable.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACSerialDisposable.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSerialDisposable.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACSignal+Operations.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSignal+Operations.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACSignal.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSignal.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACSignalSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSignalSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACStream.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACStream.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACStringSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACStringSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACSubject.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSubject.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACSubscriber.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSubscriber.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACSubscriptingAssignmentTrampoline.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSubscriptingAssignmentTrampoline.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACSubscriptionScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACSubscriptionScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACTargetQueueScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACTargetQueueScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACTestScheduler.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACTestScheduler.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACTuple.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACTuple.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACTupleSequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACTupleSequence.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACUnarySequence.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACUnarySequence.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACUnit.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACUnit.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACValueTransformer.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/RACValueTransformer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/RACmetamacros.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/extobjc/RACmetamacros.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/ReactiveObjC.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/ReactiveObjC.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UIActionSheet+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIActionSheet+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UIAlertView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIAlertView+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UIBarButtonItem+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIBarButtonItem+RACCommandSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UIButton+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIButton+RACCommandSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UICollectionReusableView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UICollectionReusableView+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UIControl+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UIDatePicker+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIDatePicker+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UIGestureRecognizer+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIGestureRecognizer+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UIImagePickerController+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIImagePickerController+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UIRefreshControl+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIRefreshControl+RACCommandSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UISegmentedControl+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UISegmentedControl+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UISlider+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UISlider+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UIStepper+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UIStepper+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UISwitch+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UISwitch+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UITableViewCell+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UITableViewCell+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UITableViewHeaderFooterView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UITableViewHeaderFooterView+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UITextField+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UITextField+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ReactiveObjC/UITextView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | ../../../ReactiveObjC/ReactiveObjC/UITextView+RACSignalSupport.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Masonry (1.0.2) 3 | - ReactiveObjC (2.1.2) 4 | 5 | DEPENDENCIES: 6 | - Masonry 7 | - ReactiveObjC 8 | 9 | SPEC CHECKSUMS: 10 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e 11 | ReactiveObjC: 7b6782ae39f9ac0f57205c3b0c0b69b9dd7048c0 12 | 13 | PODFILE CHECKSUM: 4f6fb3c04b1616cb465d89f1977ab3b6a6de77da 14 | 15 | COCOAPODS: 1.1.1 16 | -------------------------------------------------------------------------------- /Pods/Masonry/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | /** 13 | * A group of MASConstraint objects 14 | */ 15 | @interface MASCompositeConstraint : MASConstraint 16 | 17 | /** 18 | * Creates a composite with a predefined array of children 19 | * 20 | * @param children child MASConstraints 21 | * 22 | * @return a composite constraint 23 | */ 24 | - (id)initWithChildren:(NSArray *)children; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * When you are debugging or printing the constraints attached to a view this subclass 13 | * makes it easier to identify which constraints have been created via Masonry 14 | */ 15 | @interface MASLayoutConstraint : NSLayoutConstraint 16 | 17 | /** 18 | * a key to associate with this constraint 19 | */ 20 | @property (nonatomic, strong) id mas_key; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASLayoutConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASLayoutConstraint.h" 10 | 11 | @implementation MASLayoutConstraint 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASAttribute.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * An immutable tuple which stores the view and the related NSLayoutAttribute. 13 | * Describes part of either the left or right hand side of a constraint equation 14 | */ 15 | @interface MASViewAttribute : NSObject 16 | 17 | /** 18 | * The view which the reciever relates to. Can be nil if item is not a view. 19 | */ 20 | @property (nonatomic, weak, readonly) MAS_VIEW *view; 21 | 22 | /** 23 | * The item which the reciever relates to. 24 | */ 25 | @property (nonatomic, weak, readonly) id item; 26 | 27 | /** 28 | * The attribute which the reciever relates to 29 | */ 30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; 31 | 32 | /** 33 | * Convenience initializer. 34 | */ 35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; 36 | 37 | /** 38 | * The designated initializer. 39 | */ 40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; 41 | 42 | /** 43 | * Determine whether the layoutAttribute is a size attribute 44 | * 45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight 46 | */ 47 | - (BOOL)isSizeAttribute; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewAttribute.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASAttribute.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | 11 | @implementation MASViewAttribute 12 | 13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { 14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; 15 | return self; 16 | } 17 | 18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { 19 | self = [super init]; 20 | if (!self) return nil; 21 | 22 | _view = view; 23 | _item = item; 24 | _layoutAttribute = layoutAttribute; 25 | 26 | return self; 27 | } 28 | 29 | - (BOOL)isSizeAttribute { 30 | return self.layoutAttribute == NSLayoutAttributeWidth 31 | || self.layoutAttribute == NSLayoutAttributeHeight; 32 | } 33 | 34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute { 35 | if ([viewAttribute isKindOfClass:self.class]) { 36 | return self.view == viewAttribute.view 37 | && self.layoutAttribute == viewAttribute.layoutAttribute; 38 | } 39 | return [super isEqual:viewAttribute]; 40 | } 41 | 42 | - (NSUInteger)hash { 43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | // 2 | // Masonry.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Masonry. 12 | FOUNDATION_EXPORT double MasonryVersionNumber; 13 | 14 | //! Project version string for Masonry. 15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; 16 | 17 | #import "MASUtilities.h" 18 | #import "View+MASAdditions.h" 19 | #import "View+MASShorthandAdditions.h" 20 | #import "ViewController+MASAdditions.h" 21 | #import "NSArray+MASAdditions.h" 22 | #import "NSArray+MASShorthandAdditions.h" 23 | #import "MASConstraint.h" 24 | #import "MASCompositeConstraint.h" 25 | #import "MASViewAttribute.h" 26 | #import "MASViewConstraint.h" 27 | #import "MASConstraintMaker.h" 28 | #import "MASLayoutConstraint.h" 29 | #import "NSLayoutConstraint+MASDebugAdditions.h" 30 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand array additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface NSArray (MASShorthandAdditions) 18 | 19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 22 | 23 | @end 24 | 25 | @implementation NSArray (MASShorthandAdditions) 26 | 27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 28 | return [self mas_makeConstraints:block]; 29 | } 30 | 31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 32 | return [self mas_updateConstraints:block]; 33 | } 34 | 35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 36 | return [self mas_remakeConstraints:block]; 37 | } 38 | 39 | @end 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * makes debug and log output of NSLayoutConstraints more readable 13 | */ 14 | @interface NSLayoutConstraint (MASDebugAdditions) 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | #ifdef MAS_VIEW_CONTROLLER 14 | 15 | @interface MAS_VIEW_CONTROLLER (MASAdditions) 16 | 17 | /** 18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute 19 | */ 20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom; 26 | 27 | 28 | @end 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/LICENSE.md: -------------------------------------------------------------------------------- 1 | **Copyright (c) 2012 - 2016, 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/ReactiveObjC/ReactiveObjC/MKAnnotationView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKAnnotationView+RACSignalSupport.h 3 | // ReactiveObjC 4 | // 5 | // Created by Zak Remer on 3/31/15. 6 | // Copyright (c) 2015 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class RACSignal<__covariant ValueType>; 13 | @class RACUnit; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @interface MKAnnotationView (RACSignalSupport) 18 | 19 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon 20 | /// the receiver. 21 | /// 22 | /// Examples 23 | /// 24 | /// [[[self.cancelButton 25 | /// rac_signalForControlEvents:UIControlEventTouchUpInside] 26 | /// takeUntil:self.rac_prepareForReuseSignal] 27 | /// subscribeNext:^(UIButton *x) { 28 | /// // do other things 29 | /// }]; 30 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/MKAnnotationView+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKAnnotationView+RACSignalSupport.m 3 | // ReactiveObjC 4 | // 5 | // Created by Zak Remer on 3/31/15. 6 | // Copyright (c) 2015 GitHub. All rights reserved. 7 | // 8 | 9 | #import "MKAnnotationView+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 MKAnnotationView (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", RACDescription(self)]; 26 | 27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 28 | return signal; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSArray+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+RACSequenceAdditions.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSArray<__covariant ObjectType> (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence corresponding to the receiver. 18 | /// 19 | /// Mutating the receiver will not affect the sequence after it's been created. 20 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSArray+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+RACSequenceAdditions.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/NSData+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+RACSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface NSData (RACSupport) 17 | 18 | // Read the data at the URL using -[NSData initWithContentsOfURL:options:error:]. 19 | // Sends the data or the error. 20 | // 21 | // scheduler - cannot be nil. 22 | + (RACSignal *)rac_readContentsOfURL:(nullable NSURL *)URL options:(NSDataReadingOptions)options scheduler:(RACScheduler *)scheduler; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSData+RACSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+RACSupport.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/NSDictionary+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+RACSequenceAdditions.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | @class RACTuple; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface NSDictionary<__covariant KeyType, __covariant ObjectType> (RACSequenceAdditions) 17 | 18 | /// Creates and returns a sequence of RACTuple key/value pairs. The key will be 19 | /// the first element in the tuple, and the value will be the second. 20 | /// 21 | /// Mutating the receiver will not affect the sequence after it's been created. 22 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 23 | 24 | /// Creates and returns a sequence corresponding to the keys in the receiver. 25 | /// 26 | /// Mutating the receiver will not affect the sequence after it's been created. 27 | @property (nonatomic, copy, readonly) RACSequence *rac_keySequence; 28 | 29 | /// Creates and returns a sequence corresponding to the values in the receiver. 30 | /// 31 | /// Mutating the receiver will not affect the sequence after it's been created. 32 | @property (nonatomic, copy, readonly) RACSequence *rac_valueSequence; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSDictionary+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+RACSequenceAdditions.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/NSEnumerator+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSEnumerator+RACSequenceAdditions.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSEnumerator (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence corresponding to the receiver. 18 | /// 19 | /// The receiver is exhausted lazily as the sequence is enumerated. 20 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSEnumerator+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSEnumerator+RACSequenceAdditions.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/NSFileHandle+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileHandle+RACSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSFileHandle (RACSupport) 16 | 17 | // Read any available data in the background and send it. Completes when data 18 | // length is <= 0. 19 | - (RACSignal *)rac_readInBackground; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSFileHandle+RACSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileHandle+RACSupport.m 3 | // ReactiveObjC 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", RACDescription(self)]; 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/ReactiveObjC/ReactiveObjC/NSIndexSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSIndexSet+RACSequenceAdditions.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSIndexSet (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence of indexes (as `NSNumber`s) corresponding to 18 | /// the receiver. 19 | /// 20 | /// Mutating the receiver will not affect the sequence after it's been created. 21 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSIndexSet+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSIndexSet+RACSequenceAdditions.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/NSNotificationCenter+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNotificationCenter+RACSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSNotificationCenter (RACSupport) 16 | 17 | // Sends the NSNotification every time the notification is posted. 18 | - (RACSignal *)rac_addObserverForName:(nullable NSString *)notificationName object:(nullable id)object; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSNotificationCenter+RACSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSNotificationCenter+RACSupport.m 3 | // ReactiveObjC 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 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/ReactiveObjC/ReactiveObjC/NSObject+RACDeallocating.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+RACDeallocating.h 3 | // ReactiveObjC 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<__covariant ValueType>; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @interface NSObject (RACDeallocating) 18 | 19 | /// The compound disposable which will be disposed of when the receiver is 20 | /// deallocated. 21 | @property (atomic, readonly, strong) RACCompoundDisposable *rac_deallocDisposable; 22 | 23 | /// Returns a signal that will complete immediately before the receiver is fully 24 | /// deallocated. If already deallocated when the signal is subscribed to, 25 | /// a `completed` event will be sent immediately. 26 | - (RACSignal *)rac_willDeallocSignal; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSObject+RACDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+RACDescription.h 3 | // ReactiveObjC 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 simplified description of the object, which does not invoke -description 12 | // (and thus should be much faster in many cases). 13 | // 14 | // This is for debugging purposes only, and will return a constant string 15 | // unless the RAC_DEBUG_SIGNAL_NAMES environment variable is set. 16 | NSString *RACDescription(id object); 17 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSObject+RACDescription.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+RACDescription.m 3 | // ReactiveObjC 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 NSValue (RACDescription) 13 | 14 | - (NSString *)rac_description { 15 | return self.description; 16 | } 17 | 18 | @end 19 | 20 | @implementation NSString (RACDescription) 21 | 22 | - (NSString *)rac_description { 23 | return self.description; 24 | } 25 | 26 | @end 27 | 28 | @implementation RACTuple (RACDescription) 29 | 30 | - (NSString *)rac_description { 31 | if (getenv("RAC_DEBUG_SIGNAL_NAMES") != NULL) { 32 | return self.allObjects.description; 33 | } else { 34 | return @"(description skipped)"; 35 | } 36 | } 37 | 38 | @end 39 | 40 | NSString *RACDescription(id object) { 41 | if (getenv("RAC_DEBUG_SIGNAL_NAMES") != NULL) { 42 | if ([object respondsToSelector:@selector(rac_description)]) { 43 | return [object rac_description]; 44 | } else { 45 | return [[NSString alloc] initWithFormat:@"<%@: %p>", [object class], object]; 46 | } 47 | } else { 48 | return @"(description skipped)"; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSOrderedSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSOrderedSet+RACSequenceAdditions.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSOrderedSet<__covariant ObjectType> (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence corresponding to the receiver. 18 | /// 19 | /// Mutating the receiver will not affect the sequence after it's been created. 20 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSOrderedSet+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSOrderedSet+RACSequenceAdditions.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/NSSet+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+RACSequenceAdditions.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSSet<__covariant ObjectType> (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence corresponding to the receiver. 18 | /// 19 | /// Mutating the receiver will not affect the sequence after it's been created. 20 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSSet+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+RACSequenceAdditions.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/NSString+RACKeyPathUtilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACKeyPathUtilities.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/NSString+RACKeyPathUtilities.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACKeyPathUtilities.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/NSString+RACSequenceAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACSequenceAdditions.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSString (RACSequenceAdditions) 16 | 17 | /// Creates and returns a sequence containing strings corresponding to each 18 | /// composed character sequence in the receiver. 19 | /// 20 | /// Mutating the receiver will not affect the sequence after it's been created. 21 | @property (nonatomic, copy, readonly) RACSequence *rac_sequence; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSString+RACSequenceAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACSequenceAdditions.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/NSString+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface NSString (RACSupport) 17 | 18 | // Reads in the contents of the file using +[NSString stringWithContentsOfURL:usedEncoding:error:]. 19 | // Note that encoding won't be valid until the signal completes successfully. 20 | // 21 | // scheduler - cannot be nil. 22 | + (RACSignal *)rac_readContentsOfURL:(NSURL *)URL usedEncoding:(NSStringEncoding *)encoding scheduler:(RACScheduler *)scheduler; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSString+RACSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RACSupport.m 3 | // ReactiveObjC 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(URL != nil); 17 | NSCParameterAssert(encoding != nil); 18 | NSCParameterAssert(scheduler != nil); 19 | 20 | RACReplaySubject *subject = [RACReplaySubject subject]; 21 | [subject setNameWithFormat:@"+rac_readContentsOfURL: %@ usedEncoding:scheduler: %@", URL, scheduler]; 22 | 23 | [scheduler schedule:^{ 24 | NSError *error = nil; 25 | NSString *string = [NSString stringWithContentsOfURL:URL usedEncoding:encoding error:&error]; 26 | if (string == nil) { 27 | [subject sendError:error]; 28 | } else { 29 | [subject sendNext:string]; 30 | [subject sendCompleted]; 31 | } 32 | }]; 33 | 34 | return subject; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSURLConnection+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLConnection+RACSupport.h 3 | // ReactiveObjC 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 RACTuple; 12 | @class RACSignal<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface NSURLConnection (RACSupport) 17 | 18 | // Lazily loads data for the given request in the background. 19 | // 20 | // request - The URL request to load. This must not be nil. 21 | // 22 | // Returns a signal which will begin loading the request upon each subscription, 23 | // then send a `RACTuple` of the received `NSURLResponse` and downloaded 24 | // `NSData`, and complete on a background thread. If any errors occur, the 25 | // returned signal will error out. 26 | + (RACSignal *)rac_sendAsynchronousRequest:(NSURLRequest *)request; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/NSUserDefaults+RACSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSUserDefaults+RACSupport.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSUserDefaults (RACSupport) 16 | 17 | /// Creates and returns a terminal for binding the user defaults key. 18 | /// 19 | /// **Note:** The value in the user defaults is *asynchronously* updated with 20 | /// values sent to the channel. 21 | /// 22 | /// key - The user defaults key to create the channel terminal for. 23 | /// 24 | /// Returns a channel terminal that sends the value of the user defaults key 25 | /// upon subscription, sends an updated value whenever the default changes, and 26 | /// updates the default asynchronously with values it receives. 27 | - (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key; 28 | 29 | @end 30 | 31 | NS_ASSUME_NONNULL_END 32 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACArraySequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACArraySequence.h 3 | // ReactiveObjC 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 | + (RACSequence *)sequenceWithArray:(NSArray *)array offset:(NSUInteger)offset; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACBehaviorSubject.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACBehaviorSubject.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A behavior subject sends the last value it received when it is subscribed to. 14 | @interface RACBehaviorSubject : RACSubject 15 | 16 | /// Creates a new behavior subject with a default value. If it hasn't received 17 | /// any values when it gets subscribed to, it sends the default value. 18 | + (instancetype)behaviorSubjectWithDefaultValue:(nullable id)value; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACBlockTrampoline.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACBlockTrampoline.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/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/ReactiveObjC/ReactiveObjC/RACDelegateProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACDelegateProxy.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | // A private delegate object suitable for using 16 | // -rac_signalForSelector:fromProtocol: upon. 17 | @interface RACDelegateProxy : NSObject 18 | 19 | // The delegate to which messages should be forwarded if not handled by 20 | // any -signalForSelector: applications. 21 | @property (nonatomic, unsafe_unretained) id rac_proxiedDelegate; 22 | 23 | // Creates a delegate proxy capable of responding to selectors from `protocol`. 24 | - (instancetype)initWithProtocol:(Protocol *)protocol; 25 | 26 | // Calls -rac_signalForSelector:fromProtocol: using the `protocol` specified 27 | // during initialization. 28 | - (RACSignal *)signalForSelector:(SEL)selector; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACDisposable.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACDisposable.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /// A disposable encapsulates the work necessary to tear down and cleanup a 16 | /// subscription. 17 | @interface RACDisposable : NSObject 18 | 19 | /// Whether the receiver has been disposed. 20 | /// 21 | /// Use of this property is discouraged, since it may be set to `YES` 22 | /// concurrently at any time. 23 | /// 24 | /// This property is not KVO-compliant. 25 | @property (atomic, assign, getter = isDisposed, readonly) BOOL disposed; 26 | 27 | + (instancetype)disposableWithBlock:(void (^)(void))block; 28 | 29 | /// Performs the disposal work. Can be called multiple times, though subsequent 30 | /// calls won't do anything. 31 | - (void)dispose; 32 | 33 | /// Returns a new disposable which will dispose of this disposable when it gets 34 | /// dealloc'd. 35 | - (RACScopedDisposable *)asScopedDisposable; 36 | 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACDynamicSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACDynamicSequence.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACDynamicSignal.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACDynamicSignal.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACEagerSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACEagerSequence.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACEmptySequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACEmptySequence.h 3 | // ReactiveObjC 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 | + (RACEmptySequence *)empty; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACEmptySignal.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACEmptySignal.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACErrorSignal.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACErrorSignal.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACErrorSignal.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACErrorSignal.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACGroupedSignal.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACGroupedSignal.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A grouped signal is used by -[RACSignal groupBy:transform:]. 14 | @interface RACGroupedSignal : RACSubject 15 | 16 | /// The key shared by the group. 17 | @property (nonatomic, readonly, copy) id key; 18 | 19 | + (instancetype)signalWithKey:(id)key; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACGroupedSignal.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACGroupedSignal.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACImmediateScheduler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACImmediateScheduler.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACIndexSetSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACIndexSetSequence.h 3 | // ReactiveObjC 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 | + (RACSequence *)sequenceWithIndexSet:(NSIndexSet *)indexSet; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACKVOProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACKVOProxy.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACKVOTrampoline.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACKVOTrampoline.h 3 | // ReactiveObjC 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 | - (instancetype)initWithTarget:(__weak NSObject *)target observer:(__weak NSObject *)observer keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options block:(RACKVOBlock)block; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACMulticastConnection+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACMulticastConnection+Private.h 3 | // ReactiveObjC 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 | - (instancetype)initWithSourceSignal:(RACSignal *)source subject:(RACSubject *)subject; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACPassthroughSubscriber.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACPassthroughSubscriber.h 3 | // ReactiveObjC 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<__covariant ValueType>; 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/ReactiveObjC/ReactiveObjC/RACQueueScheduler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACQueueScheduler.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// An abstract scheduler which asynchronously enqueues all its work to a Grand 14 | /// Central Dispatch queue. 15 | /// 16 | /// Because RACQueueScheduler is abstract, it should not be instantiated 17 | /// directly. Create a subclass using the `RACQueueScheduler+Subclass.h` 18 | /// interface and use that instead. 19 | @interface RACQueueScheduler : RACScheduler 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACReplaySubject.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACReplaySubject.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | extern const NSUInteger RACReplaySubjectUnlimitedCapacity; 14 | 15 | /// A replay subject saves the values it is sent (up to its defined capacity) 16 | /// and resends those to new subscribers. It will also replay an error or 17 | /// completion. 18 | @interface RACReplaySubject : RACSubject 19 | 20 | /// Creates a new replay subject with the given capacity. A capacity of 21 | /// RACReplaySubjectUnlimitedCapacity means values are never trimmed. 22 | + (instancetype)replaySubjectWithCapacity:(NSUInteger)capacity; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACReturnSignal.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACReturnSignal.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACScheduler+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACScheduler+Private.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | // The thread-specific current scheduler key. 14 | extern NSString * const RACSchedulerCurrentSchedulerKey; 15 | 16 | // A private interface for internal RAC use only. 17 | @interface RACScheduler () 18 | 19 | // A dedicated scheduler that fills two requirements: 20 | // 21 | // 1. By the time subscription happens, we need a valid +currentScheduler. 22 | // 2. Subscription should happen as soon as possible. 23 | // 24 | // To fulfill those two, if we already have a valid +currentScheduler, it 25 | // immediately executes scheduled blocks. If we don't, it will execute scheduled 26 | // blocks with a private background scheduler. 27 | + (instancetype)subscriptionScheduler; 28 | 29 | // Initializes the receiver with the given name. 30 | // 31 | // name - The name of the scheduler. If nil, a default name will be used. 32 | // 33 | // Returns the initialized object. 34 | - (instancetype)initWithName:(nullable NSString *)name; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACScheduler+Subclass.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACScheduler.m 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /// An interface for use by subclasses. 15 | /// 16 | /// Subclasses should use `-performAsCurrentScheduler:` to do the actual block 17 | /// invocation so that +[RACScheduler currentScheduler] behaves as expected. 18 | /// 19 | /// **Note that RACSchedulers are expected to be serial**. Subclasses must honor 20 | /// that contract. See `RACTargetQueueScheduler` for a queue-based scheduler 21 | /// which will enforce the serialization guarantee. 22 | @interface RACScheduler () 23 | 24 | /// Performs the given block with the receiver as the current scheduler for 25 | /// its thread. This should only be called by subclasses to perform their 26 | /// scheduled blocks. 27 | /// 28 | /// block - The block to execute. Cannot be NULL. 29 | - (void)performAsCurrentScheduler:(void (^)(void))block; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACScopedDisposable.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACScopedDisposable.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A disposable that calls its own -dispose when it is dealloc'd. 14 | @interface RACScopedDisposable : RACDisposable 15 | 16 | /// Creates a new scoped disposable that will also dispose of the given 17 | /// disposable when it is dealloc'd. 18 | + (instancetype)scopedDisposableWithDisposable:(RACDisposable *)disposable; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACScopedDisposable.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACScopedDisposable.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/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/ReactiveObjC/ReactiveObjC/RACSignalSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSignalSequence.h 3 | // ReactiveObjC 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<__covariant ValueType>; 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/ReactiveObjC/ReactiveObjC/RACStream+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACStream+Private.h 3 | // ReactiveObjC 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 | + (__kindof RACStream *)join:(id)streams block:(RACStream * (^)(id, id))block; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACStringSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACStringSequence.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACSubject.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubject.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /// A subject can be thought of as a signal that you can manually control by 15 | /// sending next, completed, and error. 16 | /// 17 | /// They're most helpful in bridging the non-RAC world to RAC, since they let you 18 | /// manually control the sending of events. 19 | @interface RACSubject : RACSignal 20 | 21 | /// Returns a new subject. 22 | + (instancetype)subject; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACSubscriber+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubscriber+Private.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACSubscriptingAssignmentTrampoline.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubscriptingAssignmentTrampoline.m 3 | // ReactiveObjC 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 | - (instancetype)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/ReactiveObjC/ReactiveObjC/RACSubscriptionScheduler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACSubscriptionScheduler.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | // A private scheduler used only for subscriptions. See the private 14 | // +[RACScheduler subscriptionScheduler] method for more information. 15 | @interface RACSubscriptionScheduler : RACScheduler 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACTargetQueueScheduler.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACTargetQueueScheduler.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A scheduler that enqueues blocks on a private serial queue, targeting an 14 | /// arbitrary GCD queue. 15 | @interface RACTargetQueueScheduler : RACQueueScheduler 16 | 17 | /// Initializes the receiver with a serial queue that will target the given 18 | /// `targetQueue`. 19 | /// 20 | /// name - The name of the scheduler. If nil, a default name will be used. 21 | /// targetQueue - The queue to target. Cannot be NULL. 22 | /// 23 | /// Returns the initialized object. 24 | - (instancetype)initWithName:(nullable NSString *)name targetQueue:(dispatch_queue_t)targetQueue; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACTargetQueueScheduler.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACTargetQueueScheduler.m 3 | // ReactiveObjC 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 "RACQueueScheduler+Subclass.h" 11 | 12 | @implementation RACTargetQueueScheduler 13 | 14 | #pragma mark Lifecycle 15 | 16 | - (instancetype)initWithName:(NSString *)name targetQueue:(dispatch_queue_t)targetQueue { 17 | NSCParameterAssert(targetQueue != NULL); 18 | 19 | if (name == nil) { 20 | name = [NSString stringWithFormat:@"org.reactivecocoa.ReactiveObjC.RACTargetQueueScheduler(%s)", dispatch_queue_get_label(targetQueue)]; 21 | } 22 | 23 | dispatch_queue_t queue = dispatch_queue_create(name.UTF8String, DISPATCH_QUEUE_SERIAL); 24 | if (queue == NULL) return nil; 25 | 26 | dispatch_set_target_queue(queue, targetQueue); 27 | 28 | return [super initWithName:name queue:queue]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACTupleSequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACTupleSequence.h 3 | // ReactiveObjC 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 | + (RACSequence *)sequenceWithTupleBackingArray:(NSArray *)backingArray offset:(NSUInteger)offset; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACUnarySequence.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACUnarySequence.h 3 | // ReactiveObjC 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 | + (RACUnarySequence *)return:(id)value; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACUnit.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A unit represents an empty value. 14 | /// 15 | /// It should never be necessary to create a unit yourself. Just use +defaultUnit. 16 | @interface RACUnit : NSObject 17 | 18 | /// A singleton instance. 19 | + (RACUnit *)defaultUnit; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/RACUnit.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACUnit.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACValueTransformer.h: -------------------------------------------------------------------------------- 1 | // 2 | // RACValueTransformer.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/RACValueTransformer.m: -------------------------------------------------------------------------------- 1 | // 2 | // RACValueTransformer.m 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/UIActionSheet+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIActionSheet+RACSignalSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface UIActionSheet (RACSignalSupport) 17 | 18 | /// A delegate proxy which will be set as the receiver's delegate when any of the 19 | /// methods in this category are used. 20 | @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; 21 | 22 | /// Creates a signal for button clicks on the receiver. 23 | /// 24 | /// When this method is invoked, the `rac_delegateProxy` will become the 25 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy 26 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't 27 | /// know how to handle. Setting the receiver's `delegate` afterward is 28 | /// considered undefined behavior. 29 | /// 30 | /// Returns a signal which will send the index of the specific button clicked. 31 | /// The signal will complete when the receiver is deallocated. 32 | - (RACSignal *)rac_buttonClickedSignal; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UIBarButtonItem+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItem+RACCommandSupport.h 3 | // ReactiveObjC 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<__contravariant InputType, __covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIBarButtonItem (RACCommandSupport) 16 | 17 | /// Sets the control's command. When the control is clicked, the command is 18 | /// executed with the sender of the event. The control's enabledness is bound 19 | /// to the command's `canExecute`. 20 | /// 21 | /// Note: this will reset the control's target and action. 22 | @property (nonatomic, strong, nullable) RACCommand<__kindof UIBarButtonItem *, id> *rac_command; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UIButton+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+RACCommandSupport.h 3 | // ReactiveObjC 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<__contravariant InputType, __covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIButton (RACCommandSupport) 16 | 17 | /// Sets the button's command. When the button is clicked, the command is 18 | /// executed with the sender of the event. The button's enabledness is bound 19 | /// to the command's `canExecute`. 20 | @property (nonatomic, strong, nullable) RACCommand<__kindof UIButton *, id> *rac_command; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UICollectionReusableView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionReusableView+RACSignalSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | @class RACUnit; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | // This category is only applicable to iOS >= 6.0. 17 | @interface UICollectionReusableView (RACSignalSupport) 18 | 19 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon 20 | /// the receiver. 21 | /// 22 | /// Examples 23 | /// 24 | /// [[[self.cancelButton 25 | /// rac_signalForControlEvents:UIControlEventTouchUpInside] 26 | /// takeUntil:self.rac_prepareForReuseSignal] 27 | /// subscribeNext:^(UIButton *x) { 28 | /// // do other things 29 | /// }]; 30 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UICollectionReusableView+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionReusableView+RACSignalSupport.m 3 | // ReactiveObjC 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", RACDescription(self)]; 26 | 27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 28 | return signal; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+RACSignalSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIControl (RACSignalSupport) 16 | 17 | /// Creates and returns a signal that sends the sender of the control event 18 | /// whenever one of the control events is triggered. 19 | - (RACSignal<__kindof UIControl *> *)rac_signalForControlEvents:(UIControlEvents)controlEvents; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupportPrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+RACSignalSupportPrivate.h 3 | // ReactiveObjC 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/ReactiveObjC/ReactiveObjC/UIDatePicker+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDatePicker+RACSignalSupport.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIDatePicker (RACSignalSupport) 16 | 17 | /// Creates a new RACChannel-based binding to the receiver. 18 | /// 19 | /// nilValue - The date to set when the terminal receives `nil`. 20 | /// 21 | /// Returns a RACChannelTerminal that sends the receiver's date whenever the 22 | /// UIControlEventValueChanged control event is fired, and sets the date to the 23 | /// values it receives. 24 | - (RACChannelTerminal *)rac_newDateChannelWithNilValue:(nullable NSDate *)nilValue; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UIDatePicker+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIDatePicker+RACSignalSupport.m 3 | // ReactiveObjC 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 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/ReactiveObjC/ReactiveObjC/UIGestureRecognizer+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIGestureRecognizer+RACSignalSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIGestureRecognizer (RACSignalSupport) 16 | 17 | /// Returns a signal that sends the receiver when its gesture occurs. 18 | - (RACSignal<__kindof UIGestureRecognizer *> *)rac_gestureSignal; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UIGestureRecognizer+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIGestureRecognizer+RACSignalSupport.m 3 | // ReactiveObjC 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 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", RACDescription(self)]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UIRefreshControl+RACCommandSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIRefreshControl+RACCommandSupport.h 3 | // ReactiveObjC 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<__contravariant InputType, __covariant ValueType>; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIRefreshControl (RACCommandSupport) 16 | 17 | /// Manipulate the RACCommand property associated with this refresh control. 18 | /// 19 | /// When this refresh control is activated by the user, the command will be 20 | /// executed. Upon completion or error of the execution signal, -endRefreshing 21 | /// will be invoked. 22 | @property (nonatomic, strong, nullable) RACCommand<__kindof UIRefreshControl *, id> *rac_command; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UISegmentedControl+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISegmentedControl+RACSignalSupport.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UISegmentedControl (RACSignalSupport) 16 | 17 | /// Creates a new RACChannel-based binding to the receiver. 18 | /// 19 | /// nilValue - The segment to select when the terminal receives `nil`. 20 | /// 21 | /// Returns a RACChannelTerminal that sends the receiver's currently selected 22 | /// segment's index whenever the UIControlEventValueChanged control event is 23 | /// fired, and sets the selected segment index to the values it receives. 24 | - (RACChannelTerminal *)rac_newSelectedSegmentIndexChannelWithNilValue:(nullable NSNumber *)nilValue; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UISegmentedControl+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UISegmentedControl+RACSignalSupport.m 3 | // ReactiveObjC 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 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/ReactiveObjC/ReactiveObjC/UISlider+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISlider+RACSignalSupport.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UISlider (RACSignalSupport) 16 | 17 | /// Creates a new RACChannel-based binding to the receiver. 18 | /// 19 | /// nilValue - The value to set when the terminal receives `nil`. 20 | /// 21 | /// Returns a RACChannelTerminal that sends the receiver's value whenever the 22 | /// UIControlEventValueChanged control event is fired, and sets the value to the 23 | /// values it receives. 24 | - (RACChannelTerminal *)rac_newValueChannelWithNilValue:(nullable NSNumber *)nilValue; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UISlider+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UISlider+RACSignalSupport.m 3 | // ReactiveObjC 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 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/ReactiveObjC/ReactiveObjC/UIStepper+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIStepper+RACSignalSupport.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIStepper (RACSignalSupport) 16 | 17 | /// Creates a new RACChannel-based binding to the receiver. 18 | /// 19 | /// nilValue - The value to set when the terminal receives `nil`. 20 | /// 21 | /// Returns a RACChannelTerminal that sends the receiver's value whenever the 22 | /// UIControlEventValueChanged control event is fired, and sets the value to the 23 | /// values it receives. 24 | - (RACChannelTerminal *)rac_newValueChannelWithNilValue:(nullable NSNumber *)nilValue; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UIStepper+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIStepper+RACSignalSupport.m 3 | // ReactiveObjC 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 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/ReactiveObjC/ReactiveObjC/UISwitch+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISwitch+RACSignalSupport.h 3 | // ReactiveObjC 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 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UISwitch (RACSignalSupport) 16 | 17 | /// Creates a new RACChannel-based binding to the receiver. 18 | /// 19 | /// Returns a RACChannelTerminal that sends whether the receiver is on whenever 20 | /// the UIControlEventValueChanged control event is fired, and sets it on or off 21 | /// when it receives @YES or @NO respectively. 22 | - (RACChannelTerminal *)rac_newOnChannel; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UISwitch+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UISwitch+RACSignalSupport.m 3 | // ReactiveObjC 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 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/ReactiveObjC/ReactiveObjC/UITableViewCell+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell+RACSignalSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | @class RACUnit; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface UITableViewCell (RACSignalSupport) 17 | 18 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon 19 | /// the receiver. 20 | /// 21 | /// Examples 22 | /// 23 | /// [[[self.cancelButton 24 | /// rac_signalForControlEvents:UIControlEventTouchUpInside] 25 | /// takeUntil:self.rac_prepareForReuseSignal] 26 | /// subscribeNext:^(UIButton *x) { 27 | /// // do other things 28 | /// }]; 29 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UITableViewCell+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell+RACSignalSupport.m 3 | // ReactiveObjC 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", RACDescription(self)]; 26 | 27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 28 | return signal; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UITableViewHeaderFooterView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewHeaderFooterView+RACSignalSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 12 | @class RACUnit; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | // This category is only applicable to iOS >= 6.0. 17 | @interface UITableViewHeaderFooterView (RACSignalSupport) 18 | 19 | /// A signal which will send a RACUnit whenever -prepareForReuse is invoked upon 20 | /// the receiver. 21 | /// 22 | /// Examples 23 | /// 24 | /// [[[self.cancelButton 25 | /// rac_signalForControlEvents:UIControlEventTouchUpInside] 26 | /// takeUntil:self.rac_prepareForReuseSignal] 27 | /// subscribeNext:^(UIButton *x) { 28 | /// // do other things 29 | /// }]; 30 | @property (nonatomic, strong, readonly) RACSignal *rac_prepareForReuseSignal; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UITableViewHeaderFooterView+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewHeaderFooterView+RACSignalSupport.m 3 | // ReactiveObjC 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", RACDescription(self)]; 26 | 27 | objc_setAssociatedObject(self, _cmd, signal, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 28 | return signal; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UITextField+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+RACSignalSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface UITextField (RACSignalSupport) 17 | 18 | /// Creates and returns a signal for the text of the field. It always starts with 19 | /// the current text. The signal sends next when the UIControlEventAllEditingEvents 20 | /// control event is fired on the control. 21 | - (RACSignal *)rac_textSignal; 22 | 23 | /// Creates a new RACChannel-based binding to the receiver. 24 | /// 25 | /// Returns a RACChannelTerminal that sends the receiver's text whenever the 26 | /// UIControlEventAllEditingEvents control event is fired, and sets the text 27 | /// to the values it receives. 28 | - (RACChannelTerminal *)rac_newTextChannel; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UITextField+RACSignalSupport.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+RACSignalSupport.m 3 | // ReactiveObjC 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 11 | #import 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:UIControlEventAllEditingEvents]] 28 | map:^(UITextField *x) { 29 | return x.text; 30 | }] 31 | takeUntil:self.rac_willDeallocSignal] 32 | setNameWithFormat:@"%@ -rac_textSignal", RACDescription(self)]; 33 | } 34 | 35 | - (RACChannelTerminal *)rac_newTextChannel { 36 | return [self rac_channelForControlEvents:UIControlEventAllEditingEvents key:@keypath(self.text) nilValue:@""]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/ReactiveObjC/ReactiveObjC/UITextView+RACSignalSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextView+RACSignalSupport.h 3 | // ReactiveObjC 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<__covariant ValueType>; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface UITextView (RACSignalSupport) 17 | 18 | /// A delegate proxy which will be set as the receiver's delegate when any of the 19 | /// methods in this category are used. 20 | @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; 21 | 22 | /// Creates a signal for the text of the receiver. 23 | /// 24 | /// When this method is invoked, the `rac_delegateProxy` will become the 25 | /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy 26 | /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't 27 | /// know how to handle. Setting the receiver's `delegate` afterward is 28 | /// considered undefined behavior. 29 | /// 30 | /// Returns a signal which will send the current text upon subscription, then 31 | /// again whenever the receiver's text is changed. The signal will complete when 32 | /// the receiver is deallocated. 33 | - (RACSignal *)rac_textSignal; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Masonry : NSObject 3 | @end 4 | @implementation PodsDummy_Masonry 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Masonry 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/ReactiveObjC" 4 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-YasicMetalDemo/Pods-YasicMetalDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_YasicMetalDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_YasicMetalDemo 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-YasicMetalDemo/Pods-YasicMetalDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/ReactiveObjC" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/ReactiveObjC" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Masonry" -l"ReactiveObjC" -framework "Foundation" -framework "UIKit" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-YasicMetalDemo/Pods-YasicMetalDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/ReactiveObjC" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" "$PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/ReactiveObjC" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Masonry" -l"ReactiveObjC" -framework "Foundation" -framework "UIKit" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ReactiveObjC/ReactiveObjC-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ReactiveObjC : NSObject 3 | @end 4 | @implementation PodsDummy_ReactiveObjC 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ReactiveObjC/ReactiveObjC-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ReactiveObjC/ReactiveObjC.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ReactiveObjC 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ReactiveObjC" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/ReactiveObjC" 4 | OTHER_LDFLAGS = -framework "Foundation" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /YasicMetalDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /YasicMetalDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /YasicMetalDemo.xcodeproj/project.xcworkspace/xcuserdata/yasic.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo.xcodeproj/project.xcworkspace/xcuserdata/yasic.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /YasicMetalDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /YasicMetalDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/9/26. 6 | // Copyright © 2018年 yasic. 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 | -------------------------------------------------------------------------------- /YasicMetalDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/9/26. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 20 | [self.window setBackgroundColor:[UIColor whiteColor]]; 21 | ViewController *vc = [[ViewController alloc] init]; 22 | UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc]; 23 | [self.window setRootViewController:nav]; 24 | [self.window makeKeyAndVisible]; 25 | return YES; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/CubeImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "IMG_4946.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/CubeImage.imageset/IMG_4946.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/CubeImage.imageset/IMG_4946.jpg -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/DogLogo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "DogLogo.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/DogLogo.imageset/DogLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/DogLogo.imageset/DogLogo.png -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/FilterTargetImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "FilterTargetImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/FilterTargetImage.imageset/FilterTargetImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/FilterTargetImage.imageset/FilterTargetImage.png -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_000.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "lookup_000.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_000.imageset/lookup_000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/lookup_000.imageset/lookup_000.png -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_001.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "lookup_001.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_001.imageset/lookup_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/lookup_001.imageset/lookup_001.png -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_002.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "lookup_002.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_002.imageset/lookup_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/lookup_002.imageset/lookup_002.png -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_003.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "lookup_003.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_003.imageset/lookup_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/lookup_003.imageset/lookup_003.png -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_004.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "lookup_004.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_004.imageset/lookup_004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/lookup_004.imageset/lookup_004.png -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_005.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "lookup_005.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_005.imageset/lookup_005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/lookup_005.imageset/lookup_005.png -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_006.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "lookup_006.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lookup_006.imageset/lookup_006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/lookup_006.imageset/lookup_006.png -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lut_abao.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "lut_abao.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/lut_abao.imageset/lut_abao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/lut_abao.imageset/lut_abao.png -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/qrcode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "qrcode.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /YasicMetalDemo/Assets.xcassets/qrcode.imageset/qrcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Assets.xcassets/qrcode.imageset/qrcode.jpg -------------------------------------------------------------------------------- /YasicMetalDemo/CAMetalLayerPage/CAMetalLayerPage.h: -------------------------------------------------------------------------------- 1 | // 2 | // CAMetalLayerPage.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/1. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface CAMetalLayerPage : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /YasicMetalDemo/CAMetalLayerPage/CustomMetalView.h: -------------------------------------------------------------------------------- 1 | // 2 | // CustomMetalView.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/1. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface CustomMetalView : UIView 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /YasicMetalDemo/Compute/YMDComputeKernelPage.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMDComputeKernelPage.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/10/26. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | @interface YMDComputeKernelPage : UIViewController 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Basic/Pipeline/YMPipeline.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMImageSource.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/4. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "YMTexture.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @protocol YMImageOutput; 15 | 16 | @protocol YMImageInput 17 | 18 | @property (nonatomic, strong) id imageOutput; 19 | 20 | /** 21 | 更新输出端纹理 22 | 23 | @param texture 传递纹理 24 | */ 25 | - (void)updateOutputWithTexture:(YMTexture *)texture; 26 | 27 | @end 28 | 29 | @protocol YMImageOutput 30 | 31 | /** 32 | 接收源纹理,加载到output的0下标纹理 33 | 34 | @param texture 待接收的纹理 35 | */ 36 | - (void)recieveOriginalTexture:(YMTexture *)texture; 37 | 38 | /** 39 | 收到输入端纹理 40 | 41 | @param texture 纹理接收 42 | @param index 输出到poutput的对应下标纹理 43 | */ 44 | - (void)recieveTexture:(YMTexture *)texture atIndex:(NSInteger)index; 45 | 46 | @end 47 | 48 | @protocol YMImageProcessingOperation 49 | 50 | @end 51 | 52 | NS_ASSUME_NONNULL_END 53 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Basic/Pipeline/YMStandardShaderFunctions.metal: -------------------------------------------------------------------------------- 1 | // 2 | // YMStandardShaderFunctions.metal 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/4. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #include 10 | #import "YMMetalDefine.h" 11 | using namespace metal; 12 | 13 | vertex YMStandardSingleInputVertexIO standardSingleInputVertex(device packed_float4 *position [[buffer(0)]], 14 | device packed_float2 *texturecoord [[buffer(1)]], uint vid [[vertex_id]]) 15 | { 16 | YMStandardSingleInputVertexIO output; 17 | output.position = float4(position[vid]); 18 | output.textureCoordinate = texturecoord[vid]; 19 | return output; 20 | } 21 | 22 | fragment half4 standardFragment(YMStandardSingleInputVertexIO fragmentInput [[stage_in]], 23 | texture2d inputTexture [[texture(0)]]) 24 | { 25 | constexpr sampler quadSampler; 26 | half4 color = inputTexture.sample(quadSampler, fragmentInput.textureCoordinate); 27 | 28 | return color; 29 | } 30 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Basic/YMBasicTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMBasicTool.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/9. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "YMTexture.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | typedef NS_ENUM(NSUInteger, YMBasicToolFillMode) { 16 | YMBasicToolFillModeDefault, // 默认模式,拉伸铺满 17 | YMBasicToolFillModeAspectFit, // 等比例完全展示 18 | YMBasicToolFillModeAspectFill, // 等比例铺满 19 | }; 20 | 21 | @interface YMBasicTool : NSObject 22 | 23 | + (CGImageRef)transformTextureToImage:(id)targetTexture; 24 | 25 | /** 26 | 将图片转化成特定尺寸 27 | 28 | @param targetSize 目标尺寸 29 | @param fillMode 展示模式,fit or fill 30 | @return 返回转化后的图片 31 | */ 32 | + (UIImage *)scaleImage:(UIImage *)image toSize:(CGSize)targetSize scalingMode:(YMBasicToolFillMode)fillMode; 33 | 34 | /** 35 | 将CGImage转化为CVPixelBuffer 36 | 37 | @param image 图片对象 38 | @param bufferSize 转化尺寸 39 | @return 返回CVPixelBuffer 40 | */ 41 | + (CVPixelBufferRef)pixelBufferWithImage:(CGImageRef)image size:(CGSize)bufferSize; 42 | 43 | /** 44 | 由CVPixelBuffer获得CGImage 45 | 46 | @param pixelBuffer CVPixelBuffer 对象 47 | @return cgimage 对象 48 | */ 49 | + (CGImageRef)imageFromCVPixelBuffer:(CVPixelBufferRef)pixelBuffer; 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Basic/YMConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMConstants.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/3. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "YMMetalContext.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | #define standardSingleInputVertex @"standardSingleInputVertex" 15 | #define standardFragment @"standardFragment" 16 | 17 | // 标准顶点坐标数组 18 | FOUNDATION_EXPORT const float kStandardVertexs[]; 19 | FOUNDATION_EXPORT const int kStandardVertexsLength; 20 | FOUNDATION_EXPORT const int kStandardVertexsComponentCount; 21 | 22 | // 标准顶点索引数组 23 | FOUNDATION_EXPORT const uint16_t kStandardIndices[]; 24 | FOUNDATION_EXPORT const int kStandardIndicesCount; 25 | 26 | // 标准纹理坐标数组 27 | FOUNDATION_EXPORT const float kStandardTextureCoordinates[]; 28 | FOUNDATION_EXPORT const int kStandardTextureCoordinatesLength; 29 | FOUNDATION_EXPORT const int kStandardTextureCoordinatesComponentCount; 30 | 31 | // 纹理输入个数 32 | typedef NS_ENUM(NSUInteger, YMTextureInputCount) { 33 | YMTextureInputCountOne = 1, 34 | YMTextureInputCountTwo = 2 35 | }; 36 | 37 | @interface YMConstants : NSObject 38 | 39 | /** 40 | 清屏色值 41 | */ 42 | @property (nonatomic, assign, class) MTLClearColor clearColor; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Basic/YMConstants.m: -------------------------------------------------------------------------------- 1 | // 2 | // YMConstants.m 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/3. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMConstants.h" 10 | 11 | // 标准顶点坐标数组 12 | const float kStandardVertexs[] = { 13 | // 左下角 0 14 | -1.0, -1.0, 0.0, 1.0, 15 | // 左上角 1 16 | -1.0, 1.0, 0.0, 1.0, 17 | // 右下角 2 18 | 1.0, -1.0, 0.0, 1.0, 19 | // 右上角 3 20 | 1.0, 1.0, 0.0, 1.0 21 | }; 22 | 23 | const int kStandardVertexsLength = 16; 24 | const int kStandardVertexsComponentCount = 4; 25 | 26 | // 顶点索引,Metal 按照此索引查询顶点数组对应下标,作为三角图元顶点 27 | const uint16_t kStandardIndices[] = { 28 | 0, 1, 2, 1, 3, 2 29 | }; 30 | 31 | const int kStandardIndicesLength = 6; 32 | 33 | // 标准纹理坐标数组 34 | const float kStandardTextureCoordinates[] = { 35 | 0.0, 1.0, // 左下 36 | 0.0, 0.0, // 左上 37 | 1.0, 1.0, // 右下 38 | 1.0, 0.0 // 右上 39 | }; 40 | 41 | const int kStandardTextureCoordinatesLength = 8; 42 | const int kStandardTextureCoordinatesComponentCount = 2; 43 | 44 | @implementation YMConstants 45 | 46 | + (void)setClearColor:(MTLClearColor)clearColor 47 | {} 48 | 49 | + (MTLClearColor)clearColor 50 | { 51 | return MTLClearColorMake(51.0/255.0, 153.0/255.0, 1.0, 1.0); 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Basic/YMMetalContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMMetalContext.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/3. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "YMConstants.h" 12 | #import "YMTexture.h" 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface YMMetalContext : NSObject 17 | 18 | @property (nonatomic, strong) id device; 19 | @property (nonatomic, strong) id commandQueue; 20 | @property (nonatomic, strong) id defaultLibrary; 21 | @property (nonatomic, strong) MTKTextureLoader *textureLoader; 22 | 23 | /** 24 | 推荐使用 25 | 26 | @return 返回全局的 Metal 上下文 27 | */ 28 | + (YMMetalContext *)shareContext; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Basic/YMMetalContext.m: -------------------------------------------------------------------------------- 1 | // 2 | // YMMetalContext.m 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/3. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMMetalContext.h" 10 | #import "YMPipeline.h" 11 | 12 | static YMMetalContext * context = nil; 13 | 14 | @implementation YMMetalContext 15 | 16 | + (YMMetalContext *)shareContext 17 | { 18 | static dispatch_once_t onceToken; 19 | dispatch_once(&onceToken, ^{ 20 | context = [[YMMetalContext alloc] init]; 21 | }); 22 | return context; 23 | } 24 | 25 | - (instancetype)init 26 | { 27 | self = [super init]; 28 | if (self){ 29 | self.device = MTLCreateSystemDefaultDevice(); 30 | self.commandQueue = [self.device newCommandQueue]; 31 | self.defaultLibrary = [self.device newDefaultLibrary]; 32 | self.textureLoader = [[MTKTextureLoader alloc] initWithDevice:self.device]; 33 | } 34 | return self; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Basic/YMTexture.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMTexture.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/3. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface YMTexture : NSObject 15 | 16 | @property (nonatomic, strong) id texture; 17 | 18 | /** 19 | 初始化方法 20 | 21 | @param texture 传入texture 22 | @return 返回实例 23 | */ 24 | - (instancetype)initWithTexture:(id)texture; 25 | 26 | /** 27 | 初始化一个空texture 28 | 29 | @param width texture 宽度 30 | @param height texture 高度 31 | @return 返回实例 32 | */ 33 | - (instancetype)initWithWidth:(NSUInteger)width height:(NSUInteger)height; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Basic/YMTexture.m: -------------------------------------------------------------------------------- 1 | // 2 | // YMTexture.m 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/3. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMTexture.h" 10 | #import "YMMetalContext.h" 11 | 12 | @interface YMTexture() 13 | 14 | @end 15 | 16 | @implementation YMTexture 17 | 18 | - (instancetype)initWithTexture:(id)texture 19 | { 20 | self = [self init]; 21 | if (self){ 22 | self.texture = texture; 23 | } 24 | return self; 25 | } 26 | 27 | - (instancetype)initWithWidth:(NSUInteger)width height:(NSUInteger)height 28 | { 29 | self = [self init]; 30 | if (self) { 31 | MTLTextureDescriptor *textureDesc = [MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatBGRA8Unorm width:width height:height mipmapped:NO]; 32 | textureDesc.usage = MTLTextureUsageRenderTarget|MTLTextureUsageShaderWrite|MTLTextureUsageShaderRead; 33 | self.texture = [[YMMetalContext shareContext].device newTextureWithDescriptor:textureDesc]; 34 | } 35 | return self; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Inputs/YMTextureInput.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMTextureInput.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/9. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "YMPipeline.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface YMTextureInput : NSObject 15 | 16 | @property (nonatomic, strong) id imageOutput; 17 | 18 | - (instancetype)initWithUIImage:(UIImage *)image; 19 | 20 | - (instancetype)initWithCGImage:(CGImageRef)cgImage; 21 | 22 | - (void)updateUIImage:(UIImage *)image; 23 | 24 | - (void)updateCGImage:(CGImageRef)cgImage; 25 | 26 | - (void)processTexture; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMBrightnessOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMBrightnessOperation.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMBasicOperation.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface YMBrightnessOperation : YMBasicOperation 14 | 15 | /** 16 | 亮度 17 | */ 18 | @property (nonatomic, assign) float brightness; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMBrightnessOperation.m: -------------------------------------------------------------------------------- 1 | // 2 | // YMBrightnessOperation.m 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMBrightnessOperation.h" 10 | 11 | @implementation YMBrightnessOperation 12 | 13 | - (instancetype)init 14 | { 15 | self = [self initWithVertexFunction:standardSingleInputVertex fragmentFunction:@"" maxInputCount:1]; 16 | return self; 17 | } 18 | 19 | - (instancetype)initWithVertexFunction:(NSString *)vertexFunc fragmentFunction:(NSString *)fragmentFunc maxInputCount:(NSInteger)maxInputCount 20 | { 21 | self = [super initWithVertexFunction:standardSingleInputVertex fragmentFunction:@"standardBrightnessFragment" maxInputCount:1]; 22 | self.brightness = 0.0; 23 | return self; 24 | } 25 | 26 | - (void)setBrightness:(float)brightness 27 | { 28 | brightness = brightness < -1 ? -1 : brightness; 29 | brightness = brightness > 1 ? 1 : brightness; 30 | _brightness = brightness; 31 | id vertexBuffer = [[YMMetalContext shareContext].device newBufferWithBytes:&brightness length:sizeof(float) options:0]; 32 | self.inputFragmentBuffers = [@[vertexBuffer] mutableCopy]; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMBrightnessShader.metal: -------------------------------------------------------------------------------- 1 | // 2 | // YMBrightnessShader.metal 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #include 10 | #import "YMMetalDefine.h" 11 | using namespace metal; 12 | 13 | fragment half4 standardBrightnessFragment(YMStandardSingleInputVertexIO fragmentInput [[stage_in]], 14 | texture2d originalTexture [[texture(0)]], 15 | constant float &brightness [[buffer(0)]] 16 | ) 17 | { 18 | constexpr sampler quadSampler; 19 | half4 color = originalTexture.sample(quadSampler, fragmentInput.textureCoordinate); 20 | return half4(color.rgb + brightness, color.a); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMLUTFilterOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMLUTFilterOperation.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/9. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | // LUT 滤镜操作 9 | 10 | #import "YMBasicOperation.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface YMLUTFilterOperation : YMBasicOperation 15 | 16 | @property (nonatomic, assign) float intensity; 17 | 18 | - (instancetype)initWithLUTImage:(UIImage *)lutImage; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMMetalDefine.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMMetalDefine.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #ifndef YMMetalDefine_h 10 | #define YMMetalDefine_h 11 | 12 | using namespace metal; 13 | 14 | struct YMStandardSingleInputVertexIO 15 | { 16 | float4 position [[position]]; 17 | float2 textureCoordinate [[user(texturecoord)]]; 18 | }; 19 | 20 | constant half3 luminanceWeighting = half3(0.2125, 0.7154, 0.0721); 21 | 22 | #endif /* YMMetalDefine_h */ 23 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMSaturationOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMSaturationOperation.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMBasicOperation.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface YMSaturationOperation : YMBasicOperation 14 | 15 | /** 16 | 饱和度值 17 | */ 18 | @property (nonatomic, assign) float saturation; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMSaturationOperation.m: -------------------------------------------------------------------------------- 1 | // 2 | // YMSaturationOperation.m 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMSaturationOperation.h" 10 | #import "YMMetalContext.h" 11 | 12 | @implementation YMSaturationOperation 13 | 14 | - (instancetype)init 15 | { 16 | self = [self initWithVertexFunction:standardSingleInputVertex fragmentFunction:@"standardSaturationFragment" maxInputCount:1]; 17 | return self; 18 | } 19 | 20 | - (instancetype)initWithVertexFunction:(NSString *)vertexFunc fragmentFunction:(NSString *)fragmentFunc maxInputCount:(NSInteger)maxInputCount 21 | { 22 | self = [super initWithVertexFunction:standardSingleInputVertex fragmentFunction:@"standardSaturationFragment" maxInputCount:1]; 23 | self.saturation = 1.0; 24 | return self; 25 | } 26 | 27 | - (void)setSaturation:(float)saturation 28 | { 29 | saturation = saturation < 0 ? 0 : saturation; 30 | saturation = saturation > 2 ? 2 : saturation; 31 | _saturation = saturation; 32 | id vertexBuffer = [[YMMetalContext shareContext].device newBufferWithBytes:&saturation length:sizeof(float) options:0]; 33 | self.inputFragmentBuffers = [@[vertexBuffer] mutableCopy]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMSaturationShader.metal: -------------------------------------------------------------------------------- 1 | // 2 | // YMSaturationShader.metal 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #include 10 | #import "YMMetalDefine.h" 11 | using namespace metal; 12 | 13 | fragment half4 standardSaturationFragment(YMStandardSingleInputVertexIO fragmentInput [[stage_in]], 14 | texture2d originalTexture [[texture(0)]], 15 | constant float &saturation [[buffer(0)]] 16 | ) 17 | { 18 | constexpr sampler quadSampler; 19 | half4 color = originalTexture.sample(quadSampler, fragmentInput.textureCoordinate); 20 | // 获得当前点的亮度 21 | half luminance = dot(color.rgb, luminanceWeighting); 22 | // 进行亮度调节 23 | return half4(mix(half3(luminance), color.rgb, half(saturation)), color.a); 24 | } 25 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMStylizeOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMStylizeOperation.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/12. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMBasicOperation.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface YMStylizeOperation : YMBasicOperation 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMToonOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMToonOperation.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMBasicOperation.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface YMToonOperation : YMBasicOperation 14 | 15 | /** 16 | 梯度阈值,越小描边越明显 17 | */ 18 | @property (nonatomic, assign) float magTol; 19 | 20 | /** 21 | 量化级别,越小颜色数量越少 22 | */ 23 | @property (nonatomic, assign) float quantize; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMToonOperation.m: -------------------------------------------------------------------------------- 1 | // 2 | // YMToonOperation.m 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMToonOperation.h" 10 | 11 | @implementation YMToonOperation 12 | 13 | - (instancetype)init 14 | { 15 | self = [self initWithVertexFunction:standardSingleInputVertex fragmentFunction:@"" maxInputCount:1]; 16 | return self; 17 | } 18 | 19 | - (instancetype)initWithVertexFunction:(NSString *)vertexFunc fragmentFunction:(NSString *)fragmentFunc maxInputCount:(NSInteger)maxInputCount 20 | { 21 | self = [super initWithVertexFunction:standardSingleInputVertex fragmentFunction:@"standardToonFragment" maxInputCount:1]; 22 | self.magTol = 1.0; 23 | self.quantize = 20.0; 24 | return self; 25 | } 26 | 27 | - (void)recieveTexture:(YMTexture *)texture atIndex:(NSInteger)index 28 | { 29 | struct Constants{ 30 | float magTol; 31 | float quantize; 32 | } c = {self.magTol, self.quantize}; 33 | id vertexBuffer = [[YMMetalContext shareContext].device newBufferWithBytes:&c length:sizeof(c) options:0]; 34 | self.inputFragmentBuffers = [@[vertexBuffer] mutableCopy]; 35 | [super recieveTexture:texture atIndex:index]; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMZoomBlurOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMZoomBlurOperation.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMBasicOperation.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface YMZoomBlurOperation : YMBasicOperation 14 | 15 | /** 16 | 模糊程度 17 | */ 18 | @property (nonatomic, assign) float blurSize; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Operations/YMZoomBlurOperation.m: -------------------------------------------------------------------------------- 1 | // 2 | // YMZoomBlurOperation.m 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/11. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "YMZoomBlurOperation.h" 10 | 11 | @implementation YMZoomBlurOperation 12 | 13 | - (instancetype)init 14 | { 15 | self = [self initWithVertexFunction:standardSingleInputVertex fragmentFunction:@"" maxInputCount:1]; 16 | return self; 17 | } 18 | 19 | - (instancetype)initWithVertexFunction:(NSString *)vertexFunc fragmentFunction:(NSString *)fragmentFunc maxInputCount:(NSInteger)maxInputCount 20 | { 21 | self = [super initWithVertexFunction:standardSingleInputVertex fragmentFunction:@"standardZoomBlurFragment" maxInputCount:1]; 22 | self.blurSize = 0.0; 23 | return self; 24 | } 25 | 26 | - (void)setBlurSize:(float)blurSize 27 | { 28 | blurSize = blurSize < 0 ? 0 : blurSize; 29 | blurSize = blurSize > 5 ? 5 : blurSize; 30 | _blurSize = blurSize; 31 | id vertexBuffer = [[YMMetalContext shareContext].device newBufferWithBytes:&blurSize length:sizeof(float) options:0]; 32 | self.inputFragmentBuffers = [@[vertexBuffer] mutableCopy]; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /YasicMetalDemo/Core/Outputs/YMTextureOutput.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMTextureOutput.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/4/9. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "YMPipeline.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface YMTextureOutput : UIView 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /YasicMetalDemo/DepthStencilPage/DepthStencilPage.h: -------------------------------------------------------------------------------- 1 | // 2 | // DepthStencilPage.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/12/7. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DepthStencilPage : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YasicMetalDemo/ImageCube/CubeViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CubeViewController.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/10/24. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CubeViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YasicMetalDemo/LUTFilter/Page/YMDImageLUTFilterPage.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMDImageLUTFilterPage.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/9/27. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YMDImageLUTFilterPage : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YasicMetalDemo/LUTFilter/Page/YMDVideoLUTFilterPage.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMDVideoLUTFilterPage.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/9/27. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YMDVideoLUTFilterPage : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YasicMetalDemo/LUTFilter/Util/YMDFilterProcessor.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMDFilterProcessor.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/9/27. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface YMDFilterProcessor : NSObject 14 | 15 | @property (nonatomic, strong) id mtlDevice; 16 | @property (nonatomic, strong) MTKView *mtlView; 17 | 18 | - (void)loadLUTImage:(UIImage *)lutImage; 19 | - (void)loadOriginalImage:(UIImage *)originalImage; 20 | - (void)loadPixelBuffer:(CVPixelBufferRef)pixelBuffer; 21 | - (void)renderImage; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /YasicMetalDemo/Light/YMDLightDemoPage.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMDLightDemoPage.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/10/28. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YMDLightDemoPage : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YasicMetalDemo/Resource/MetalShader/CubeShaders.metal: -------------------------------------------------------------------------------- 1 | // 2 | // LearnShaders.metal 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/10/24. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #include 10 | using namespace metal; 11 | 12 | struct Vertex { 13 | packed_float4 position; 14 | packed_float2 coords; 15 | }; 16 | 17 | struct ColoredVertex 18 | { 19 | float4 position [[position]]; 20 | float2 coords; 21 | }; 22 | 23 | struct Uniforms{ 24 | float4x4 modelMatrix; 25 | }; 26 | 27 | vertex ColoredVertex cube_image_vertex_func(constant Vertex *vertices [[buffer(0)]], const device Uniforms &uniforms [[buffer(1)]], uint vid [[vertex_id]]) { 28 | float4x4 mv_Matrix = uniforms.modelMatrix; 29 | Vertex VertexIn = vertices[vid]; 30 | ColoredVertex temp; 31 | temp.position = VertexIn.position; 32 | temp.coords = VertexIn.coords; 33 | ColoredVertex VertexOut; 34 | VertexOut.position = mv_Matrix * temp.position; 35 | VertexOut.coords = temp.coords; 36 | return VertexOut; 37 | } 38 | 39 | fragment half4 cube_image_fragment_func(ColoredVertex vert [[stage_in]], texture2d originalTexture [[texture(0)]]) { 40 | float width = originalTexture.get_width(); 41 | float height = originalTexture.get_height(); 42 | uint2 gridPos = uint2(vert.coords.x * width, vert.coords.y * height); 43 | half4 color = originalTexture.read(gridPos); 44 | return color; 45 | } 46 | -------------------------------------------------------------------------------- /YasicMetalDemo/Resource/MetalShader/DepthStencilShader.metal: -------------------------------------------------------------------------------- 1 | // 2 | // DepthStencilShader.metal 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/12/8. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #include 10 | using namespace metal; 11 | 12 | struct DSVertex { 13 | float4 position[[attribute(0)]]; 14 | float4 color[[attribute(1)]]; 15 | }; 16 | 17 | struct DSTextureVertex 18 | { 19 | float4 position [[position]]; // 告诉光栅器此数据为坐标信息 20 | float4 color; 21 | }; 22 | 23 | struct UniformData 24 | { 25 | float4x4 matrix; 26 | }; 27 | 28 | vertex DSTextureVertex ds_vertex_func(const DSVertex vertexIn[[stage_in]], const device UniformData &udata [[buffer(1)]]) { 29 | DSTextureVertex out; 30 | float4x4 matrix = udata.matrix; 31 | out.position = matrix * vertexIn.position; 32 | out.color = vertexIn.color; 33 | return out; 34 | } 35 | 36 | fragment half4 ds_fragment_func(DSTextureVertex vertexIn[[stage_in]]) { 37 | return half4(vertexIn.color); 38 | } 39 | -------------------------------------------------------------------------------- /YasicMetalDemo/Resource/MetalShader/SamplerDemoShader.metal: -------------------------------------------------------------------------------- 1 | // 2 | // SamplerDemoShader.metal 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/12/7. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #include 10 | using namespace metal; 11 | 12 | struct SDVertex { 13 | float4 position[[attribute(0)]]; // 不需要与 CPU 侧定义一致,Metal 自动转换 14 | float2 texture[[attribute(1)]]; 15 | }; 16 | 17 | struct SDTextureVertex 18 | { 19 | float4 position [[position]]; // 告诉光栅器此数据为坐标信息 20 | float2 texture; 21 | }; 22 | 23 | vertex SDTextureVertex sd_vertex_func(const SDVertex vertexIn[[stage_in]]) { 24 | SDTextureVertex out; 25 | out.position = vertexIn.position; 26 | out.texture = vertexIn.texture; 27 | return out; 28 | } 29 | 30 | fragment half4 sd_fragment_func(SDTextureVertex vertexIn[[stage_in]], 31 | sampler sampler2d [[sampler(0)]], 32 | texture2d texture [[texture(0)]]) { 33 | float4 color = texture.sample(sampler2d, vertexIn.texture); 34 | return half4(color.r, color.g, color.b, 1); 35 | } 36 | -------------------------------------------------------------------------------- /YasicMetalDemo/Resource/MetalShader/VertexDescriptor.metal: -------------------------------------------------------------------------------- 1 | // 2 | // VertexDescriptor.metal 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/12/6. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #include 10 | using namespace metal; 11 | 12 | struct VDVertex { 13 | float4 position[[attribute(0)]]; // 不需要与 CPU 侧定义一致,Metal 自动转换 14 | float4 color[[attribute(1)]]; 15 | }; 16 | 17 | struct VDColoredVertex 18 | { 19 | float4 position [[position]]; // 告诉光栅器此数据为坐标信息 20 | float4 color; 21 | }; 22 | 23 | vertex VDColoredVertex vd_vertex_func(const VDVertex vertexIn[[stage_in]]) { 24 | VDColoredVertex out; 25 | out.position = vertexIn.position; 26 | out.color = vertexIn.color; 27 | return out; 28 | } 29 | 30 | fragment half4 vd_fragment_func(VDColoredVertex vertIn [[stage_in]]) { 31 | return half4(vertIn.color); 32 | } 33 | -------------------------------------------------------------------------------- /YasicMetalDemo/Resource/video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/Resource/video.mp4 -------------------------------------------------------------------------------- /YasicMetalDemo/SamplerDemo/SamplerDemoPage.h: -------------------------------------------------------------------------------- 1 | // 2 | // SamplerDemoPage.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/12/7. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SamplerDemoPage : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YasicMetalDemo/TextRenderPage/GlyphInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // GlyphInfo.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/3/7. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface GlyphInfo : NSObject 15 | 16 | @property (nonatomic, assign) wchar_t charcode; 17 | @property (nonatomic, strong) NSData *textureData; 18 | 19 | @property (nonatomic, assign) CGFloat xpos; 20 | 21 | @property (nonatomic, assign) CGFloat advanceX; 22 | @property (nonatomic, assign) CGFloat advanceY; 23 | @property (nonatomic, assign) CGFloat offsetX; 24 | @property (nonatomic, assign) CGFloat offsetY; 25 | @property (nonatomic, assign) CGFloat width; 26 | @property (nonatomic, assign) CGFloat height; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /YasicMetalDemo/TextRenderPage/GlyphInfo.m: -------------------------------------------------------------------------------- 1 | // 2 | // GlyphInfo.m 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/3/7. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import "GlyphInfo.h" 10 | 11 | @implementation GlyphInfo 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YasicMetalDemo/TextRenderPage/TextRenderPage.h: -------------------------------------------------------------------------------- 1 | // 2 | // TextRenderPage.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2019/3/5. 6 | // Copyright © 2019 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface TextRenderPage : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /YasicMetalDemo/TrainedModels/candy.mlmodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/TrainedModels/candy.mlmodel -------------------------------------------------------------------------------- /YasicMetalDemo/TrainedModels/mosaic.mlmodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/TrainedModels/mosaic.mlmodel -------------------------------------------------------------------------------- /YasicMetalDemo/TrainedModels/the_scream.mlmodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/TrainedModels/the_scream.mlmodel -------------------------------------------------------------------------------- /YasicMetalDemo/TrainedModels/udnie.mlmodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yasic/MetalCode/296cb3b2f97ef78822838594717b222407a7bef7/YasicMetalDemo/TrainedModels/udnie.mlmodel -------------------------------------------------------------------------------- /YasicMetalDemo/VertexDescriptor/VertexDescrpitorPage.h: -------------------------------------------------------------------------------- 1 | // 2 | // VertexDescrpitorPage.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/12/6. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VertexDescrpitorPage : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YasicMetalDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/9/26. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /YasicMetalDemo/YMDMacros.h: -------------------------------------------------------------------------------- 1 | // 2 | // YMDMacros.h 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/9/27. 6 | // Copyright © 2018年 yasic. All rights reserved. 7 | // 8 | 9 | #ifndef YMDMacros_h 10 | #define YMDMacros_h 11 | 12 | #define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1] 13 | #define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)] 14 | 15 | #define HEXCOLOR(hexValue) HEXACOLOR(hexValue, 1.0) 16 | #define HEXACOLOR(hexValue, alphaValue) [UIColor colorWithRed:((CGFloat)((hexValue & 0xFF0000) >> 16))/255.0 green:((CGFloat)((hexValue & 0xFF00) >> 8))/255.0 blue:((CGFloat)(hexValue & 0xFF))/255.0 alpha:(alphaValue)] 17 | 18 | #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width 19 | #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height 20 | 21 | #endif /* YMDMacros_h */ 22 | -------------------------------------------------------------------------------- /YasicMetalDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // YasicMetalDemo 4 | // 5 | // Created by yasic on 2018/9/26. 6 | // Copyright © 2018年 yasic. 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 | --------------------------------------------------------------------------------