├── ObjCUI
├── Assets
│ └── .gitkeep
└── Classes
│ ├── .gitkeep
│ ├── ObjCUI.h
│ ├── OCUIKit
│ ├── UIView+ObjcUI.h
│ ├── UIControl+ObjcUI.h
│ ├── wrapper
│ │ ├── OCUIControlWrapper.h
│ │ ├── OCUIControlWrapper.m
│ │ ├── PickerView
│ │ │ ├── OCUIPickerViewDataSourceWrapper.h
│ │ │ ├── OCUIPickerViewDataSourceWrapper.m
│ │ │ └── OCUIPickerViewDelegateWrapper.h
│ │ ├── TableView
│ │ │ ├── OCUITableViewPrefetchDataSourceWrapper.h
│ │ │ ├── OCUITableViewPrefetchDataSourceWrapper.m
│ │ │ ├── OCUITableViewDropDelegateWrapper.h
│ │ │ └── OCUITableViewDragDelegateWrapper.h
│ │ ├── OCUITextFiledDelegateWrapper.h
│ │ └── OCUITextViewDelegateWrapper.h
│ ├── OCUIKit.h
│ ├── UIDatePicker+ObjcUI.h
│ ├── UILabel+ObjcUI.h
│ ├── UIImageView+ObjcUI.h
│ ├── UISlider+ObjcUI.h
│ ├── UIButton+ObjcUI.h
│ ├── UIPickerView+ObjcUI.h
│ └── UITableViewCell+ObjcUI.h
│ └── Layout
│ ├── OCLayout.h
│ ├── OCUILayoutInterface.h
│ ├── OCUISizeBox.h
│ ├── OCUIRow.h
│ ├── OCUIStack.h
│ ├── OCUIColumn.h
│ ├── OCUICenter.h
│ ├── OCLayoutDefine.h
│ ├── OCUIBasicLayout.h
│ ├── OCUIPadding.h
│ ├── UIView+Layout.h
│ ├── OCUILayoutHelper.h
│ ├── OCUILayoutEnum.h
│ ├── OCUICenter.m
│ ├── OCUISizeBox.m
│ ├── OCUIPadding.m
│ └── OCUIBasicLayout.m
├── Example
├── .idea
│ ├── .name
│ ├── Example.iml
│ ├── dictionaries
│ │ └── freedom.xml
│ ├── vcs.xml
│ └── runConfigurations
│ │ └── ObjCUI_Example.xml
├── Tests
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ ├── Tests-Prefix.pch
│ ├── Tests.m
│ └── Tests-Info.plist
├── ObjCUI
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ ├── Images.xcassets
│ │ ├── Contents.json
│ │ └── email.imageset
│ │ │ ├── email.pdf
│ │ │ └── Contents.json
│ ├── Feature
│ │ ├── OCUIKitTestVC.h
│ │ ├── OCUILayoutTestVC.h
│ │ ├── OCUITableViewTestVC.h
│ │ └── OCUITableViewTestVC.m
│ ├── OCUIViewController.h
│ ├── OCUIAppDelegate.h
│ ├── main.m
│ ├── ObjCUI-Prefix.pch
│ └── ObjCUI-Info.plist
├── Pods
│ ├── Target Support Files
│ │ ├── ObjCUI
│ │ │ ├── ObjCUI.modulemap
│ │ │ ├── ObjCUI-dummy.m
│ │ │ ├── ObjCUI-prefix.pch
│ │ │ ├── ObjCUI.debug.xcconfig
│ │ │ ├── ObjCUI.release.xcconfig
│ │ │ ├── ObjCUI-Info.plist
│ │ │ └── ObjCUI-umbrella.h
│ │ ├── Masonry
│ │ │ ├── Masonry.modulemap
│ │ │ ├── Masonry-dummy.m
│ │ │ ├── Masonry-prefix.pch
│ │ │ ├── Masonry.debug.xcconfig
│ │ │ ├── Masonry.release.xcconfig
│ │ │ ├── Masonry-umbrella.h
│ │ │ └── Masonry-Info.plist
│ │ ├── ReactiveObjC
│ │ │ ├── ReactiveObjC.modulemap
│ │ │ ├── ReactiveObjC-dummy.m
│ │ │ ├── ReactiveObjC-prefix.pch
│ │ │ ├── ReactiveObjC.debug.xcconfig
│ │ │ ├── ReactiveObjC.release.xcconfig
│ │ │ └── ReactiveObjC-Info.plist
│ │ ├── Pods-ObjCUI_Tests
│ │ │ ├── Pods-ObjCUI_Tests.modulemap
│ │ │ ├── Pods-ObjCUI_Tests-dummy.m
│ │ │ ├── Pods-ObjCUI_Tests-acknowledgements.markdown
│ │ │ ├── Pods-ObjCUI_Tests-umbrella.h
│ │ │ ├── Pods-ObjCUI_Tests.debug.xcconfig
│ │ │ ├── Pods-ObjCUI_Tests.release.xcconfig
│ │ │ ├── Pods-ObjCUI_Tests-Info.plist
│ │ │ └── Pods-ObjCUI_Tests-acknowledgements.plist
│ │ └── Pods-ObjCUI_Example
│ │ │ ├── Pods-ObjCUI_Example.modulemap
│ │ │ ├── Pods-ObjCUI_Example-dummy.m
│ │ │ ├── Pods-ObjCUI_Example-umbrella.h
│ │ │ ├── Pods-ObjCUI_Example-Info.plist
│ │ │ ├── Pods-ObjCUI_Example.debug.xcconfig
│ │ │ └── Pods-ObjCUI_Example.release.xcconfig
│ ├── Pods.xcodeproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcuserdata
│ │ │ │ └── freedom.xcuserdatad
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcuserdata
│ │ │ └── freedom.xcuserdatad
│ │ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ ├── ReactiveObjC
│ │ ├── ReactiveObjC
│ │ │ ├── RACCompoundDisposableProvider.d
│ │ │ ├── RACSignalProvider.d
│ │ │ ├── RACAnnotations.h
│ │ │ ├── RACEagerSequence.h
│ │ │ ├── RACEmptySequence.h
│ │ │ ├── RACImmediateScheduler.h
│ │ │ ├── RACUnarySequence.h
│ │ │ ├── RACValueTransformer.h
│ │ │ ├── RACErrorSignal.h
│ │ │ ├── RACIndexSetSequence.h
│ │ │ ├── RACEmptySignal.h
│ │ │ ├── RACMulticastConnection+Private.h
│ │ │ ├── NSArray+RACSequenceAdditions.m
│ │ │ ├── NSString+RACSequenceAdditions.m
│ │ │ ├── NSIndexSet+RACSequenceAdditions.m
│ │ │ ├── RACDynamicSignal.h
│ │ │ ├── RACReturnSignal.h
│ │ │ ├── NSSet+RACSequenceAdditions.m
│ │ │ ├── RACUnit.m
│ │ │ ├── RACSubscriptionScheduler.h
│ │ │ ├── RACUnit.h
│ │ │ ├── NSOrderedSet+RACSequenceAdditions.m
│ │ │ ├── RACSubscriber+Private.h
│ │ │ ├── RACSignalSequence.h
│ │ │ ├── NSEnumerator+RACSequenceAdditions.m
│ │ │ ├── RACGroupedSignal.m
│ │ │ ├── NSFileHandle+RACSupport.h
│ │ │ ├── RACGroupedSignal.h
│ │ │ ├── UISwitch+RACSignalSupport.m
│ │ │ ├── NSObject+RACDescription.h
│ │ │ ├── UIGestureRecognizer+RACSignalSupport.h
│ │ │ ├── RACArraySequence.h
│ │ │ ├── RACTupleSequence.h
│ │ │ ├── RACStringSequence.h
│ │ │ ├── UISlider+RACSignalSupport.m
│ │ │ ├── UIStepper+RACSignalSupport.m
│ │ │ ├── NSNotificationCenter+RACSupport.h
│ │ │ ├── RACScopedDisposable.h
│ │ │ ├── UIDatePicker+RACSignalSupport.m
│ │ │ ├── UIControl+RACSignalSupport.h
│ │ │ ├── RACQueueScheduler.h
│ │ │ ├── NSEnumerator+RACSequenceAdditions.h
│ │ │ ├── UISegmentedControl+RACSignalSupport.m
│ │ │ ├── RACBehaviorSubject.h
│ │ │ ├── RACScopedDisposable.m
│ │ │ ├── NSSet+RACSequenceAdditions.h
│ │ │ ├── NSArray+RACSequenceAdditions.h
│ │ │ ├── NSOrderedSet+RACSequenceAdditions.h
│ │ │ ├── NSIndexSet+RACSequenceAdditions.h
│ │ │ ├── RACStream+Private.h
│ │ │ ├── UIButton+RACCommandSupport.h
│ │ │ ├── NSData+RACSupport.h
│ │ │ ├── NSString+RACSequenceAdditions.h
│ │ │ ├── UISwitch+RACSignalSupport.h
│ │ │ ├── RACDynamicSequence.h
│ │ │ ├── NSString+RACSupport.h
│ │ │ ├── RACReplaySubject.h
│ │ │ ├── UIBarButtonItem+RACCommandSupport.h
│ │ │ ├── UIRefreshControl+RACCommandSupport.h
│ │ │ ├── UISlider+RACSignalSupport.h
│ │ │ ├── UIDatePicker+RACSignalSupport.h
│ │ │ ├── UIStepper+RACSignalSupport.h
│ │ │ ├── RACSubject.h
│ │ │ ├── RACTargetQueueScheduler.h
│ │ │ ├── NSObject+RACDeallocating.h
│ │ │ ├── NSDictionary+RACSequenceAdditions.m
│ │ │ ├── UITableViewCell+RACSignalSupport.h
│ │ │ ├── RACValueTransformer.m
│ │ │ ├── RACTargetQueueScheduler.m
│ │ │ ├── UISegmentedControl+RACSignalSupport.h
│ │ │ ├── MKAnnotationView+RACSignalSupport.h
│ │ │ ├── MKAnnotationView+RACSignalSupport.m
│ │ │ ├── UITableViewCell+RACSignalSupport.m
│ │ │ ├── NSUserDefaults+RACSupport.h
│ │ │ ├── RACDelegateProxy.h
│ │ │ ├── UICollectionReusableView+RACSignalSupport.h
│ │ │ ├── UICollectionReusableView+RACSignalSupport.m
│ │ │ ├── UITableViewHeaderFooterView+RACSignalSupport.h
│ │ │ ├── NSURLConnection+RACSupport.h
│ │ │ ├── NSString+RACKeyPathUtilities.m
│ │ │ ├── UITableViewHeaderFooterView+RACSignalSupport.m
│ │ │ ├── NSData+RACSupport.m
│ │ │ ├── UITextField+RACSignalSupport.h
│ │ │ ├── NSNotificationCenter+RACSupport.m
│ │ │ ├── RACBlockTrampoline.h
│ │ │ ├── RACErrorSignal.m
│ │ │ ├── RACPassthroughSubscriber.h
│ │ │ ├── RACScheduler+Subclass.h
│ │ │ ├── NSString+RACKeyPathUtilities.h
│ │ │ ├── NSString+RACSupport.m
│ │ │ ├── RACDisposable.h
│ │ │ ├── NSObject+RACDescription.m
│ │ │ ├── UIGestureRecognizer+RACSignalSupport.m
│ │ │ ├── RACScheduler+Private.h
│ │ │ ├── RACSubscriptingAssignmentTrampoline.m
│ │ │ ├── UITextField+RACSignalSupport.m
│ │ │ ├── RACKVOTrampoline.h
│ │ │ ├── NSFileHandle+RACSupport.m
│ │ │ ├── UIControl+RACSignalSupportPrivate.h
│ │ │ ├── UIActionSheet+RACSignalSupport.h
│ │ │ ├── NSDictionary+RACSequenceAdditions.h
│ │ │ ├── UITextView+RACSignalSupport.h
│ │ │ ├── RACKVOProxy.h
│ │ │ ├── UIImagePickerController+RACSignalSupport.h
│ │ │ ├── RACEmptySignal.m
│ │ │ ├── UIControl+RACSignalSupport.m
│ │ │ ├── RACBehaviorSubject.m
│ │ │ ├── RACImmediateScheduler.m
│ │ │ ├── RACQueueScheduler+Subclass.h
│ │ │ ├── RACTestScheduler.h
│ │ │ ├── UIActionSheet+RACSignalSupport.m
│ │ │ ├── UIControl+RACSignalSupportPrivate.m
│ │ │ ├── RACEmptySequence.m
│ │ │ ├── RACSubscriptionScheduler.m
│ │ │ ├── UITextView+RACSignalSupport.m
│ │ │ ├── NSUserDefaults+RACSupport.m
│ │ │ ├── RACDynamicSignal.m
│ │ │ └── UIImagePickerController+RACSignalSupport.m
│ │ └── LICENSE.md
│ ├── Masonry
│ │ ├── Masonry
│ │ │ ├── MASLayoutConstraint.m
│ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ │ ├── MASLayoutConstraint.h
│ │ │ ├── MASCompositeConstraint.h
│ │ │ ├── Masonry.h
│ │ │ ├── ViewController+MASAdditions.h
│ │ │ ├── NSArray+MASShorthandAdditions.h
│ │ │ ├── MASViewAttribute.m
│ │ │ ├── MASViewAttribute.h
│ │ │ ├── ViewController+MASAdditions.m
│ │ │ └── MASViewConstraint.h
│ │ └── LICENSE
│ ├── Manifest.lock
│ └── Local Podspecs
│ │ └── ObjCUI.podspec.json
├── ObjCUI.xcworkspace
│ ├── xcuserdata
│ │ └── freedom.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── ObjCUI.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── freedom.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── Podfile
└── Podfile.lock
├── _Pods.xcodeproj
├── ObjCUI.podspec
└── LICENSE
/ObjCUI/Assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Example/.idea/.name:
--------------------------------------------------------------------------------
1 | ObjCUI
--------------------------------------------------------------------------------
/_Pods.xcodeproj:
--------------------------------------------------------------------------------
1 | Example/Pods/Pods.xcodeproj
--------------------------------------------------------------------------------
/ObjCUI/Classes/ObjCUI.h:
--------------------------------------------------------------------------------
1 |
2 | #import "OCUIKit.h"
3 | #import "OCLayout.h"
--------------------------------------------------------------------------------
/Example/Tests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Example/ObjCUI/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Example/ObjCUI/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Example/.idea/Example.iml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Example/ObjCUI/Images.xcassets/email.imageset/email.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/freedom-shen/ObjCUI/HEAD/Example/ObjCUI/Images.xcassets/email.imageset/email.pdf
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ObjCUI/ObjCUI.modulemap:
--------------------------------------------------------------------------------
1 | framework module ObjCUI {
2 | umbrella header "ObjCUI-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Masonry/Masonry.modulemap:
--------------------------------------------------------------------------------
1 | framework module Masonry {
2 | umbrella header "Masonry-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ObjCUI/ObjCUI-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_ObjCUI : NSObject
3 | @end
4 | @implementation PodsDummy_ObjCUI
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Tests/Tests-Prefix.pch:
--------------------------------------------------------------------------------
1 | // The contents of this file are implicitly included at the beginning of every test case source file.
2 |
3 | #ifdef __OBJC__
4 |
5 |
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Masonry/Masonry-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Masonry : NSObject
3 | @end
4 | @implementation PodsDummy_Masonry
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/.idea/dictionaries/freedom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ocui
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ReactiveObjC/ReactiveObjC.modulemap:
--------------------------------------------------------------------------------
1 | framework module ReactiveObjC {
2 | umbrella header "ReactiveObjC-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ReactiveObjC/ReactiveObjC-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_ReactiveObjC : NSObject
3 | @end
4 | @implementation PodsDummy_ReactiveObjC
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Tests/Pods-ObjCUI_Tests.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ObjCUI_Tests {
2 | umbrella header "Pods-ObjCUI_Tests-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/ObjCUI.xcworkspace/xcuserdata/freedom.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/freedom-shen/ObjCUI/HEAD/Example/ObjCUI.xcworkspace/xcuserdata/freedom.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Example/Pods-ObjCUI_Example.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ObjCUI_Example {
2 | umbrella header "Pods-ObjCUI_Example-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Tests/Pods-ObjCUI_Tests-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ObjCUI_Tests : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ObjCUI_Tests
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Example/Pods-ObjCUI_Example-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ObjCUI_Example : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ObjCUI_Example
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Tests/Pods-ObjCUI_Tests-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 | Generated by CocoaPods - https://cocoapods.org
4 |
--------------------------------------------------------------------------------
/Example/ObjCUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/ObjCUI/Feature/OCUIKitTestVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/11.
3 | // Copyright (c) 2020 沈晓敏. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 |
9 | @interface OCUIKitTestVC : UIViewController
10 | @end
--------------------------------------------------------------------------------
/Example/ObjCUI.xcworkspace/xcuserdata/freedom.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/Example/ObjCUI/Feature/OCUILayoutTestVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/22.
3 | // Copyright (c) 2020 沈晓敏. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 |
9 | @interface OCUILayoutTestVC : UIViewController
10 | @end
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | platform :ios, '8.0'
4 |
5 | target 'ObjCUI_Example' do
6 | pod 'ObjCUI', :path => '../'
7 | pod 'ReactiveObjC'
8 |
9 | target 'ObjCUI_Tests' do
10 | inherit! :search_paths
11 |
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/Example/ObjCUI/Feature/OCUITableViewTestVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/20.
3 | // Copyright (c) 2020 沈晓敏. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 |
9 | @interface OCUITableViewTestVC : UIViewController
10 | @end
--------------------------------------------------------------------------------
/Example/ObjCUI/Images.xcassets/email.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "email.pdf"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | }
12 | }
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/ObjCUI.xcworkspace/xcuserdata/freedom.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/UIView+ObjcUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/20.
3 | //
4 |
5 | #import
6 | #import
7 | #import "OCUIKitDefine.h"
8 |
9 | @interface UIView (ObjcUI)
10 |
11 | OCUIViewChildHeaderCreate(UIView);
12 |
13 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/ObjCUI/OCUIViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // OCUIViewController.h
3 | // ObjCUI
4 | //
5 | // Created by 沈晓敏 on 06/10/2020.
6 | // Copyright (c) 2020 沈晓敏. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface OCUIViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Masonry/Masonry-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ObjCUI/ObjCUI-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/ObjCUI.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ReactiveObjC/ReactiveObjC-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCLayout.h:
--------------------------------------------------------------------------------
1 |
2 | //
3 | // Created by freedom on 2020/4/19.
4 | //
5 |
6 | #import "OCUIPadding.h"
7 | #import "OCUISizeBox.h"
8 | #import "OCUICenter.h"
9 | #import "OCUIColumn.h"
10 | #import "OCUIRow.h"
11 | #import "OCUIStack.h"
12 | #import "OCUIBasicLayout.h"
13 | #import "UIView+Layout.h"
14 |
--------------------------------------------------------------------------------
/Example/ObjCUI.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUILayoutInterface.h:
--------------------------------------------------------------------------------
1 |
2 | #import
3 | #import "OCUILayoutEnum.h"
4 |
5 |
6 | @protocol OCUILayoutInterface
7 |
8 | @required
9 | @property(nonatomic, strong) NSMutableDictionary *ocui_layoutMap;
10 |
11 | - (OCUIContainerType)containerType;
12 |
13 | @end
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/RACAnnotations.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACAnnotations.h
3 | // ReactiveObjC
4 | //
5 | // Created by Eric Horacek on 3/31/17.
6 | // Copyright © 2017 GitHub. All rights reserved.
7 | //
8 |
9 | #ifndef RAC_WARN_UNUSED_RESULT
10 | #define RAC_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
11 | #endif
12 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUISizeBox.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUILayoutInterface.h"
7 | #import "OCUIBasicLayout.h"
8 | #import "OCLayoutDefine.h"
9 |
10 |
11 | @interface OCUISizeBox : OCUIBasicLayout
12 |
13 | OCUISizeBoxChildHeaderCreate(OCUISizeBox);
14 |
15 | @end
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/UIControl+ObjcUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import
7 | #import "OCUIKitDefine.h"
8 |
9 | @interface UIControl (ObjcUI)
10 |
11 | OCUIControlChildHeaderCreate(UIControl);
12 |
13 | OCUIViewChildHeaderCreate(UIControl);
14 |
15 |
16 | @end
--------------------------------------------------------------------------------
/Example/ObjCUI/OCUIAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // OCUIAppDelegate.h
3 | // ObjCUI
4 | //
5 | // Created by 沈晓敏 on 06/10/2020.
6 | // Copyright (c) 2020 沈晓敏. All rights reserved.
7 | //
8 |
9 | @import UIKit;
10 |
11 | @interface OCUIAppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUIRow.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUIBasicLayout.h"
7 |
8 |
9 | @interface OCUIRow : OCUIBasicLayout
10 |
11 | + (OCUIRow *(^)(UIView *view))objc_create;
12 |
13 | - (OCUIRow *(^)(NSArray > *children))objc_children;
14 |
15 | @end
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcuserdata/freedom.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildLocationStyle
6 | UseTargetSettings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUIStack.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUILayoutInterface.h"
7 | #import "OCUIBasicLayout.h"
8 |
9 |
10 | @interface OCUIStack : OCUIBasicLayout
11 |
12 | + (OCUIStack *(^)(UIView *view))objc_create;
13 |
14 | - (OCUIStack *(^)(NSArray > *children))objc_children;
15 |
16 | @end
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUIColumn.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUILayoutInterface.h"
7 | #import "OCUIBasicLayout.h"
8 |
9 |
10 | @interface OCUIColumn : OCUIBasicLayout
11 |
12 | + (OCUIColumn *(^)(UIView *view))objc_create;
13 |
14 | - (OCUIColumn *(^)(NSArray > *children))objc_children;
15 |
16 | @end
--------------------------------------------------------------------------------
/Example/ObjCUI/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ObjCUI
4 | //
5 | // Created by 沈晓敏 on 06/10/2020.
6 | // Copyright (c) 2020 沈晓敏. All rights reserved.
7 | //
8 |
9 | @import UIKit;
10 | #import "OCUIAppDelegate.h"
11 |
12 | int main(int argc, char * argv[])
13 | {
14 | @autoreleasepool {
15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([OCUIAppDelegate class]));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Example/ObjCUI/ObjCUI-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_5_0
10 | #warning "This project uses features only available in iOS SDK 5.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | @import UIKit;
15 | @import Foundation;
16 | #endif
17 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUICenter.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUILayoutInterface.h"
7 | #import "OCUIBasicLayout.h"
8 | #import "OCUISizeBox.h"
9 |
10 |
11 | @interface OCUICenter : OCUISizeBox
12 |
13 |
14 | - (OCUICenter *(^)(OCUICenterAlignType alignType))objc_alignType;
15 |
16 | OCUISizeBoxChildHeaderCreate(OCUICenter);
17 |
18 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCLayoutDefine.h:
--------------------------------------------------------------------------------
1 |
2 | #define OCUISizeBoxChildHeaderCreate(__UIViewClassName__) + (__UIViewClassName__ *(^)(UIView *view))objc_create; \
3 | - (__UIViewClassName__ *(^)(double width))objc_width; \
4 | - (__UIViewClassName__ *(^)(double width))objc_height; \
5 | - (__UIViewClassName__ *(^)(double ratio))objc_widthRatio; \
6 | - (__UIViewClassName__ *(^)(double ratio))objc_heightRatio; \
7 | - (__UIViewClassName__ *(^)(UIView *view))objc_child;
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Tests/Pods-ObjCUI_Tests-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_ObjCUI_TestsVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_ObjCUI_TestsVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/OCUIControlWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/15.
3 | //
4 |
5 | #import
6 |
7 | @protocol OCUIControllerWrapperInterface
8 |
9 | - (void)didSelect:(id)sender;
10 |
11 | @end
12 |
13 | @interface OCUIControlWrapper : NSObject
14 |
15 | @property (nonatomic, copy,readonly) void (^handler)(id);
16 |
17 | - (id)initWithHandler:(void (^)(id))handler;
18 |
19 | @end
--------------------------------------------------------------------------------
/Example/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` subclass that synchronously sends an error to any
12 | // subscriber.
13 | @interface RACErrorSignal : RACSignal
14 |
15 | + (RACSignal *)error:(NSError *)error;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Example/Pods-ObjCUI_Example-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_ObjCUI_ExampleVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_ObjCUI_ExampleVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/ObjCUI.xcodeproj/xcuserdata/freedom.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ObjCUI-Example.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/OCUIKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/4/19.
3 | //
4 |
5 | #import "UIButton+ObjcUI.h"
6 | #import "UILabel+ObjcUI.h"
7 | #import "UITextField+ObjcUI.h"
8 | #import "UITextView+ObjcUI.h"
9 | #import "UIImageView+ObjcUI.h"
10 | #import "UIScrollView+ObjcUI.h"
11 | #import "UITableView+ObjcUI.h"
12 | #import "UITableViewCell+ObjcUI.h"
13 | #import "UIView+ObjcUI.h"
14 | #import "UIControl+ObjcUI.h"
15 | #import "UIPickerView+ObjcUI.h"
16 | #import "UISlider+ObjcUI.h"
17 |
--------------------------------------------------------------------------------
/Example/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<__covariant ValueType> : RACSignal
14 |
15 | + (RACSignal *)empty;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUIBasicLayout.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUILayoutInterface.h"
7 |
8 | @class MASConstraintMaker;
9 |
10 |
11 | @interface OCUIBasicLayout : NSObject
12 |
13 | @property(nonatomic, strong) UIView *entityView;
14 | @property(nonatomic, strong) UIView *childView;
15 |
16 | - (void)objc_layout;
17 |
18 | - (void)objc_layoutWithMaker:(void(^)(MASConstraintMaker *))objc_maker;
19 |
20 |
21 | @end
--------------------------------------------------------------------------------
/Example/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<__covariant ValueType> ()
14 |
15 | - (instancetype)initWithSourceSignal:(RACSignal *)source subject:(RACSubject *)subject;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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<__covariant ValueType> : RACSignal
14 |
15 | + (RACSignal *)return:(ValueType)value;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Masonry/Masonry.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit"
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Masonry/Masonry.release.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit"
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ObjCUI/ObjCUI.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ObjCUI
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ObjCUI/ObjCUI.release.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ObjCUI
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ReactiveObjC/ReactiveObjC.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ReactiveObjC
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_LDFLAGS = $(inherited) -framework "Foundation"
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ReactiveObjC
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ReactiveObjC/ReactiveObjC.release.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ReactiveObjC
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_LDFLAGS = $(inherited) -framework "Foundation"
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ReactiveObjC
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/OCUIControlWrapper.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/15.
3 | //
4 |
5 | #import "OCUIControlWrapper.h"
6 |
7 |
8 | @interface OCUIControlWrapper ()
9 |
10 | @property(nonatomic, copy) void (^handler)(id );
11 |
12 | @end
13 |
14 | @implementation OCUIControlWrapper
15 |
16 | - (id)initWithHandler:(void (^)(id ))handler {
17 | self = [super init];
18 | if (self) {
19 | self.handler = handler;
20 | }
21 | return self;
22 | }
23 |
24 | - (void)didSelect:(id )sender {
25 | if (self.handler) {
26 | self.handler(sender);
27 | }
28 | }
29 |
30 | @end
--------------------------------------------------------------------------------
/Example/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Masonry (1.1.0)
3 | - ObjCUI (0.1.1):
4 | - Masonry
5 | - ReactiveObjC (3.1.1)
6 |
7 | DEPENDENCIES:
8 | - ObjCUI (from `../`)
9 | - ReactiveObjC
10 |
11 | SPEC REPOS:
12 | trunk:
13 | - Masonry
14 | - ReactiveObjC
15 |
16 | EXTERNAL SOURCES:
17 | ObjCUI:
18 | :path: "../"
19 |
20 | SPEC CHECKSUMS:
21 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
22 | ObjCUI: ace79f0ea56845897f405a38946af946c739fef3
23 | ReactiveObjC: 011caa393aa0383245f2dcf9bf02e86b80b36040
24 |
25 | PODFILE CHECKSUM: 4bc6d5cf38ccec0fef374e3876598055e7460a2e
26 |
27 | COCOAPODS: 1.9.3
28 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Masonry (1.1.0)
3 | - ObjCUI (0.1.1):
4 | - Masonry
5 | - ReactiveObjC (3.1.1)
6 |
7 | DEPENDENCIES:
8 | - ObjCUI (from `../`)
9 | - ReactiveObjC
10 |
11 | SPEC REPOS:
12 | trunk:
13 | - Masonry
14 | - ReactiveObjC
15 |
16 | EXTERNAL SOURCES:
17 | ObjCUI:
18 | :path: "../"
19 |
20 | SPEC CHECKSUMS:
21 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
22 | ObjCUI: ace79f0ea56845897f405a38946af946c739fef3
23 | ReactiveObjC: 011caa393aa0383245f2dcf9bf02e86b80b36040
24 |
25 | PODFILE CHECKSUM: 4bc6d5cf38ccec0fef374e3876598055e7460a2e
26 |
27 | COCOAPODS: 1.9.3
28 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Local Podspecs/ObjCUI.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ObjCUI",
3 | "version": "0.1.1",
4 | "summary": "使用Objc编写类似声明氏UI",
5 | "license": "MIT",
6 | "platforms": {
7 | "watchos": "2.0",
8 | "ios": "8.0"
9 | },
10 | "homepage": "https://github.com/freedom-shen/ObjCUI",
11 | "authors": {
12 | "沈晓敏": "xxkqw1992@gmail.com"
13 | },
14 | "source": {
15 | "git": "https://github.com/freedom-shen/ObjCUI",
16 | "tag": "0.1.1"
17 | },
18 | "source_files": "ObjCUI/Classes/**/*",
19 | "public_header_files": "ObjCUI/Classes/**/*.h",
20 | "dependencies": {
21 | "Masonry": [
22 |
23 | ]
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUIPadding.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUILayoutInterface.h"
7 | #import "OCUIBasicLayout.h"
8 | #import "OCUISizeBox.h"
9 |
10 |
11 | @interface OCUIPadding : OCUISizeBox
12 |
13 | //+ (OCUIPadding *(^)(UIView *view))objc_create;
14 |
15 | - (OCUIPadding *(^)(CGFloat left))objc_left;
16 |
17 | - (OCUIPadding *(^)(CGFloat right))objc_right;
18 |
19 | - (OCUIPadding *(^)(CGFloat top))objc_top;
20 |
21 | - (OCUIPadding *(^)(CGFloat bottom))objc_bottom;
22 |
23 | //- (OCUIPadding *(^)(UIView *child))objc_child;
24 |
25 | OCUISizeBoxChildHeaderCreate(OCUIPadding);
26 |
27 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/UIView+Layout.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUILayoutInterface.h"
7 | #import
8 |
9 | @class OCUIPadding;
10 | @class OCUISizeBox;
11 | @class OCUICenter;
12 | @class OCUIColumn;
13 | @class OCUIRow;
14 | @class OCUIStack;
15 |
16 | @interface UIView (Layout)
17 |
18 | - (OCUIPadding *)objc_convertPadding;
19 |
20 | - (OCUISizeBox *)objc_convertSizeBox;
21 |
22 | - (OCUICenter *)objc_convertCenter;
23 |
24 | - (OCUIColumn *)objc_convertColumn;
25 |
26 | - (OCUIRow *)objc_convertRow;
27 |
28 | - (OCUIStack *)objc_convertStack;
29 |
30 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI.podspec:
--------------------------------------------------------------------------------
1 |
2 | Pod::Spec.new do |s|
3 | s.name = 'ObjCUI'
4 | s.version = '0.1.1'
5 | s.summary = '使用Objc编写类似声明氏UI'
6 |
7 | s.license = 'MIT'
8 |
9 | s.homepage = 'https://github.com/freedom-shen/ObjCUI'
10 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
11 | s.author = { '沈晓敏' => 'xxkqw1992@gmail.com' }
12 | s.source = { :git => 'https://github.com/freedom-shen/ObjCUI', :tag => s.version.to_s }
13 |
14 | s.ios.deployment_target = '8.0'
15 |
16 | s.source_files = 'ObjCUI/Classes/**/*'
17 | s.public_header_files = 'ObjCUI/Classes/**/*.h'
18 | s.dependency 'Masonry'
19 |
20 | end
21 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUILayoutHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/22.
3 | //
4 |
5 | #import
6 | #import
7 | #import "OCUILayoutEnum.h"
8 |
9 |
10 | @interface OCUILayoutHelper : NSObject
11 |
12 | + (void)autoLayoutWithMap:(NSDictionary *)dictionary
13 | maker:(MASConstraintMaker *)maker
14 | superView:(UIView *)superView;
15 |
16 |
17 | + (void)autoLayoutWithMap:(NSDictionary *)dictionary
18 | maker:(MASConstraintMaker *)maker
19 | superView:(UIView *)superView
20 | rewriteType:(NSSet *)rewriteTypes
21 | maker:(void (^)(MASConstraintMaker *))objc_maker;
22 |
23 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 ValueType)value;
19 |
20 | @end
21 |
22 | NS_ASSUME_NONNULL_END
23 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUILayoutEnum.h:
--------------------------------------------------------------------------------
1 |
2 | #import
3 |
4 | typedef NS_ENUM(NSUInteger, OCUIContainerType) {
5 | OCUIContainerEntityType = 0,
6 | OCUIContainerLayoutType,
7 | };
8 |
9 | typedef NS_ENUM(NSUInteger, OCUICenterAlignType) {
10 | OCUICenterAlignBothType = 0,
11 | OCUICenterAlignXType,
12 | OCUICenterAlignYType,
13 | };
14 |
15 | typedef NS_ENUM(NSUInteger, OCUILayoutType) {
16 | OCUILayoutLeftType = 1,
17 | OCUILayoutRightType,
18 | OCUILayoutTopType,
19 | OCUILayoutBottomType,
20 |
21 | OCUILayoutCenterType,
22 |
23 | OCUILayoutWidthType,
24 | OCUILayoutHeightType,
25 |
26 | // OCUILayoutWidthHeightRatioType,
27 | OCUILayoutWidthRatioType,
28 | OCUILayoutHeightRatioType,
29 | };
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Tests/Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ObjCUITests.m
3 | // ObjCUITests
4 | //
5 | // Created by 沈晓敏 on 06/10/2020.
6 | // Copyright (c) 2020 沈晓敏. All rights reserved.
7 | //
8 |
9 | @import XCTest;
10 |
11 | @interface Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation Tests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
36 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/PickerView/OCUIPickerViewDataSourceWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 |
7 | typedef NSString *OCUIPickerViewDataSourceKey NS_EXTENSIBLE_STRING_ENUM;
8 |
9 | static const OCUIPickerViewDataSourceKey OCUIPickerViewDataSourceNumberOfComponentsInPickerViewKey = @"OCUIPickerViewDataSourceNumberOfComponentsInPickerViewKey";
10 | static const OCUIPickerViewDataSourceKey OCUIPickerViewDataSourceNumberOfRowsInComponentKey = @"OCUIPickerViewDataSourceNumberOfRowsInComponentKey";
11 |
12 | @interface OCUIPickerViewDataSourceWrapper : NSObject
13 |
14 | @property(nonatomic, strong, readonly) NSMutableDictionary *delegateMap;
15 |
16 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Tests/Tests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/TableView/OCUITableViewPrefetchDataSourceWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/19.
3 | //
4 |
5 | #import
6 |
7 |
8 | typedef NSString *OCUITableViewPrefetchDataSourceKey NS_EXTENSIBLE_STRING_ENUM;
9 |
10 | static const OCUITableViewPrefetchDataSourceKey OCUITableViewDelegatePrefetchRowsAtIndexPathsKey = @"OCUITableViewDelegatePrefetchRowsAtIndexPathsKey";
11 | static const OCUITableViewPrefetchDataSourceKey OCUITableViewDelegateCancelPrefetchingForRowsAtIndexPathsKey = @"OCUITableViewDelegateCancelPrefetchingForRowsAtIndexPathsKey";
12 |
13 | @interface OCUITableViewPrefetchDataSourceWrapper : NSObject
14 |
15 | @property(nonatomic, strong, readonly) NSMutableDictionary *delegateMap;
16 |
17 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 | // Redeclaration of the RACSubscriber method. Made in order to specify a generic type.
25 | - (void)sendNext:(nullable ValueType)value;
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Tests/Pods-ObjCUI_Tests.debug.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/ObjCUI" "${PODS_CONFIGURATION_BUILD_DIR}/ReactiveObjC"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ObjCUI/ObjCUI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReactiveObjC/ReactiveObjC.framework/Headers"
4 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "Masonry" -framework "ObjCUI" -framework "ReactiveObjC" -framework "UIKit"
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
8 | PODS_ROOT = ${SRCROOT}/Pods
9 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
10 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Tests/Pods-ObjCUI_Tests.release.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/ObjCUI" "${PODS_CONFIGURATION_BUILD_DIR}/ReactiveObjC"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ObjCUI/ObjCUI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReactiveObjC/ReactiveObjC.framework/Headers"
4 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "Masonry" -framework "ObjCUI" -framework "ReactiveObjC" -framework "UIKit"
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
8 | PODS_ROOT = ${SRCROOT}/Pods
9 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
10 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUICenter.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import "OCUICenter.h"
6 |
7 |
8 | @implementation OCUICenter
9 |
10 | + (OCUICenter *(^)(UIView *view))objc_create {
11 | return ^OCUICenter *(UIView *view) {
12 | OCUICenter *center = [[OCUICenter alloc] init];
13 | center.entityView = view;
14 | center.ocui_layoutMap[@(OCUILayoutCenterType)] = @(OCUICenterAlignBothType);
15 | return center;
16 | };
17 | }
18 |
19 | - (OCUICenter *(^)(OCUICenterAlignType alignType))objc_alignType {
20 | return ^OCUICenter *(OCUICenterAlignType alignType) {
21 | self.ocui_layoutMap[@(OCUILayoutCenterType)] = @(alignType);
22 | return self;
23 | };
24 | }
25 |
26 |
27 | - (OCUICenter *(^)(UIView *view))objc_child {
28 | return ^OCUICenter *(UIView *view) {
29 | self.childView = view;
30 | [self objc_layout];
31 | return self;
32 | };
33 | }
34 |
35 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Masonry/Masonry-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "MASCompositeConstraint.h"
14 | #import "MASConstraint+Private.h"
15 | #import "MASConstraint.h"
16 | #import "MASConstraintMaker.h"
17 | #import "MASLayoutConstraint.h"
18 | #import "Masonry.h"
19 | #import "MASUtilities.h"
20 | #import "MASViewAttribute.h"
21 | #import "MASViewConstraint.h"
22 | #import "NSArray+MASAdditions.h"
23 | #import "NSArray+MASShorthandAdditions.h"
24 | #import "NSLayoutConstraint+MASDebugAdditions.h"
25 | #import "View+MASAdditions.h"
26 | #import "View+MASShorthandAdditions.h"
27 | #import "ViewController+MASAdditions.h"
28 |
29 | FOUNDATION_EXPORT double MasonryVersionNumber;
30 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
31 |
32 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ObjCUI/ObjCUI-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 0.1.1
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Masonry/Masonry-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ReactiveObjC/ReactiveObjC-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.1.1
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/.idea/runConfigurations/ObjCUI_Example.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Example/Pods-ObjCUI_Example-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Tests/Pods-ObjCUI_Tests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Tests/Pods-ObjCUI_Tests-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Generated by CocoaPods - https://cocoapods.org
18 | Title
19 |
20 | Type
21 | PSGroupSpecifier
22 |
23 |
24 | StringsTable
25 | Acknowledgements
26 | Title
27 | Acknowledgements
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Example/Pods-ObjCUI_Example.debug.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/ObjCUI" "${PODS_CONFIGURATION_BUILD_DIR}/ReactiveObjC"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ObjCUI/ObjCUI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReactiveObjC/ReactiveObjC.framework/Headers"
4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
5 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "Masonry" -framework "ObjCUI" -framework "ReactiveObjC" -framework "UIKit"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/UIDatePicker+ObjcUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUIKitDefine.h"
7 |
8 | @interface UIDatePicker (ObjcUI)
9 |
10 |
11 | - (UIDatePicker *(^)(UIDatePickerMode datePickerMode))objc_datePickerMode;
12 |
13 | - (UIDatePicker *(^)(NSLocale *locale))objc_locale;
14 |
15 | - (UIDatePicker *(^)(NSCalendar *calendar))objc_calendar;
16 |
17 | - (UIDatePicker *(^)(NSTimeZone *timeZone))objc_timeZone;
18 |
19 | - (UIDatePicker *(^)(NSDate *date))objc_date;
20 |
21 | - (UIDatePicker *(^)(NSDate *minimumDate))objc_minimumDate;
22 |
23 | - (UIDatePicker *(^)(NSDate *maximumDate))objc_maximumDate;
24 |
25 | - (UIDatePicker *(^)(NSTimeInterval countDownDuration))objc_countDownDuration;
26 |
27 | - (UIDatePicker *(^)(NSInteger minuteInterval))objc_minuteInterval;
28 |
29 | - (UIDatePicker *(^)(NSDate *date, BOOL animated))objc_setDateAnimated;
30 |
31 |
32 | OCUIViewChildHeaderCreate(UIDatePicker);
33 |
34 | OCUIControlChildHeaderCreate(UIDatePicker);
35 |
36 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ObjCUI_Example/Pods-ObjCUI_Example.release.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/ObjCUI" "${PODS_CONFIGURATION_BUILD_DIR}/ReactiveObjC"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ObjCUI/ObjCUI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReactiveObjC/ReactiveObjC.framework/Headers"
4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
5 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "Masonry" -framework "ObjCUI" -framework "ReactiveObjC" -framework "UIKit"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 RACTwoTuple<__covariant First, __covariant Second>;
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 tuple of the received response and downloaded data, and complete
24 | /// on a background thread. If any errors occur, the returned signal will error
25 | /// out.
26 | + (RACSignal *> *)rac_sendAsynchronousRequest:(NSURLRequest *)request;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2020 沈晓敏
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.
20 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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.
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/PickerView/OCUIPickerViewDataSourceWrapper.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import "OCUIPickerViewDataSourceWrapper.h"
6 |
7 |
8 | @implementation OCUIPickerViewDataSourceWrapper
9 |
10 | @synthesize delegateMap = _delegateMap;
11 |
12 | - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
13 | NSInteger (^block)(UIPickerView *pickerView) = self.delegateMap[OCUIPickerViewDataSourceNumberOfComponentsInPickerViewKey];
14 | if (block) {
15 | return block(pickerView);
16 | }
17 | return 0;
18 | }
19 |
20 | - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component {
21 | NSInteger (^block)(UIPickerView *pickerView, NSInteger component) = self.delegateMap[OCUIPickerViewDataSourceNumberOfRowsInComponentKey];
22 | if (block) {
23 | return block(pickerView, component);
24 | }
25 | return 0;
26 | }
27 |
28 | #pragma mark - Get
29 |
30 | - (NSMutableDictionary *)delegateMap {
31 | if (!_delegateMap) {
32 | _delegateMap = [NSMutableDictionary dictionary];
33 | }
34 | return _delegateMap;
35 | }
36 |
37 | @end
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/PickerView/OCUIPickerViewDelegateWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 |
7 | typedef NSString *OCUIPickerViewDelegateKey NS_EXTENSIBLE_STRING_ENUM;
8 |
9 | static const OCUIPickerViewDelegateKey OCUIPickerViewDelegateWidthForComponentKey = @"OCUIPickerViewDelegateWidthForComponentKey";
10 | static const OCUIPickerViewDelegateKey OCUIPickerViewDelegateRowHeightForComponentKey = @"OCUIPickerViewDelegateRowHeightForComponentKey";
11 | static const OCUIPickerViewDelegateKey OCUIPickerViewDelegateTitleForRowKey = @"OCUIPickerViewDelegateTitleForRowKey";
12 | static const OCUIPickerViewDelegateKey OCUIPickerViewDelegateAttributedTitleForRowKey = @"OCUIPickerViewDelegateAttributedTitleForRowKey";
13 | static const OCUIPickerViewDelegateKey OCUIPickerViewDelegateViewForRowKey = @"OCUIPickerViewDelegateViewForRowKey";
14 | static const OCUIPickerViewDelegateKey OCUIPickerViewDelegateDidSelectRowKey = @"OCUIPickerViewDelegateDidSelectRowKey";
15 |
16 |
17 | @interface OCUIPickerViewDelegateWrapper : NSObject
18 |
19 | @property(nonatomic, strong, readonly) NSMutableDictionary *delegateMap;
20 | @end
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/TableView/OCUITableViewPrefetchDataSourceWrapper.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/19.
3 | //
4 |
5 | #import "OCUITableViewPrefetchDataSourceWrapper.h"
6 |
7 |
8 | @implementation OCUITableViewPrefetchDataSourceWrapper
9 |
10 | - (void)tableView:(UITableView *)tableView prefetchRowsAtIndexPaths:(NSArray *)indexPaths {
11 | void (^block)(UITableView *tableView, NSArray *indexPaths) = self.delegateMap[OCUITableViewDelegatePrefetchRowsAtIndexPathsKey];
12 | if (block) {
13 | block(tableView, indexPaths);
14 | }
15 | }
16 |
17 | - (void)tableView:(UITableView *)tableView cancelPrefetchingForRowsAtIndexPaths:(NSArray *)indexPaths {
18 | void (^block)(UITableView *tableView, NSArray *indexPaths) = self.delegateMap[OCUITableViewDelegateCancelPrefetchingForRowsAtIndexPathsKey];
19 | if (block) {
20 | block(tableView, indexPaths);
21 | }
22 | }
23 |
24 | @synthesize delegateMap = _delegateMap;
25 |
26 | - (NSMutableDictionary *)delegateMap {
27 | if (!_delegateMap) {
28 | _delegateMap = [NSMutableDictionary dictionary];
29 | }
30 | return _delegateMap;
31 | }
32 |
33 | @end
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/UILabel+ObjcUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/17.
3 | //
4 |
5 | #import
6 | #import "OCUIKitDefine.h"
7 |
8 | @interface UILabel (ObjcUI)
9 |
10 | - (UILabel *(^)(NSString *text))objc_text;
11 |
12 | - (UILabel *(^)(UIColor *))objc_textColor;
13 |
14 | - (UILabel *(^)(UIColor *))objc_shadowColor;
15 |
16 | - (UILabel *(^)(CGSize))objc_shadowOffset;
17 |
18 | - (UILabel *(^)(NSLineBreakMode))objc_lineBreakMode;
19 |
20 | - (UILabel *(^)(NSAttributedString *))objc_attributedText;
21 |
22 | - (UILabel *(^)(UIColor *))objc_highlightedTextColor;
23 |
24 | - (UILabel *(^)(BOOL))objc_highlighted;
25 |
26 | - (UILabel *(^)(BOOL))objc_enabled;
27 |
28 | - (UILabel *(^)(BOOL))objc_adjustsFontSizeToFitWidth;
29 |
30 | - (UILabel *(^)(UIBaselineAdjustment))objc_baselineAdjustment;
31 |
32 | - (UILabel *(^)(UIBaselineAdjustment))objc_minimumScaleFactor API_AVAILABLE(ios(6.0));;
33 |
34 | - (UILabel *(^)(BOOL))objc_allowsDefaultTighteningForTruncation API_AVAILABLE(ios(9.0));
35 |
36 | - (UILabel *(^)(UIFont *))objc_font;
37 |
38 | - (UILabel *(^)(NSTextAlignment))objc_textAlignment;
39 |
40 | - (UILabel *(^)(int))objc_numberOfLines;;
41 |
42 | OCUIViewChildHeaderCreate(UILabel);
43 |
44 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/freedom.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Masonry.xcscheme
8 |
9 | isShown
10 |
11 | orderHint
12 | 1
13 |
14 | ObjCUI.xcscheme
15 |
16 | isShown
17 |
18 | orderHint
19 | 2
20 |
21 | Pods-ObjCUI_Example.xcscheme
22 |
23 | isShown
24 |
25 | orderHint
26 | 3
27 |
28 | Pods-ObjCUI_Tests.xcscheme
29 |
30 | isShown
31 |
32 | orderHint
33 | 4
34 |
35 | ReactiveObjC.xcscheme
36 |
37 | isShown
38 |
39 | orderHint
40 | 5
41 |
42 |
43 | SuppressBuildableAutocreation
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/UIImageView+ObjcUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/17.
3 | //
4 |
5 | #import
6 | #import "OCUIKitDefine.h"
7 |
8 | @interface UIImageView (ObjcUI)
9 |
10 | + (UIImageView *(^)(UIImage *image))objc_createImage;
11 |
12 | - (UIImageView *(^)(UIImage *image))objc_image;
13 |
14 | - (UIImageView *(^)(UIImage *highlightedImage))objc_highlightedImage;
15 |
16 | - (UIImageView *(^)(UIImageSymbolConfiguration *preferredSymbolConfiguration))objc_preferredSymbolConfiguration API_AVAILABLE(ios(13.0),tvos(13.0),watchos(6.0));;
17 |
18 | - (UIImageView *(^)(BOOL highlighted))objc_highlighted;
19 |
20 | - (UIImageView *(^)(NSArray *animationImages))objc_animationImages;
21 |
22 | - (UIImageView *(^)(NSArray *highlightedAnimationImages))objc_highlightedAnimationImages;
23 |
24 | - (UIImageView *(^)(NSTimeInterval animationDuration))objc_animationDuration;
25 |
26 | - (UIImageView *(^)(NSInteger animationRepeatCount))objc_animationRepeatCount;
27 |
28 | - (UIImageView *(^)(BOOL adjustsImageWhenAncestorFocused))objc_adjustsImageWhenAncestorFocused;
29 |
30 | - (UIImageView *(^)())objc_startAnimating;
31 |
32 | - (UIImageView *(^)())objc_stopAnimating;
33 |
34 | OCUIViewChildHeaderCreate(UIImageView);
35 |
36 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface UIControl (RACSignalSupportPrivate)
16 |
17 | /// Adds a RACChannel-based interface to the receiver for the given
18 | /// UIControlEvents and exposes it.
19 | ///
20 | /// controlEvents - A mask of UIControlEvents on which to send new values.
21 | /// key - The key whose value should be read and set when a control
22 | /// event fires and when a value is sent to the
23 | /// RACChannelTerminal respectively.
24 | /// nilValue - The value to be assigned to the key when `nil` is sent to the
25 | /// RACChannelTerminal. This value can itself be nil.
26 | ///
27 | /// Returns a RACChannelTerminal which will send future values from the receiver,
28 | /// and update the receiver when values are sent to the terminal.
29 | - (RACChannelTerminal *)rac_channelForControlEvents:(UIControlEvents)controlEvents key:(NSString *)key nilValue:(nullable id)nilValue;
30 |
31 | @end
32 |
33 | NS_ASSUME_NONNULL_END
34 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 RACTwoTuple<__covariant First, __covariant Second>;
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @interface NSDictionary<__covariant KeyType, __covariant ObjectType> (RACSequenceAdditions)
17 |
18 | /// Creates and returns a sequence of key/value tuples.
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 | /// Creates and returns a sequence corresponding to the keys in the receiver.
24 | ///
25 | /// Mutating the receiver will not affect the sequence after it's been created.
26 | @property (nonatomic, copy, readonly) RACSequence *rac_keySequence;
27 |
28 | /// Creates and returns a sequence corresponding to the values in the receiver.
29 | ///
30 | /// Mutating the receiver will not affect the sequence after it's been created.
31 | @property (nonatomic, copy, readonly) RACSequence *rac_valueSequence;
32 |
33 | @end
34 |
35 | NS_ASSUME_NONNULL_END
36 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/UISlider+ObjcUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUIKitDefine.h"
7 |
8 | @interface UISlider (ObjcUI)
9 |
10 | - (UISlider *(^)(float value))objc_value;
11 |
12 | - (UISlider *(^)(float minimumValue))objc_minimumValue;
13 |
14 | - (UISlider *(^)(float maximumValue))objc_maximumValue;
15 |
16 | - (UISlider *(^)(UIImage *minimumValueImage))objc_minimumValueImage;
17 |
18 | - (UISlider *(^)(UIImage *maximumValueImage))objc_maximumValueImage;
19 |
20 | - (UISlider *(^)(UIColor *minimumTrackTintColor))objc_minimumTrackTintColor API_AVAILABLE(ios(5.0)) UI_APPEARANCE_SELECTOR;;
21 |
22 | - (UISlider *(^)(UIColor *maximumTrackTintColor))objc_maximumTrackTintColor API_AVAILABLE(ios(5.0)) UI_APPEARANCE_SELECTOR;
23 |
24 | - (UISlider *(^)(UIColor *thumbTintColor))objc_thumbTintColor API_AVAILABLE(ios(5.0)) UI_APPEARANCE_SELECTOR;
25 |
26 | - (UISlider *(^)(float value, BOOL animated))objc_setValueAnimated;
27 |
28 | - (UISlider *(^)(UIImage *image, UIControlState state))objc_setThumbImageForState;
29 |
30 | - (UISlider *(^)(UIImage *image, UIControlState state))objc_setMinimumTrackImageForState;
31 |
32 | - (UISlider *(^)(UIImage *image, UIControlState state))objc_setMaximumTrackImageForState;
33 |
34 |
35 | OCUIViewChildHeaderCreate(UISlider);
36 |
37 | OCUIControlChildHeaderCreate(UISlider);
38 |
39 | @end
--------------------------------------------------------------------------------
/Example/Pods/Masonry/Masonry/MASViewAttribute.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASViewAttribute.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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUISizeBox.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import "OCUISizeBox.h"
6 |
7 |
8 | @implementation OCUISizeBox
9 |
10 | + (OCUISizeBox *(^)(UIView *view))objc_create {
11 | return ^OCUISizeBox *(UIView *view) {
12 | OCUISizeBox *sizeBox = [[OCUISizeBox alloc] init];
13 | sizeBox.entityView = view;
14 | return sizeBox;
15 | };
16 | }
17 |
18 | - (OCUISizeBox *(^)(double width))objc_width {
19 | return ^OCUISizeBox *(double width) {
20 | self.ocui_layoutMap[@(OCUILayoutWidthType)] = @(width);
21 | return self;
22 | };
23 | }
24 |
25 | - (OCUISizeBox *(^)(double width))objc_height {
26 | return ^OCUISizeBox *(double height) {
27 | self.ocui_layoutMap[@(OCUILayoutHeightType)] = @(height);
28 | return self;
29 | };
30 | }
31 |
32 | - (OCUISizeBox *(^)(double ratio))objc_widthRatio {
33 | return ^OCUISizeBox *(double ratio) {
34 | self.ocui_layoutMap[@(OCUILayoutWidthRatioType)] = @(ratio);
35 | return self;
36 | };
37 | }
38 |
39 | - (OCUISizeBox *(^)(double ratio))objc_heightRatio {
40 | return ^OCUISizeBox *(double ratio) {
41 | self.ocui_layoutMap[@(OCUILayoutHeightRatioType)] = @(ratio);
42 | return self;
43 | };
44 | }
45 |
46 | - (OCUISizeBox *(^)(UIView *))objc_child {
47 | return ^OCUISizeBox *(UIView *view) {
48 | return self;
49 | };
50 | }
51 |
52 | @end
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Masonry/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASViewAttribute.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 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/OCUITextFiledDelegateWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/18.
3 | //
4 |
5 | #import
6 |
7 | typedef NSString *OCUITextFieldDelegateKey NS_EXTENSIBLE_STRING_ENUM;
8 |
9 | static const OCUITextFieldDelegateKey OCUITextFieldShouldBeginEditingKey = @"OCUITextFieldShouldBeginEditingKey";
10 | static const OCUITextFieldDelegateKey OCUITextFieldDidBeginEditingKey = @"OCUITextFieldDidBeginEditingKey";
11 | static const OCUITextFieldDelegateKey OCUITextFieldShouldEndEditingKey = @"OCUITextFieldShouldEndEditingKey";
12 | static const OCUITextFieldDelegateKey OCUITextFieldDidEndEditingKey = @"OCUITextFieldDidEndEditingKey";
13 | static const OCUITextFieldDelegateKey OCUITextFieldDidEndEditingReasonKey = @"OCUITextFieldDidEndEditingReasonKey";
14 | static const OCUITextFieldDelegateKey OCUIShouldChangeCharactersInRangeReplacementStringKey = @"OCUIShouldChangeCharactersInRangeReplacementStringKey";
15 | static const OCUITextFieldDelegateKey OCUITextFieldDidChangeSelectionKey = @"OCUITextFieldDidChangeSelectionKey";
16 | static const OCUITextFieldDelegateKey OCUITextFieldShouldClearKey = @"OCUITextFieldShouldClearKey";
17 | static const OCUITextFieldDelegateKey OCUITextFieldShouldReturnKey = @"OCUITextFieldShouldReturnKey";
18 |
19 | @interface OCUITextFiledDelegateWrapper : NSObject
20 |
21 | @property(nonatomic, strong, readonly) NSMutableDictionary *delegateMap;
22 |
23 | @end
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/UIImagePickerController+RACSignalSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImagePickerController+RACSignalSupport.h
3 | // ReactiveObjC
4 | //
5 | // Created by Timur Kuchkarov on 28.03.14.
6 | // Copyright (c) 2014 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class RACDelegateProxy;
12 | @class RACSignal<__covariant ValueType>;
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @interface UIImagePickerController (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 every new selected image.
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 considered
28 | /// undefined behavior.
29 | ///
30 | /// Returns a signal which will send the dictionary with info for the selected image.
31 | /// Caller is responsible for picker controller dismissal. The signal will complete
32 | /// itself when the receiver is deallocated or when user cancels selection.
33 | - (RACSignal *)rac_imageSelectedSignal;
34 |
35 | @end
36 |
37 | NS_ASSUME_NONNULL_END
38 |
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/RACEmptySignal.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACEmptySignal.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 "RACEmptySignal.h"
10 | #import "RACScheduler+Private.h"
11 | #import "RACSubscriber.h"
12 |
13 | @implementation RACEmptySignal
14 |
15 | #pragma mark Properties
16 |
17 | // Only allow this signal's name to be customized in DEBUG, since it's
18 | // a singleton in release builds (see +empty).
19 | - (void)setName:(NSString *)name {
20 | #ifdef DEBUG
21 | [super setName:name];
22 | #endif
23 | }
24 |
25 | - (NSString *)name {
26 | #ifdef DEBUG
27 | return super.name;
28 | #else
29 | return @"+empty";
30 | #endif
31 | }
32 |
33 | #pragma mark Lifecycle
34 |
35 | + (RACSignal *)empty {
36 | #ifdef DEBUG
37 | // Create multiple instances of this class in DEBUG so users can set custom
38 | // names on each.
39 | return [[[self alloc] init] setNameWithFormat:@"+empty"];
40 | #else
41 | static id singleton;
42 | static dispatch_once_t pred;
43 |
44 | dispatch_once(&pred, ^{
45 | singleton = [[self alloc] init];
46 | });
47 |
48 | return singleton;
49 | #endif
50 | }
51 |
52 | #pragma mark Subscription
53 |
54 | - (RACDisposable *)subscribe:(id)subscriber {
55 | NSCParameterAssert(subscriber != nil);
56 |
57 | return [RACScheduler.subscriptionScheduler schedule:^{
58 | [subscriber sendCompleted];
59 | }];
60 | }
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIControl+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 "UIControl+RACSignalSupport.h"
10 | #import
11 | #import "RACCompoundDisposable.h"
12 | #import "RACDisposable.h"
13 | #import "RACSignal.h"
14 | #import "RACSubscriber.h"
15 | #import "NSObject+RACDeallocating.h"
16 | #import "NSObject+RACDescription.h"
17 |
18 | @implementation UIControl (RACSignalSupport)
19 |
20 | - (RACSignal *)rac_signalForControlEvents:(UIControlEvents)controlEvents {
21 | @weakify(self);
22 |
23 | return [[RACSignal
24 | createSignal:^(id subscriber) {
25 | @strongify(self);
26 |
27 | [self addTarget:subscriber action:@selector(sendNext:) forControlEvents:controlEvents];
28 |
29 | RACDisposable *disposable = [RACDisposable disposableWithBlock:^{
30 | [subscriber sendCompleted];
31 | }];
32 | [self.rac_deallocDisposable addDisposable:disposable];
33 |
34 | return [RACDisposable disposableWithBlock:^{
35 | @strongify(self);
36 | [self.rac_deallocDisposable removeDisposable:disposable];
37 | [self removeTarget:subscriber action:@selector(sendNext:) forControlEvents:controlEvents];
38 | }];
39 | }]
40 | setNameWithFormat:@"%@ -rac_signalForControlEvents: %lx", RACDescription(self), (unsigned long)controlEvents];
41 | }
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Example/Pods/Masonry/Masonry/ViewController+MASAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.m
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "ViewController+MASAdditions.h"
10 |
11 | #ifdef MAS_VIEW_CONTROLLER
12 |
13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions)
14 |
15 | - (MASViewAttribute *)mas_topLayoutGuide {
16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
17 | }
18 | - (MASViewAttribute *)mas_topLayoutGuideTop {
19 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop];
20 | }
21 | - (MASViewAttribute *)mas_topLayoutGuideBottom {
22 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
23 | }
24 |
25 | - (MASViewAttribute *)mas_bottomLayoutGuide {
26 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
27 | }
28 | - (MASViewAttribute *)mas_bottomLayoutGuideTop {
29 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
30 | }
31 | - (MASViewAttribute *)mas_bottomLayoutGuideBottom {
32 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
33 | }
34 |
35 |
36 |
37 | @end
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/Example/Pods/Masonry/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASViewConstraint.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 "MASViewAttribute.h"
10 | #import "MASConstraint.h"
11 | #import "MASLayoutConstraint.h"
12 | #import "MASUtilities.h"
13 |
14 | /**
15 | * A single constraint.
16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view
17 | */
18 | @interface MASViewConstraint : MASConstraint
19 |
20 | /**
21 | * First item/view and first attribute of the NSLayoutConstraint
22 | */
23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute;
24 |
25 | /**
26 | * Second item/view and second attribute of the NSLayoutConstraint
27 | */
28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute;
29 |
30 | /**
31 | * initialises the MASViewConstraint with the first part of the equation
32 | *
33 | * @param firstViewAttribute view.mas_left, view.mas_width etc.
34 | *
35 | * @return a new view constraint
36 | */
37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute;
38 |
39 | /**
40 | * Returns all MASViewConstraints installed with this view as a first item.
41 | *
42 | * @param view A view to retrieve constraints for.
43 | *
44 | * @return An array of MASViewConstraints.
45 | */
46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/RACBehaviorSubject.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACBehaviorSubject.m
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 "RACBehaviorSubject.h"
10 | #import "RACDisposable.h"
11 | #import "RACScheduler+Private.h"
12 |
13 | @interface RACBehaviorSubject ()
14 |
15 | // This property should only be used while synchronized on self.
16 | @property (nonatomic, strong) ValueType currentValue;
17 |
18 | @end
19 |
20 | @implementation RACBehaviorSubject
21 |
22 | #pragma mark Lifecycle
23 |
24 | + (instancetype)behaviorSubjectWithDefaultValue:(id)value {
25 | RACBehaviorSubject *subject = [self subject];
26 | subject.currentValue = value;
27 | return subject;
28 | }
29 |
30 | #pragma mark RACSignal
31 |
32 | - (RACDisposable *)subscribe:(id)subscriber {
33 | RACDisposable *subscriptionDisposable = [super subscribe:subscriber];
34 |
35 | RACDisposable *schedulingDisposable = [RACScheduler.subscriptionScheduler schedule:^{
36 | @synchronized (self) {
37 | [subscriber sendNext:self.currentValue];
38 | }
39 | }];
40 |
41 | return [RACDisposable disposableWithBlock:^{
42 | [subscriptionDisposable dispose];
43 | [schedulingDisposable dispose];
44 | }];
45 | }
46 |
47 | #pragma mark RACSubscriber
48 |
49 | - (void)sendNext:(id)value {
50 | @synchronized (self) {
51 | self.currentValue = value;
52 | [super sendNext:value];
53 | }
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/RACImmediateScheduler.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACImmediateScheduler.m
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 "RACImmediateScheduler.h"
10 | #import "RACScheduler+Private.h"
11 |
12 | @implementation RACImmediateScheduler
13 |
14 | #pragma mark Lifecycle
15 |
16 | - (instancetype)init {
17 | return [super initWithName:@"org.reactivecocoa.ReactiveObjC.RACScheduler.immediateScheduler"];
18 | }
19 |
20 | #pragma mark RACScheduler
21 |
22 | - (RACDisposable *)schedule:(void (^)(void))block {
23 | NSCParameterAssert(block != NULL);
24 |
25 | block();
26 | return nil;
27 | }
28 |
29 | - (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block {
30 | NSCParameterAssert(date != nil);
31 | NSCParameterAssert(block != NULL);
32 |
33 | [NSThread sleepUntilDate:date];
34 | block();
35 |
36 | return nil;
37 | }
38 |
39 | - (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block {
40 | NSCAssert(NO, @"+[RACScheduler immediateScheduler] does not support %@.", NSStringFromSelector(_cmd));
41 | return nil;
42 | }
43 |
44 | - (RACDisposable *)scheduleRecursiveBlock:(RACSchedulerRecursiveBlock)recursiveBlock {
45 | for (__block NSUInteger remaining = 1; remaining > 0; remaining--) {
46 | recursiveBlock(^{
47 | remaining++;
48 | });
49 | }
50 |
51 | return nil;
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUIPadding.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import "OCUIPadding.h"
6 |
7 | @interface OCUIPadding ()
8 |
9 | @end
10 |
11 | @implementation OCUIPadding
12 |
13 | + (OCUIPadding *(^)(UIView *view))objc_create {
14 | return ^OCUIPadding *(UIView *view) {
15 | OCUIPadding *padding = [[OCUIPadding alloc] init];
16 | padding.entityView = view;
17 | return padding;
18 | };
19 | }
20 |
21 | - (OCUIPadding *(^)(CGFloat left))objc_left {
22 | return ^OCUIPadding *(CGFloat left) {
23 | self.ocui_layoutMap[@(OCUILayoutLeftType)] = @(left);
24 | return self;
25 | };
26 | }
27 |
28 | - (OCUIPadding *(^)(CGFloat right))objc_right {
29 | return ^OCUIPadding *(CGFloat right) {
30 | self.ocui_layoutMap[@(OCUILayoutRightType)] = @(right);
31 | return self;
32 | };
33 | }
34 |
35 | - (OCUIPadding *(^)(CGFloat top))objc_top {
36 | return ^OCUIPadding *(CGFloat top) {
37 | self.ocui_layoutMap[@(OCUILayoutTopType)] = @(top);
38 | return self;
39 | };
40 | }
41 |
42 | - (OCUIPadding *(^)(CGFloat bottom))objc_bottom {
43 | return ^OCUIPadding *(CGFloat bottom) {
44 | self.ocui_layoutMap[@(OCUILayoutBottomType)] = @(bottom);
45 | return self;
46 | };
47 | }
48 |
49 | - (OCUIPadding *(^)(UIView *child))objc_child {
50 | return ^OCUIPadding *(UIView *child) {
51 | self.childView = child;
52 | [self objc_layout];
53 | return self;
54 | };
55 | }
56 |
57 | @end
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/RACQueueScheduler+Subclass.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACQueueScheduler+Subclass.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 | #import "RACScheduler+Subclass.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /// An interface for use by GCD queue-based subclasses.
15 | ///
16 | /// See RACScheduler+Subclass.h for subclassing notes.
17 | @interface RACQueueScheduler ()
18 |
19 | /// The queue on which blocks are enqueued.
20 | #if OS_OBJECT_USE_OBJC
21 | @property (nonatomic, strong, readonly) dispatch_queue_t queue;
22 | #else
23 | // Swift builds with OS_OBJECT_HAVE_OBJC_SUPPORT=0 for Playgrounds and LLDB :(
24 | @property (nonatomic, assign, readonly) dispatch_queue_t queue;
25 | #endif
26 |
27 | /// Initializes the receiver with the name of the scheduler and the queue which
28 | /// the scheduler should use.
29 | ///
30 | /// name - The name of the scheduler. If nil, a default name will be used.
31 | /// queue - The queue upon which the receiver should enqueue scheduled blocks.
32 | /// This argument must not be NULL.
33 | ///
34 | /// Returns the initialized object.
35 | - (instancetype)initWithName:(nullable NSString *)name queue:(dispatch_queue_t)queue;
36 |
37 | /// Converts a date into a GCD time using dispatch_walltime().
38 | ///
39 | /// date - The date to convert. This must not be nil.
40 | + (dispatch_time_t)wallTimeWithDate:(NSDate *)date;
41 |
42 | @end
43 |
44 | NS_ASSUME_NONNULL_END
45 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/UIButton+ObjcUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/16.
3 | //
4 |
5 | #import
6 | #import "OCUIKitDefine.h"
7 |
8 | @interface UIButton (ObjcUI)
9 |
10 | - (UIButton *(^)(UIControlState state, NSString *title))objc_title;
11 |
12 | - (UIButton *(^)(UIControlState state, UIColor *titleColor))objc_titleColor;
13 |
14 | - (UIButton *(^)(UIControlState state, UIColor *titleShadowColor))objc_titleShadowColor;
15 |
16 | - (UIButton *(^)(UIControlState state, UIImage *image))objc_image;
17 |
18 | - (UIButton *(^)(UIControlState state, UIImage *backgroundImage))objc_backgroundImage;
19 |
20 | - (UIButton *(^)(UIControlState state, UIImageSymbolConfiguration *configuration))objc_preferredSymbolConfiguration;
21 |
22 | - (UIButton *(^)(UIControlState state, NSAttributedString *attributedString))objc_attributedTitle;
23 |
24 | - (UIButton *(^)(UIEdgeInsets contentEdgeInsets))objc_contentEdgeInsets;
25 |
26 | - (UIButton *(^)(UIEdgeInsets titleEdgeInsets))objc_titleEdgeInsets;
27 |
28 | - (UIButton *(^)(BOOL reversesTitleShadowWhenHighlighted))objc_reversesTitleShadowWhenHighlighted;
29 |
30 | - (UIButton *(^)(UIEdgeInsets imageEdgeInsets))objc_imageEdgeInsets;
31 |
32 | - (UIButton *(^)(BOOL adjustsImageWhenHighlighted))objc_adjustsImageWhenHighlighted;
33 |
34 | - (UIButton *(^)(BOOL adjustsImageWhenDisabled))objc_adjustsImageWhenDisabled;
35 |
36 | - (UIButton *(^)(BOOL showsTouchWhenHighlighted))objc_showsTouchWhenHighlighted;
37 |
38 |
39 | OCUIViewChildHeaderCreate(UIButton);
40 | OCUIControlChildHeaderCreate(UIButton);
41 |
42 | @end
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/RACTestScheduler.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACTestScheduler.h
3 | // ReactiveObjC
4 | //
5 | // Created by Justin Spahr-Summers on 2013-07-06.
6 | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
7 | //
8 |
9 | #import "RACScheduler.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /// A special kind of scheduler that steps through virtualized time.
14 | ///
15 | /// This scheduler class can be used in unit tests to verify asynchronous
16 | /// behaviors without spending significant time waiting.
17 | ///
18 | /// This class can be used from multiple threads, but only one thread can `step`
19 | /// through the enqueued actions at a time. Other threads will wait while the
20 | /// scheduled blocks are being executed.
21 | @interface RACTestScheduler : RACScheduler
22 |
23 | /// Initializes a new test scheduler.
24 | - (instancetype)init;
25 |
26 | /// Executes the next scheduled block, if any.
27 | ///
28 | /// This method will block until the scheduled action has completed.
29 | - (void)step;
30 |
31 | /// Executes up to the next `ticks` scheduled blocks.
32 | ///
33 | /// This method will block until the scheduled actions have completed.
34 | ///
35 | /// ticks - The number of scheduled blocks to execute. If there aren't this many
36 | /// blocks enqueued, all scheduled blocks are executed.
37 | - (void)step:(NSUInteger)ticks;
38 |
39 | /// Executes all of the scheduled blocks on the receiver.
40 | ///
41 | /// This method will block until the scheduled actions have completed.
42 | - (void)stepAll;
43 |
44 | @end
45 |
46 | NS_ASSUME_NONNULL_END
47 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/TableView/OCUITableViewDropDelegateWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/19.
3 | //
4 |
5 | #import
6 |
7 | typedef NSString *OCUITableViewDropDelegateKey NS_EXTENSIBLE_STRING_ENUM;
8 |
9 | static const OCUITableViewDropDelegateKey OCUITableViewDropDelegatePerformDropWithCoordinatorKey = @"OCUITableViewDropDelegatePerformDropWithCoordinatorKey";
10 | static const OCUITableViewDropDelegateKey OCUITableViewDropDelegatePerformCanHandleDropSessionKey = @"OCUITableViewDropDelegatePerformCanHandleDropSessionKey";
11 | static const OCUITableViewDropDelegateKey OCUITableViewDropDelegatePerformDropSessionDidEnterKey = @"OCUITableViewDropDelegatePerformDropSessionDidEnterKey";
12 | static const OCUITableViewDropDelegateKey OCUITableViewDropDelegatePerformDropSessionDidUpdateWithDestinationIndexPathKey = @"OCUITableViewDropDelegatePerformDropSessionDidUpdateWithDestinationIndexPathKey";
13 | static const OCUITableViewDropDelegateKey OCUITableViewDropDelegateDropSessionDidExitKey = @"OCUITableViewDropDelegateDropSessionDidExitKey";
14 | static const OCUITableViewDropDelegateKey OCUITableViewDropDelegateDropSessionDidEndKey = @"OCUITableViewDropDelegateDropSessionDidEndKey";
15 | static const OCUITableViewDropDelegateKey OCUITableViewDropDelegateDropPreviewParametersForRowAtIndexPathKey = @"OCUITableViewDropDelegateDropPreviewParametersForRowAtIndexPathKey";
16 |
17 | @interface OCUITableViewDropDelegateWrapper : NSObject
18 |
19 | @property(nonatomic, strong, readonly) NSMutableDictionary *delegateMap;
20 |
21 | @end
--------------------------------------------------------------------------------
/Example/ObjCUI/Feature/OCUITableViewTestVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/20.
3 | // Copyright (c) 2020 沈晓敏. All rights reserved.
4 | //
5 |
6 | #import "OCUITableViewTestVC.h"
7 | #import "UITableView+ObjcUI.h"
8 | #import
9 |
10 |
11 | @interface OCUITableViewTestVC ()
12 | @end
13 |
14 | @implementation OCUITableViewTestVC
15 |
16 | - (void)dealloc {
17 | NSLog(@"OCUITableViewTestVC is safe");
18 | }
19 |
20 | - (void)loadView {
21 | self.view = UITableView
22 | .objc_create()
23 | .objc_registerClassForCellReuseIdentifier([UITableViewCell class], @"cell")
24 | .objc_numberOfRowsInSection(^NSInteger(UITableView *tableView, NSInteger section) {
25 | return 100;
26 | })
27 | .objc_cellForRowAtIndexPath(^UITableViewCell *(UITableView *tableView, NSIndexPath *indexPath) {
28 | UITableViewCell *tableViewCell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
29 | tableViewCell.textLabel.text = @(indexPath.row).stringValue;
30 | return tableViewCell;
31 | })
32 | .objc_heightForRowAtIndexPath(^CGFloat(UITableView *tableView, NSIndexPath *indexPath) {
33 | return indexPath.row % 2 == 0 ? 50 : 100;
34 | })
35 | .objc_didSelectRowAtIndexPath(^(UITableView *tableView, NSIndexPath *indexPath) {
36 | [tableView deselectRowAtIndexPath:indexPath animated:YES];
37 | NSLog(@"did select At index path row : %zd", indexPath.row);
38 | });
39 |
40 | }
41 |
42 | @end
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/TableView/OCUITableViewDragDelegateWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/19.
3 | //
4 |
5 | #import
6 |
7 | typedef NSString *OCUITableViewDragDelegateKey NS_EXTENSIBLE_STRING_ENUM;
8 |
9 | static const OCUITableViewDragDelegateKey OCUITableViewDelegateItemsForBeginningDragSessionAtIndexPathKey = @"OCUITableViewDelegateItemsForBeginningDragSessionAtIndexPathKey";
10 | static const OCUITableViewDragDelegateKey OCUITableViewDelegateItemsForAddingToDragSessionAtIndexPathPointKey = @"OCUITableViewDelegateItemsForAddingToDragSessionAtIndexPathPointKey";
11 | static const OCUITableViewDragDelegateKey OCUITableViewDelegateDragPreviewParametersForRowAtIndexPathKey = @"OCUITableViewDelegateDragPreviewParametersForRowAtIndexPathKey";
12 | static const OCUITableViewDragDelegateKey OCUITableViewDelegateDragSessionWillBeginKey = @"OCUITableViewDelegateDragSessionWillBeginKey";
13 | static const OCUITableViewDragDelegateKey OCUITableViewDelegateDragSessionDidEndKey = @"OCUITableViewDelegateDragSessionDidEndKey";
14 | static const OCUITableViewDragDelegateKey OCUITableViewDelegateDragSessionAllowsMoveOperationKey = @"OCUITableViewDelegateDragSessionAllowsMoveOperationKey";
15 | static const OCUITableViewDragDelegateKey OCUITableViewDelegateDragSessionIsRestrictedToDraggingApplicationKey = @"OCUITableViewDelegateDragSessionIsRestrictedToDraggingApplicationKey";
16 |
17 |
18 | @interface OCUITableViewDragDelegateWrapper : NSObject
19 |
20 | @property(nonatomic, strong, readonly) NSMutableDictionary *delegateMap;
21 |
22 | @end
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/UIActionSheet+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIActionSheet+RACSignalSupport.m
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 "UIActionSheet+RACSignalSupport.h"
10 | #import "RACDelegateProxy.h"
11 | #import "RACSignal+Operations.h"
12 | #import "NSObject+RACDeallocating.h"
13 | #import "NSObject+RACDescription.h"
14 | #import
15 |
16 | @implementation UIActionSheet (RACSignalSupport)
17 |
18 | static void RACUseDelegateProxy(UIActionSheet *self) {
19 | if (self.delegate == self.rac_delegateProxy) return;
20 |
21 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate;
22 | self.delegate = (id)self.rac_delegateProxy;
23 | }
24 |
25 | - (RACDelegateProxy *)rac_delegateProxy {
26 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd);
27 | if (proxy == nil) {
28 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIActionSheetDelegate)];
29 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
30 | }
31 |
32 | return proxy;
33 | }
34 |
35 | - (RACSignal *)rac_buttonClickedSignal {
36 | RACSignal *signal = [[[[self.rac_delegateProxy
37 | signalForSelector:@selector(actionSheet:clickedButtonAtIndex:)]
38 | reduceEach:^(UIActionSheet *actionSheet, NSNumber *buttonIndex) {
39 | return buttonIndex;
40 | }]
41 | takeUntil:self.rac_willDeallocSignal]
42 | setNameWithFormat:@"%@ -rac_buttonClickedSignal", RACDescription(self)];
43 |
44 | RACUseDelegateProxy(self);
45 |
46 | return signal;
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/Layout/OCUIBasicLayout.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import "OCUIBasicLayout.h"
6 | #import
7 | #import
8 | #import "UIView+Layout.h"
9 | #import "OCUILayoutHelper.h"
10 |
11 |
12 | @interface OCUIBasicLayout ()
13 |
14 | @property(nonatomic, strong) NSMutableArray *layoutChildren;
15 |
16 | @end
17 |
18 | @implementation OCUIBasicLayout
19 |
20 | @synthesize ocui_layoutMap = _ocui_layoutMap;
21 |
22 | - (void)objc_layout {
23 | [self objc_layoutWithMaker:nil];
24 | }
25 |
26 | - (void)objc_layoutWithMaker:(void(^)(MASConstraintMaker *))objc_maker {
27 | [self.entityView addSubview:self.childView];
28 | [self.childView mas_makeConstraints:^(MASConstraintMaker *maker) {
29 | [OCUILayoutHelper autoLayoutWithMap:self.ocui_layoutMap maker:maker superView:self.entityView];
30 | if (objc_maker) {
31 | objc_maker(maker);
32 | }
33 | }];
34 | }
35 |
36 | #pragma mark - Interface
37 |
38 | - (OCUIContainerType)containerType {
39 | return OCUIContainerLayoutType;
40 | }
41 |
42 | #pragma mark - Set & Get
43 |
44 | - (void)setOcui_layoutMap:(NSMutableDictionary *)ocui_layoutMap {
45 | _ocui_layoutMap = [ocui_layoutMap mutableCopy];
46 | }
47 |
48 | - (NSMutableDictionary *)ocui_layoutMap {
49 | if (!_ocui_layoutMap) {
50 | _ocui_layoutMap = [NSMutableDictionary dictionary];
51 | }
52 | return _ocui_layoutMap;
53 | }
54 |
55 | - (NSMutableArray *)layoutChildren {
56 | if (!_layoutChildren) {
57 | _layoutChildren = [NSMutableArray array];
58 | }
59 | return _layoutChildren;
60 | }
61 |
62 | @end
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/UIControl+RACSignalSupportPrivate.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIControl+RACSignalSupportPrivate.m
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 "UIControl+RACSignalSupportPrivate.h"
10 | #import "NSObject+RACDeallocating.h"
11 | #import "NSObject+RACLifting.h"
12 | #import "RACChannel.h"
13 | #import "RACCompoundDisposable.h"
14 | #import "RACDisposable.h"
15 | #import "RACSignal+Operations.h"
16 | #import "UIControl+RACSignalSupport.h"
17 |
18 | @implementation UIControl (RACSignalSupportPrivate)
19 |
20 | - (RACChannelTerminal *)rac_channelForControlEvents:(UIControlEvents)controlEvents key:(NSString *)key nilValue:(id)nilValue {
21 | NSCParameterAssert(key.length > 0);
22 | key = [key copy];
23 | RACChannel *channel = [[RACChannel alloc] init];
24 |
25 | [self.rac_deallocDisposable addDisposable:[RACDisposable disposableWithBlock:^{
26 | [channel.followingTerminal sendCompleted];
27 | }]];
28 |
29 | RACSignal *eventSignal = [[[self
30 | rac_signalForControlEvents:controlEvents]
31 | mapReplace:key]
32 | takeUntil:[[channel.followingTerminal
33 | ignoreValues]
34 | catchTo:RACSignal.empty]];
35 | [[self
36 | rac_liftSelector:@selector(valueForKey:) withSignals:eventSignal, nil]
37 | subscribe:channel.followingTerminal];
38 |
39 | RACSignal *valuesSignal = [channel.followingTerminal
40 | map:^(id value) {
41 | return value ?: nilValue;
42 | }];
43 | [self rac_liftSelector:@selector(setValue:forKey:) withSignals:valuesSignal, [RACSignal return:key], nil];
44 |
45 | return channel.leadingTerminal;
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/RACEmptySequence.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACEmptySequence.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 "RACEmptySequence.h"
10 |
11 | @implementation RACEmptySequence
12 |
13 | #pragma mark Lifecycle
14 |
15 | + (instancetype)empty {
16 | static id singleton;
17 | static dispatch_once_t pred;
18 |
19 | dispatch_once(&pred, ^{
20 | singleton = [[self alloc] init];
21 | });
22 |
23 | return singleton;
24 | }
25 |
26 | #pragma mark RACSequence
27 |
28 | - (id)head {
29 | return nil;
30 | }
31 |
32 | - (RACSequence *)tail {
33 | return nil;
34 | }
35 |
36 | - (RACSequence *)bind:(RACStreamBindBlock)bindBlock passingThroughValuesFromSequence:(RACSequence *)passthroughSequence {
37 | return passthroughSequence ?: self;
38 | }
39 |
40 | #pragma mark NSCoding
41 |
42 | - (Class)classForCoder {
43 | // Empty sequences should be encoded as themselves, not array sequences.
44 | return self.class;
45 | }
46 |
47 | - (instancetype)initWithCoder:(NSCoder *)coder {
48 | // Return the singleton.
49 | return self.class.empty;
50 | }
51 |
52 | - (void)encodeWithCoder:(NSCoder *)coder {
53 | }
54 |
55 | #pragma mark NSObject
56 |
57 | - (NSString *)description {
58 | return [NSString stringWithFormat:@"<%@: %p>{ name = %@ }", self.class, self, self.name];
59 | }
60 |
61 | - (NSUInteger)hash {
62 | // This hash isn't ideal, but it's better than -[RACSequence hash], which
63 | // would just be zero because we have no head.
64 | return (NSUInteger)(__bridge void *)self;
65 | }
66 |
67 | - (BOOL)isEqual:(RACSequence *)seq {
68 | return (self == seq);
69 | }
70 |
71 | @end
72 |
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/RACSubscriptionScheduler.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACSubscriptionScheduler.m
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 "RACSubscriptionScheduler.h"
10 | #import "RACScheduler+Private.h"
11 |
12 | @interface RACSubscriptionScheduler ()
13 |
14 | // A private background scheduler on which to subscribe if the +currentScheduler
15 | // is unknown.
16 | @property (nonatomic, strong, readonly) RACScheduler *backgroundScheduler;
17 |
18 | @end
19 |
20 | @implementation RACSubscriptionScheduler
21 |
22 | #pragma mark Lifecycle
23 |
24 | - (instancetype)init {
25 | self = [super initWithName:@"org.reactivecocoa.ReactiveObjC.RACScheduler.subscriptionScheduler"];
26 |
27 | _backgroundScheduler = [RACScheduler scheduler];
28 |
29 | return self;
30 | }
31 |
32 | #pragma mark RACScheduler
33 |
34 | - (RACDisposable *)schedule:(void (^)(void))block {
35 | NSCParameterAssert(block != NULL);
36 |
37 | if (RACScheduler.currentScheduler == nil) return [self.backgroundScheduler schedule:block];
38 |
39 | block();
40 | return nil;
41 | }
42 |
43 | - (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block {
44 | RACScheduler *scheduler = RACScheduler.currentScheduler ?: self.backgroundScheduler;
45 | return [scheduler after:date schedule:block];
46 | }
47 |
48 | - (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block {
49 | RACScheduler *scheduler = RACScheduler.currentScheduler ?: self.backgroundScheduler;
50 | return [scheduler after:date repeatingEvery:interval withLeeway:leeway schedule:block];
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/UITextView+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UITextView+RACSignalSupport.m
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 "UITextView+RACSignalSupport.h"
10 | #import
11 | #import "NSObject+RACDeallocating.h"
12 | #import "NSObject+RACDescription.h"
13 | #import "RACDelegateProxy.h"
14 | #import "RACSignal+Operations.h"
15 | #import "RACTuple.h"
16 | #import
17 |
18 | @implementation UITextView (RACSignalSupport)
19 |
20 | static void RACUseDelegateProxy(UITextView *self) {
21 | if (self.delegate == self.rac_delegateProxy) return;
22 |
23 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate;
24 | self.delegate = (id)self.rac_delegateProxy;
25 | }
26 |
27 | - (RACDelegateProxy *)rac_delegateProxy {
28 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd);
29 | if (proxy == nil) {
30 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UITextViewDelegate)];
31 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
32 | }
33 |
34 | return proxy;
35 | }
36 |
37 | - (RACSignal *)rac_textSignal {
38 | @weakify(self);
39 | RACSignal *signal = [[[[[RACSignal
40 | defer:^{
41 | @strongify(self);
42 | return [RACSignal return:RACTuplePack(self)];
43 | }]
44 | concat:[self.rac_delegateProxy signalForSelector:@selector(textViewDidChange:)]]
45 | reduceEach:^(UITextView *x) {
46 | return x.text;
47 | }]
48 | takeUntil:self.rac_willDeallocSignal]
49 | setNameWithFormat:@"%@ -rac_textSignal", RACDescription(self)];
50 |
51 | RACUseDelegateProxy(self);
52 |
53 | return signal;
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/NSUserDefaults+RACSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSUserDefaults+RACSupport.m
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 "NSUserDefaults+RACSupport.h"
10 | #import
11 | #import "NSNotificationCenter+RACSupport.h"
12 | #import "NSObject+RACDeallocating.h"
13 | #import "RACChannel.h"
14 | #import "RACScheduler.h"
15 | #import "RACSignal+Operations.h"
16 |
17 | @implementation NSUserDefaults (RACSupport)
18 |
19 | - (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key {
20 | NSParameterAssert(key != nil);
21 |
22 | RACChannel *channel = [RACChannel new];
23 |
24 | RACScheduler *scheduler = [RACScheduler scheduler];
25 | __block BOOL ignoreNextValue = NO;
26 |
27 | @weakify(self);
28 | [[[[[[[NSNotificationCenter.defaultCenter
29 | rac_addObserverForName:NSUserDefaultsDidChangeNotification object:self]
30 | map:^(id _) {
31 | @strongify(self);
32 | return [self objectForKey:key];
33 | }]
34 | startWith:[self objectForKey:key]]
35 | // Don't send values that were set on the other side of the terminal.
36 | filter:^ BOOL (id _) {
37 | if (RACScheduler.currentScheduler == scheduler && ignoreNextValue) {
38 | ignoreNextValue = NO;
39 | return NO;
40 | }
41 | return YES;
42 | }]
43 | distinctUntilChanged]
44 | takeUntil:self.rac_willDeallocSignal]
45 | subscribe:channel.leadingTerminal];
46 |
47 | [[channel.leadingTerminal
48 | deliverOn:scheduler]
49 | subscribeNext:^(id value) {
50 | @strongify(self);
51 | ignoreNextValue = YES;
52 | [self setObject:value forKey:key];
53 | }];
54 |
55 | return channel.followingTerminal;
56 | }
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/Example/ObjCUI/ObjCUI-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/RACDynamicSignal.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACDynamicSignal.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 "RACDynamicSignal.h"
10 | #import
11 | #import "RACCompoundDisposable.h"
12 | #import "RACPassthroughSubscriber.h"
13 | #import "RACScheduler+Private.h"
14 | #import "RACSubscriber.h"
15 | #import
16 |
17 | @interface RACDynamicSignal ()
18 |
19 | // The block to invoke for each subscriber.
20 | @property (nonatomic, copy, readonly) RACDisposable * (^didSubscribe)(id subscriber);
21 |
22 | @end
23 |
24 | @implementation RACDynamicSignal
25 |
26 | #pragma mark Lifecycle
27 |
28 | + (RACSignal *)createSignal:(RACDisposable * (^)(id subscriber))didSubscribe {
29 | RACDynamicSignal *signal = [[self alloc] init];
30 | signal->_didSubscribe = [didSubscribe copy];
31 | return [signal setNameWithFormat:@"+createSignal:"];
32 | }
33 |
34 | #pragma mark Managing Subscribers
35 |
36 | - (RACDisposable *)subscribe:(id)subscriber {
37 | NSCParameterAssert(subscriber != nil);
38 |
39 | RACCompoundDisposable *disposable = [RACCompoundDisposable compoundDisposable];
40 | subscriber = [[RACPassthroughSubscriber alloc] initWithSubscriber:subscriber signal:self disposable:disposable];
41 |
42 | if (self.didSubscribe != NULL) {
43 | RACDisposable *schedulingDisposable = [RACScheduler.subscriptionScheduler schedule:^{
44 | RACDisposable *innerDisposable = self.didSubscribe(subscriber);
45 | [disposable addDisposable:innerDisposable];
46 | }];
47 |
48 | [disposable addDisposable:schedulingDisposable];
49 | }
50 |
51 | return disposable;
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ObjCUI/ObjCUI-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "OCLayout.h"
14 | #import "OCLayoutDefine.h"
15 | #import "OCUIBasicLayout.h"
16 | #import "OCUICenter.h"
17 | #import "OCUIColumn.h"
18 | #import "OCUILayoutEnum.h"
19 | #import "OCUILayoutHelper.h"
20 | #import "OCUILayoutInterface.h"
21 | #import "OCUIPadding.h"
22 | #import "OCUIRow.h"
23 | #import "OCUISizeBox.h"
24 | #import "OCUIStack.h"
25 | #import "UIView+Layout.h"
26 | #import "ObjCUI.h"
27 | #import "OCUIKit.h"
28 | #import "OCUIKitDefine.h"
29 | #import "UIButton+ObjcUI.h"
30 | #import "UIControl+ObjcUI.h"
31 | #import "UIDatePicker+ObjcUI.h"
32 | #import "UIImageView+ObjcUI.h"
33 | #import "UILabel+ObjcUI.h"
34 | #import "UIPickerView+ObjcUI.h"
35 | #import "UIScrollView+ObjcUI.h"
36 | #import "UISlider+ObjcUI.h"
37 | #import "UITableView+ObjcUI.h"
38 | #import "UITableViewCell+ObjcUI.h"
39 | #import "UITextField+ObjcUI.h"
40 | #import "UITextView+ObjcUI.h"
41 | #import "UIView+ObjcUI.h"
42 | #import "OCUIControlWrapper.h"
43 | #import "OCUIScrollViewDelegateWrapper.h"
44 | #import "OCUITextFiledDelegateWrapper.h"
45 | #import "OCUITextViewDelegateWrapper.h"
46 | #import "OCUIPickerViewDataSourceWrapper.h"
47 | #import "OCUIPickerViewDelegateWrapper.h"
48 | #import "OCUITableViewDataSourceWrapper.h"
49 | #import "OCUITableViewDelegateWrapper.h"
50 | #import "OCUITableViewDragDelegateWrapper.h"
51 | #import "OCUITableViewDropDelegateWrapper.h"
52 | #import "OCUITableViewPrefetchDataSourceWrapper.h"
53 |
54 | FOUNDATION_EXPORT double ObjCUIVersionNumber;
55 | FOUNDATION_EXPORT const unsigned char ObjCUIVersionString[];
56 |
57 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/wrapper/OCUITextViewDelegateWrapper.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/19.
3 | //
4 |
5 | #import
6 |
7 | typedef NSString *OCUITextViewDelegateKey NS_EXTENSIBLE_STRING_ENUM;
8 |
9 | static const OCUITextViewDelegateKey OCUITextViewShouldBeginEditingKey = @"OCUITextViewShouldBeginEditingKey";
10 | static const OCUITextViewDelegateKey OCUITextViewShouldEndEditingKey = @"OCUITextViewShouldEndEditingKey";
11 | static const OCUITextViewDelegateKey OCUITextViewDidBeginEditingKey = @"OCUITextViewDidBeginEditingKey";
12 | static const OCUITextViewDelegateKey OCUITextViewDidEndEditingKey = @"OCUITextViewDidEndEditingKey";
13 | static const OCUITextViewDelegateKey OCUITextViewShouldChangeTextInRangeReplacementTextKey = @"OCUITextViewShouldChangeTextInRangeReplacementTextKey";
14 | static const OCUITextViewDelegateKey OCUITextViewDidChangeKey = @"OCUITextViewDidChangeKey";
15 | static const OCUITextViewDelegateKey OCUITextViewDidChangeSelectionKey = @"OCUITextViewDidChangeSelectionKey";
16 | static const OCUITextViewDelegateKey OCUITextViewShouldInteractWithURLInRangeInteractionKey = @"OCUITextViewShouldInteractWithURLInRangeInteractionKey";
17 | static const OCUITextViewDelegateKey OCUITextViewShouldInteractWithTextAttachmentInRangeInteractionKey = @"OCUITextViewShouldInteractWithTextAttachmentInRangeInteractionKey";
18 | static const OCUITextViewDelegateKey OCUITextViewShouldInteractWithURLInRangeKey = @"OCUITextViewShouldInteractWithURLInRangeKey";
19 | static const OCUITextViewDelegateKey OCUITextViewShouldInteractWithTextAttachmentInRangeKey = @"OCUITextViewShouldInteractWithTextAttachmentInRangeKey";
20 |
21 |
22 | @interface OCUITextViewDelegateWrapper : NSObject
23 |
24 | @property(nonatomic, strong, readonly) NSMutableDictionary *delegateMap;
25 |
26 | @end
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/UIPickerView+ObjcUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/21.
3 | //
4 |
5 | #import
6 | #import "OCUIKitDefine.h"
7 |
8 | @interface UIPickerView (ObjcUI)
9 |
10 | - (UIPickerView *(^)())objc_reloadAllComponents;
11 |
12 | - (UIPickerView *(^)(NSInteger component))objc_reloadComponent;
13 |
14 | - (UIPickerView *(^)(NSInteger row,NSInteger component,BOOL animated))objc_selectRowInComponentAnimated;
15 |
16 | - (UIPickerView *(^)(NSInteger component))objc_selectedRowInComponent;
17 |
18 | OCUIViewChildHeaderCreate(UIPickerView);
19 |
20 | @end
21 |
22 | @interface UIPickerView (ObjcUIDataSource)
23 |
24 | - (UIPickerView *(^)(NSInteger(^)(UIPickerView *pickerView)))objc_numberOfComponentsInPickerView;
25 |
26 | - (UIPickerView *(^)(NSInteger(^)(UIPickerView *pickerView)))objc_numberOfRowsInComponent;
27 |
28 |
29 | @end
30 |
31 | @interface UIPickerView (ObjcUIDelegate)
32 |
33 | - (UIPickerView *(^)(CGFloat(^)(UIPickerView *pickerView, NSInteger component)))objc_widthForComponent;
34 |
35 | - (UIPickerView *(^)(CGFloat(^)(UIPickerView *pickerView, NSInteger component)))objc_rowHeightForComponent API_UNAVAILABLE(tvos);
36 |
37 | - (UIPickerView *(^)(NSString *(^)(UIPickerView *pickerView, NSInteger component)))objc_titleForRowForComponent API_UNAVAILABLE(tvos);
38 |
39 | - (UIPickerView *(^)(NSAttributedString *(^)(UIPickerView *pickerView,NSInteger row ,NSInteger component)))objc_attributedTitleForRowForComponent API_AVAILABLE(ios(6.0)) API_UNAVAILABLE(tvos);
40 |
41 | - (UIPickerView *(^)(UIView *(^)(UIPickerView *pickerView,NSInteger row ,NSInteger component,UIView *view)))objc_viewForRowForComponentReusingView API_UNAVAILABLE(tvos);
42 |
43 | - (UIPickerView *(^)(void (^)(UIPickerView *pickerView,NSInteger row ,NSInteger component)))objc_didSelectRowInComponent API_UNAVAILABLE(tvos);
44 |
45 | @end
46 |
47 |
--------------------------------------------------------------------------------
/ObjCUI/Classes/OCUIKit/UITableViewCell+ObjcUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by freedom on 2020/6/20.
3 | //
4 |
5 | #import
6 |
7 | @interface UITableViewCell (ObjcUI)
8 |
9 |
10 | + (UITableViewCell *(^)(UITableViewCellStyle style, NSString *reuseIdentifier))objc_create;
11 |
12 | - (UITableViewCell *(^)(UIView *backgroundView))objc_backgroundView;
13 |
14 | - (UITableViewCell *(^)(UIView *selectedBackgroundView))objc_selectedBackgroundView;
15 |
16 | - (UITableViewCell *(^)(UIView *multipleSelectionBackgroundView))objc_multipleSelectionBackgroundView;
17 |
18 | - (UITableViewCell *(^)(UITableViewCellSelectionStyle selectionStyle))objc_selectionStyle;
19 |
20 | - (UITableViewCell *(^)(BOOL selected, BOOL animated))objc_setSelectedAnimated;
21 |
22 | - (UITableViewCell *(^)(BOOL highlighted, BOOL animated))objc_setHighlightedAnimated;
23 |
24 | - (UITableViewCell *(^)(BOOL showsReorderControl))objc_showsReorderControl;
25 |
26 | - (UITableViewCell *(^)(BOOL shouldIndentWhileEditing))objc_shouldIndentWhileEditing;
27 |
28 | - (UITableViewCell *(^)(UITableViewCellAccessoryType accessoryType))objc_accessoryType;
29 |
30 | - (UITableViewCell *(^)(UIView *accessoryView))objc_accessoryView;
31 |
32 | - (UITableViewCell *(^)(UITableViewCellAccessoryType editingAccessoryType))objc_editingAccessoryType;
33 |
34 | - (UITableViewCell *(^)(UIView *editingAccessoryView))objc_editingAccessoryView;
35 |
36 | - (UITableViewCell *(^)(NSInteger indentationLevel))objc_indentationLevel;
37 |
38 | - (UITableViewCell *(^)(NSInteger indentationWidth))objc_indentationWidth;
39 |
40 | - (UITableViewCell *(^)(UIEdgeInsets separatorInset))objc_separatorInset;
41 |
42 | - (UITableViewCell *(^)(BOOL editing, BOOL animated))objc_setEditingAnimated;
43 |
44 | - (UITableViewCell *(^)(BOOL userInteractionEnabledWhileDragging))objc_userInteractionEnabledWhileDragging API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(tvos, watchos);
45 |
46 | @end
--------------------------------------------------------------------------------
/Example/Pods/ReactiveObjC/ReactiveObjC/UIImagePickerController+RACSignalSupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImagePickerController+RACSignalSupport.m
3 | // ReactiveObjC
4 | //
5 | // Created by Timur Kuchkarov on 28.03.14.
6 | // Copyright (c) 2014 GitHub. All rights reserved.
7 | //
8 |
9 | #import "UIImagePickerController+RACSignalSupport.h"
10 | #import "RACDelegateProxy.h"
11 | #import "RACSignal+Operations.h"
12 | #import "NSObject+RACDeallocating.h"
13 | #import "NSObject+RACDescription.h"
14 | #import
15 |
16 | @implementation UIImagePickerController (RACSignalSupport)
17 |
18 | static void RACUseDelegateProxy(UIImagePickerController *self) {
19 | if (self.delegate == self.rac_delegateProxy) return;
20 |
21 | self.rac_delegateProxy.rac_proxiedDelegate = self.delegate;
22 | self.delegate = (id)self.rac_delegateProxy;
23 | }
24 |
25 | - (RACDelegateProxy *)rac_delegateProxy {
26 | RACDelegateProxy *proxy = objc_getAssociatedObject(self, _cmd);
27 | if (proxy == nil) {
28 | proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UIImagePickerControllerDelegate)];
29 | objc_setAssociatedObject(self, _cmd, proxy, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
30 | }
31 |
32 | return proxy;
33 | }
34 |
35 | - (RACSignal *)rac_imageSelectedSignal {
36 | RACSignal *pickerCancelledSignal = [[self.rac_delegateProxy
37 | signalForSelector:@selector(imagePickerControllerDidCancel:)]
38 | merge:self.rac_willDeallocSignal];
39 |
40 | RACSignal *imagePickerSignal = [[[[self.rac_delegateProxy
41 | signalForSelector:@selector(imagePickerController:didFinishPickingMediaWithInfo:)]
42 | reduceEach:^(UIImagePickerController *pickerController, NSDictionary *userInfo) {
43 | return userInfo;
44 | }]
45 | takeUntil:pickerCancelledSignal]
46 | setNameWithFormat:@"%@ -rac_imageSelectedSignal", RACDescription(self)];
47 |
48 | RACUseDelegateProxy(self);
49 |
50 | return imagePickerSignal;
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------