├── MediaRecordPlay ├── JoyCoreMotion.h ├── JoyCoreMotion.m ├── JoyMediaRecordPlay.h ├── JoyMediaRecordPlay.m ├── JoyProgressView.h ├── JoyProgressView.m ├── JoyRecordView.h ├── JoyRecordView.m └── imageSources │ ├── LW_CameraFocus.png │ ├── LW_PhotoLibruary.png │ ├── LW_StartRecordVideo@2x.png │ ├── LW_StartRecordVideo@3x.png │ ├── LW_SwitchCamera.png │ ├── LW_SwitchCamera1.png │ ├── LW_Video_Down.png │ ├── LW_Video_FlashLight.png │ ├── trends_ preview_video_back@2x.png │ ├── trends_ preview_video_back@3x.png │ ├── trends_preview_video_done@2x.png │ └── trends_preview_video_done@3x.png ├── Podfile ├── Podfile.lock ├── Pods ├── Headers │ ├── Private │ │ ├── JoyTool │ │ │ ├── AVAudioSession+manager.h │ │ │ ├── CAAnimation+HCAnimation.h │ │ │ ├── CALayer+JoyLayer.h │ │ │ ├── Joy.h │ │ │ ├── JoyAlert.h │ │ │ ├── JoyBaseCell.h │ │ │ ├── JoyBaseModel.h │ │ │ ├── JoyBaseVC+Extention.h │ │ │ ├── JoyBaseVC.h │ │ │ ├── JoyCellBaseModel+Action.h │ │ │ ├── JoyCellBaseModel+Edit.h │ │ │ ├── JoyCellBaseModel.h │ │ │ ├── JoyCollectionView.h │ │ │ ├── JoyDatePickView.h │ │ │ ├── JoyImageCollectionViewCell.h │ │ │ ├── JoyInteractorBase.h │ │ │ ├── JoyLeftAvatarRightLabelCell.h │ │ │ ├── JoyLeftAvatarRightTopBottomLabel.h │ │ │ ├── JoyLeftIconCell.h │ │ │ ├── JoyLeftIconTopBottomLabelCell.h │ │ │ ├── JoyLeftLabelRightIconCell.h │ │ │ ├── JoyLeftLabelRightPlaceHolderLabelCell.h │ │ │ ├── JoyLeftLabelTextViewCell.h │ │ │ ├── JoyLeftMiddleRightLabelCell.h │ │ │ ├── JoyMiddleLabelCell.h │ │ │ ├── JoyNavProtocol.h │ │ │ ├── JoyNoDataBackView.h │ │ │ ├── JoyPickerView.h │ │ │ ├── JoyPresenterBase.h │ │ │ ├── JoyProtoCol.h │ │ │ ├── JoySectionBaseModel.h │ │ │ ├── JoySwitchCell.h │ │ │ ├── JoyTableAutoLayoutView.h │ │ │ ├── JoyTextCell.h │ │ │ ├── JoyTextNoLabelCell.h │ │ │ ├── JoyTool.h │ │ │ ├── JoyUISegementView.h │ │ │ ├── NSObject+JoyRouter.h │ │ │ ├── NSString+JoyCategory.h │ │ │ ├── TNACellModelProtocol.h │ │ │ ├── UIBarButtonItem+JoyBarItem.h │ │ │ ├── UIImage+Extension.h │ │ │ ├── UIImageView+JoyCategory.h │ │ │ ├── UITableViewCell+JoyCell.h │ │ │ ├── UITextField+JoyCategory.h │ │ │ └── UIView+JoyCategory.h │ │ └── Masonry │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── MASConstraint+Private.h │ │ │ ├── MASConstraint.h │ │ │ ├── MASConstraintMaker.h │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── MASUtilities.h │ │ │ ├── MASViewAttribute.h │ │ │ ├── MASViewConstraint.h │ │ │ ├── Masonry.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ │ ├── View+MASAdditions.h │ │ │ ├── View+MASShorthandAdditions.h │ │ │ └── ViewController+MASAdditions.h │ └── Public │ │ ├── JoyTool │ │ ├── AVAudioSession+manager.h │ │ ├── CAAnimation+HCAnimation.h │ │ ├── CALayer+JoyLayer.h │ │ ├── Joy.h │ │ ├── JoyAlert.h │ │ ├── JoyBaseCell.h │ │ ├── JoyBaseModel.h │ │ ├── JoyBaseVC+Extention.h │ │ ├── JoyBaseVC.h │ │ ├── JoyCellBaseModel+Action.h │ │ ├── JoyCellBaseModel+Edit.h │ │ ├── JoyCellBaseModel.h │ │ ├── JoyCollectionView.h │ │ ├── JoyDatePickView.h │ │ ├── JoyImageCollectionViewCell.h │ │ ├── JoyInteractorBase.h │ │ ├── JoyLeftAvatarRightLabelCell.h │ │ ├── JoyLeftAvatarRightTopBottomLabel.h │ │ ├── JoyLeftIconCell.h │ │ ├── JoyLeftIconTopBottomLabelCell.h │ │ ├── JoyLeftLabelRightIconCell.h │ │ ├── JoyLeftLabelRightPlaceHolderLabelCell.h │ │ ├── JoyLeftLabelTextViewCell.h │ │ ├── JoyLeftMiddleRightLabelCell.h │ │ ├── JoyMiddleLabelCell.h │ │ ├── JoyNavProtocol.h │ │ ├── JoyNoDataBackView.h │ │ ├── JoyPickerView.h │ │ ├── JoyPresenterBase.h │ │ ├── JoyProtoCol.h │ │ ├── JoySectionBaseModel.h │ │ ├── JoySwitchCell.h │ │ ├── JoyTableAutoLayoutView.h │ │ ├── JoyTextCell.h │ │ ├── JoyTextNoLabelCell.h │ │ ├── JoyTool.h │ │ ├── JoyUISegementView.h │ │ ├── NSObject+JoyRouter.h │ │ ├── NSString+JoyCategory.h │ │ ├── TNACellModelProtocol.h │ │ ├── UIBarButtonItem+JoyBarItem.h │ │ ├── UIImage+Extension.h │ │ ├── UIImageView+JoyCategory.h │ │ ├── UITableViewCell+JoyCell.h │ │ ├── UITextField+JoyCategory.h │ │ └── UIView+JoyCategory.h │ │ └── Masonry │ │ ├── MASCompositeConstraint.h │ │ ├── MASConstraint+Private.h │ │ ├── MASConstraint.h │ │ ├── MASConstraintMaker.h │ │ ├── MASLayoutConstraint.h │ │ ├── MASUtilities.h │ │ ├── MASViewAttribute.h │ │ ├── MASViewConstraint.h │ │ ├── Masonry.h │ │ ├── NSArray+MASAdditions.h │ │ ├── NSArray+MASShorthandAdditions.h │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ ├── View+MASAdditions.h │ │ ├── View+MASShorthandAdditions.h │ │ └── ViewController+MASAdditions.h ├── JoyTool │ ├── JoyTool │ │ ├── Category │ │ │ ├── AVAudioSession+manager.h │ │ │ ├── AVAudioSession+manager.m │ │ │ ├── CAAnimation+HCAnimation.h │ │ │ ├── CAAnimation+HCAnimation.m │ │ │ ├── CALayer+JoyLayer.h │ │ │ ├── CALayer+JoyLayer.m │ │ │ ├── NSObject+JoyRouter.h │ │ │ ├── NSObject+JoyRouter.m │ │ │ ├── NSString+JoyCategory.h │ │ │ ├── NSString+JoyCategory.m │ │ │ ├── UIBarButtonItem+JoyBarItem.h │ │ │ ├── UIBarButtonItem+JoyBarItem.m │ │ │ ├── UIImage+Extension.h │ │ │ ├── UIImage+Extension.m │ │ │ ├── UIImageView+JoyCategory.h │ │ │ ├── UIImageView+JoyCategory.m │ │ │ ├── UITableViewCell+JoyCell.h │ │ │ ├── UITableViewCell+JoyCell.m │ │ │ ├── UITextField+JoyCategory.h │ │ │ ├── UITextField+JoyCategory.m │ │ │ ├── UIView+JoyCategory.h │ │ │ └── UIView+JoyCategory.m │ │ ├── CellsLibruary │ │ │ ├── CollectionImageCell │ │ │ │ ├── JoyImageCollectionViewCell.h │ │ │ │ ├── JoyImageCollectionViewCell.m │ │ │ │ └── JoyImageCollectionViewCell.xib │ │ │ ├── TableImageCell │ │ │ │ ├── JoyLeftAvatarRightLabelCell.h │ │ │ │ ├── JoyLeftAvatarRightLabelCell.m │ │ │ │ ├── JoyLeftAvatarRightLabelCell.xib │ │ │ │ ├── JoyLeftAvatarRightTopBottomLabel.h │ │ │ │ ├── JoyLeftAvatarRightTopBottomLabel.m │ │ │ │ ├── JoyLeftAvatarRightTopBottomLabel.xib │ │ │ │ ├── JoyLeftIconCell.h │ │ │ │ ├── JoyLeftIconCell.m │ │ │ │ ├── JoyLeftIconCell.xib │ │ │ │ ├── JoyLeftIconTopBottomLabelCell.h │ │ │ │ ├── JoyLeftIconTopBottomLabelCell.m │ │ │ │ ├── JoyLeftIconTopBottomLabelCell.xib │ │ │ │ ├── JoyLeftLabelRightIconCell.h │ │ │ │ ├── JoyLeftLabelRightIconCell.m │ │ │ │ └── JoyLeftLabelRightIconCell.xib │ │ │ ├── TableLTextCell │ │ │ │ ├── JoyLeftLabelTextViewCell.h │ │ │ │ ├── JoyLeftLabelTextViewCell.m │ │ │ │ ├── JoyLeftLabelTextViewCell.xib │ │ │ │ ├── JoyTextCell.h │ │ │ │ ├── JoyTextCell.m │ │ │ │ ├── JoyTextCell.xib │ │ │ │ ├── JoyTextNoLabelCell.h │ │ │ │ ├── JoyTextNoLabelCell.m │ │ │ │ └── JoyTextNoLabelCell.xib │ │ │ ├── TableLabelCell │ │ │ │ ├── JoyBaseCell.h │ │ │ │ ├── JoyBaseCell.m │ │ │ │ ├── JoyBaseCell.xib │ │ │ │ ├── JoyLeftLabelRightPlaceHolderLabelCell.h │ │ │ │ ├── JoyLeftLabelRightPlaceHolderLabelCell.m │ │ │ │ ├── JoyLeftLabelRightPlaceHolderLabelCell.xib │ │ │ │ ├── JoyLeftMiddleRightLabelCell.h │ │ │ │ ├── JoyLeftMiddleRightLabelCell.m │ │ │ │ ├── JoyLeftMiddleRightLabelCell.xib │ │ │ │ ├── JoyMiddleLabelCell.h │ │ │ │ ├── JoyMiddleLabelCell.m │ │ │ │ └── JoyMiddleLabelCell.xib │ │ │ └── TableSwitchCell │ │ │ │ ├── JoySwitchCell.h │ │ │ │ ├── JoySwitchCell.m │ │ │ │ └── JoySwitchCell.xib │ │ ├── Common │ │ │ ├── Joy.h │ │ │ └── JoyTool.h │ │ ├── Controllers │ │ │ ├── JoyBaseVC+Extention.h │ │ │ ├── JoyBaseVC+Extention.m │ │ │ ├── JoyBaseVC.h │ │ │ └── JoyBaseVC.m │ │ ├── Interactor │ │ │ ├── JoyInteractorBase.h │ │ │ └── JoyInteractorBase.m │ │ ├── Models │ │ │ ├── JoyBaseModel.h │ │ │ ├── JoyBaseModel.m │ │ │ ├── JoyCellBaseModel+Action.h │ │ │ ├── JoyCellBaseModel+Action.m │ │ │ ├── JoyCellBaseModel+Edit.h │ │ │ ├── JoyCellBaseModel+Edit.m │ │ │ ├── JoyCellBaseModel.h │ │ │ ├── JoyCellBaseModel.m │ │ │ ├── JoySectionBaseModel.h │ │ │ └── JoySectionBaseModel.m │ │ ├── Presenter │ │ │ ├── JoyPresenterBase.h │ │ │ └── JoyPresenterBase.m │ │ ├── Protocols │ │ │ ├── JoyNavProtocol.h │ │ │ ├── JoyProtoCol.h │ │ │ └── TNACellModelProtocol.h │ │ ├── Utility │ │ │ ├── JoyAlert.h │ │ │ └── JoyAlert.m │ │ ├── Views │ │ │ ├── JoyCollectionView.h │ │ │ ├── JoyCollectionView.m │ │ │ ├── JoyDatePickView.h │ │ │ ├── JoyDatePickView.m │ │ │ ├── JoyNoDataBackView.h │ │ │ ├── JoyNoDataBackView.m │ │ │ ├── JoyNoDataBackView.xib │ │ │ ├── JoyPickerView.h │ │ │ ├── JoyPickerView.m │ │ │ ├── JoyTableAutoLayoutView.h │ │ │ ├── JoyTableAutoLayoutView.m │ │ │ ├── JoyUISegementView.h │ │ │ └── JoyUISegementView.m │ │ └── imageSources │ │ │ ├── header_icon_back@2x.png │ │ │ ├── header_icon_back@3x.png │ │ │ ├── joymakeHead.jpg │ │ │ ├── select@2x.png │ │ │ └── select@3x.png │ ├── LICENSE │ └── README.md ├── Manifest.lock ├── Masonry │ ├── LICENSE │ ├── Masonry │ │ ├── MASCompositeConstraint.h │ │ ├── MASCompositeConstraint.m │ │ ├── MASConstraint+Private.h │ │ ├── MASConstraint.h │ │ ├── MASConstraint.m │ │ ├── MASConstraintMaker.h │ │ ├── MASConstraintMaker.m │ │ ├── MASLayoutConstraint.h │ │ ├── MASLayoutConstraint.m │ │ ├── MASUtilities.h │ │ ├── MASViewAttribute.h │ │ ├── MASViewAttribute.m │ │ ├── MASViewConstraint.h │ │ ├── MASViewConstraint.m │ │ ├── Masonry.h │ │ ├── NSArray+MASAdditions.h │ │ ├── NSArray+MASAdditions.m │ │ ├── NSArray+MASShorthandAdditions.h │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ ├── NSLayoutConstraint+MASDebugAdditions.m │ │ ├── View+MASAdditions.h │ │ ├── View+MASAdditions.m │ │ ├── View+MASShorthandAdditions.h │ │ ├── ViewController+MASAdditions.h │ │ └── ViewController+MASAdditions.m │ └── README.md ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ ├── Joymake.xcuserdatad │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ │ └── wangguopeng.xcuserdatad │ │ └── xcschemes │ │ ├── JoyTool-JoyTool.xcscheme │ │ ├── JoyTool.xcscheme │ │ ├── Masonry.xcscheme │ │ ├── Pods-smallVideo.xcscheme │ │ └── xcschememanagement.plist └── Target Support Files │ ├── JoyTool │ ├── JoyTool-dummy.m │ ├── JoyTool-prefix.pch │ ├── JoyTool.xcconfig │ └── ResourceBundle-JoyTool-Info.plist │ ├── Masonry │ ├── Masonry-dummy.m │ ├── Masonry-prefix.pch │ └── Masonry.xcconfig │ └── Pods-smallVideo │ ├── Pods-smallVideo-acknowledgements.markdown │ ├── Pods-smallVideo-acknowledgements.plist │ ├── Pods-smallVideo-dummy.m │ ├── Pods-smallVideo-frameworks.sh │ ├── Pods-smallVideo-resources.sh │ ├── Pods-smallVideo.debug.xcconfig │ └── Pods-smallVideo.release.xcconfig ├── README.md ├── smallVideo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── wangguopeng.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── Joymake.xcuserdatad │ └── xcschemes │ │ └── xcschememanagement.plist │ └── wangguopeng.xcuserdatad │ └── xcschemes │ ├── smallVideo.xcscheme │ └── xcschememanagement.plist ├── smallVideo.xcworkspace ├── contents.xcworkspacedata ├── xcshareddata │ └── IDEWorkspaceChecks.plist └── xcuserdata │ ├── Joymake.xcuserdatad │ └── UserInterfaceState.xcuserstate │ └── wangguopeng.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── smallVideo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── smallVideoTests ├── Info.plist └── smallVideoTests.m └── smallVideoUITests ├── Info.plist └── smallVideoUITests.m /MediaRecordPlay/JoyCoreMotion.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyCoreMotion.h 3 | // LW 4 | // 5 | // Created by wangguopeng on 2017/5/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | @interface JoyCoreMotion : NSObject 12 | @property (nonatomic, copy) void (^screenOrentationBlock)(UIDeviceOrientation orientation); 13 | 14 | + (instancetype)sharedInstance; 15 | - (void)startMotionManager:(BOOL)isRecordingVideo; 16 | - (void)stopDetect; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /MediaRecordPlay/JoyCoreMotion.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyCoreMotion.m 3 | // LW 4 | // 5 | // Created by wangguopeng on 2017/5/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import "JoyCoreMotion.h" 10 | #import 11 | #import 12 | @interface JoyCoreMotion () 13 | @property (nonatomic, strong) CMMotionManager * motionManager; 14 | @property (nonatomic, assign) BOOL isRecordingVideo; 15 | @end 16 | 17 | @implementation JoyCoreMotion 18 | + (instancetype)sharedInstance 19 | { 20 | static JoyCoreMotion *joyCoremotion = nil; 21 | static dispatch_once_t onceToken; 22 | dispatch_once(&onceToken, ^{joyCoremotion = [[[self class] alloc]init];}); 23 | return joyCoremotion; 24 | } 25 | 26 | -(CMMotionManager *)motionManager{ 27 | return _motionManager = _motionManager?:[[CMMotionManager alloc] init]; 28 | } 29 | 30 | - (void)startMotionManager:(BOOL)isRecordingVideo{ 31 | self.isRecordingVideo = isRecordingVideo; 32 | self.motionManager.deviceMotionUpdateInterval = 1/15.0; 33 | _motionManager.deviceMotionAvailable? [self startDeviceMitionUpdate]:[self setMotionManager:nil]; 34 | } 35 | 36 | - (void)startDeviceMitionUpdate{ 37 | __weak __typeof (&*self)weakSelf = self; 38 | [_motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue currentQueue] 39 | withHandler: ^(CMDeviceMotion *motion, NSError *error){ 40 | [weakSelf performSelectorOnMainThread:@selector(handleDeviceMotion:) withObject:motion waitUntilDone:YES]; 41 | }]; 42 | 43 | } 44 | 45 | - (void)handleDeviceMotion:(CMDeviceMotion *)deviceMotion{ 46 | double x = deviceMotion.gravity.x; 47 | double y = deviceMotion.gravity.y; 48 | double z = deviceMotion.gravity.z; 49 | 50 | int orientation = 0; 51 | if (self.isRecordingVideo) 52 | { 53 | if (fabs(y) >= fabs(x)) 54 | {orientation = y>= 0? UIDeviceOrientationPortraitUpsideDown:UIDeviceOrientationPortrait;} 55 | else 56 | {orientation = x>=0? UIDeviceOrientationLandscapeRight:UIDeviceOrientationLandscapeLeft;} 57 | self.screenOrentationBlock?self.screenOrentationBlock(orientation):nil; 58 | } 59 | else 60 | { 61 | if (fabs(z) < 0.6) 62 | { 63 | if (fabs(y) >= fabs(x)) 64 | {orientation = y >= 0? UIDeviceOrientationPortraitUpsideDown:UIDeviceOrientationPortrait;} 65 | else 66 | {orientation = x >= 0? UIDeviceOrientationLandscapeRight:UIDeviceOrientationLandscapeLeft;} 67 | self.screenOrentationBlock?self.screenOrentationBlock(orientation):nil; 68 | } 69 | } 70 | } 71 | 72 | - (void)stopDetect{ 73 | [_motionManager stopDeviceMotionUpdates]; 74 | _motionManager = nil; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /MediaRecordPlay/JoyMediaRecordPlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyMediaRecordPlay.h 3 | // LW 4 | // 5 | // Created by wangguopeng on 2017/5/3. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | //typedef void (^TIMERBLOCK)(NSInteger currentValue,NSInteger totalValue); 10 | 11 | 12 | 13 | 14 | #import 15 | #import 16 | #import 17 | typedef void (^IDBLOCK)(id obj); 18 | 19 | typedef NS_ENUM(NSInteger,ERecordResult) { 20 | ERecordSucess, 21 | ERecordLessThanMinTime, 22 | ERecordFaile 23 | }; 24 | 25 | typedef NS_ENUM(NSUInteger,EAVCaptureOutputType) { 26 | EAVCaptureMovieFileOutput, //文件输出 27 | EAVCaptureVideoDataOutput, //data输出 28 | EAVCaptureMetadataOutput //元数据输出 29 | }; 30 | 31 | @protocol ReCordPlayProtoCol 32 | 33 | @optional 34 | - (void)joyRecordTimeCurrentTime:(CGFloat)currentTime 35 | totalTime:(CGFloat)totalTime; 36 | 37 | - (void)joyCaptureOutput:(AVCaptureFileOutput *)captureOutput 38 | didStartRecordingToOutputFileAtURL:(NSURL *)fileURL 39 | fromConnections:(NSArray *)connections; 40 | 41 | -(void)joyCaptureOutput:(AVCaptureFileOutput *)captureOutput 42 | didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL 43 | fromConnections:(NSArray *)connections error:(NSError *)error 44 | recordResult:(ERecordResult)recordResult; 45 | 46 | - (void)joyCaptureOutput:(AVCaptureOutput *)captureOutput 47 | didOutputMetadataObjects:(NSArray *)metadataObjects 48 | fromConnection:(AVCaptureConnection *)connection; 49 | @end 50 | 51 | @interface JoyMediaRecordPlay : NSObject 52 | @property (nonatomic,strong)AVCaptureSession *captureSession; 53 | @property (nonatomic,strong)AVCaptureVideoPreviewLayer *preViewLayer; //视图层 54 | //@property (nonatomic,assign)TIMERBLOCK recordProgressBlock; 55 | //@property (nonatomic,copy)IDBLOCK recordFinishBlock; 56 | @property (nonatomic,weak)id delegate; 57 | @property (nonatomic,assign)EAVCaptureOutputType captureOutputType; 58 | 59 | #pragma mark 初始化类型,默认录制文件 60 | -(instancetype)initWithCaptureType:(EAVCaptureOutputType)captureType; 61 | 62 | #pragma mark 准备录制 63 | - (void)preareReCord; 64 | 65 | #pragma mark 设置焦距 66 | - (void)updateVideoScaleAndCropFactor:(CGFloat)scale; 67 | 68 | #pragma mark 防抖功能 69 | - (void)openStabilization; 70 | 71 | #pragma mark 开始录制 72 | - (void)startRecordToFile:(NSURL *)outPutFile; 73 | 74 | #pragma mark 停止录制 75 | - (void)stopCurrentVideoRecording; 76 | 77 | #pragma mark 移除输入 78 | -(void)removeAVCaptureAudioDeviceInput; 79 | 80 | #pragma mark 手电筒 81 | - (void)switchTorch; 82 | 83 | #pragma mark 切换摄像头 84 | - (void)switchCamera; 85 | 86 | #pragma mark 设置聚焦点 87 | - (void)setFoucusWithPoint:(CGPoint)point; 88 | @end 89 | 90 | @interface JoyMediaRecordPlay (JoyRecorderPrivary) 91 | 92 | - (BOOL)isAvailableWithCamera; 93 | 94 | - (BOOL)isAvailableWithMic; 95 | 96 | - (void)getVideoAuth:(BOOLBLOCK)videoAuth; 97 | 98 | - (void)showAlert; 99 | 100 | #pragma mark 视频裁剪压缩 101 | + (void)mergeAndExportVideosAtFileURLs:(NSURL *)fileURL 102 | newUrl:(NSString *)mergeFilePath 103 | widthHeightScale:(CGFloat)whScalle 104 | presetName:(NSString *)presetName 105 | mergeSucess:(VOIDBLOCK)mergeSucess; 106 | 107 | #pragma mark 视频保存相册 108 | + (void)saveToPhotoWithUrl:(NSURL *)url; 109 | 110 | #pragma mark - 视频地址 111 | 112 | + (NSString *)generateFilePathWithType:(NSString *)fileType; 113 | 114 | #pragma mark 获取文件大小 115 | + (CGFloat)getfileSize:(NSString *)filePath; 116 | 117 | @end 118 | 119 | -------------------------------------------------------------------------------- /MediaRecordPlay/JoyProgressView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyProgressView.h 3 | // LW 4 | // 5 | // Created by wangguopeng on 2017/5/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JoyProgressView : UIView 12 | @property (nonatomic,assign)CGFloat progress; 13 | @end 14 | -------------------------------------------------------------------------------- /MediaRecordPlay/JoyProgressView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyProgressView.m 3 | // LW 4 | // 5 | // Created by wangguopeng on 2017/5/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import "JoyProgressView.h" 10 | #import 11 | 12 | @implementation JoyProgressView 13 | 14 | -(instancetype)init{ 15 | if (self = [super init]) { 16 | self.backgroundColor = [UIColor clearColor]; 17 | } 18 | return self; 19 | } 20 | 21 | -(instancetype)initWithFrame:(CGRect)frame{ 22 | if (self = [super initWithFrame:frame]) { 23 | self.backgroundColor = [UIColor clearColor]; 24 | } 25 | return self; 26 | } 27 | 28 | -(instancetype)initWithCoder:(NSCoder *)aDecoder{ 29 | if (self = [super initWithCoder:aDecoder]) { 30 | self.backgroundColor = [UIColor clearColor]; 31 | } 32 | return self; 33 | } 34 | 35 | - (void)drawRect:(CGRect)rect { 36 | [super drawRect:rect]; 37 | //1.获取上下文 38 | CGContextRef ctx = UIGraphicsGetCurrentContext(); 39 | 40 | //1.1 设置线条的宽度 41 | CGContextSetLineWidth(ctx, 10); 42 | //1.2 设置线条的起始点样式 43 | CGContextSetLineCap(ctx,kCGLineCapButt); 44 | //1.3 虚实切换 ,实线5虚线10 45 | CGFloat length[] = {1.5,3}; 46 | CGContextSetLineDash(ctx, 0, length, 2); 47 | //1.4 设置颜色 48 | [[UIColor orangeColor] set]; 49 | 50 | //2.设置路径 51 | 52 | CGFloat end = -M_PI/2 + 2*M_PI*_progress/20; 53 | 54 | CGContextAddArc(ctx, self.width/2 , self.height/2, 40, -M_PI/2, end , 0); 55 | 56 | //3.绘制 57 | CGContextStrokePath(ctx); 58 | 59 | } 60 | 61 | -(void)setProgress:(CGFloat)progress{ 62 | _progress = progress; 63 | [self setNeedsDisplay]; 64 | } 65 | 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /MediaRecordPlay/JoyRecordView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyRecordView.h 3 | // LW 4 | // 5 | // Created by wangguopeng on 2017/5/3. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface JoyRecordView : UIView 13 | @property (nonatomic,copy) VOIDBLOCK startRecordBlock; 14 | @property (nonatomic,copy) VOIDBLOCK endRecordBlock; 15 | @property (nonatomic,copy) VOIDBLOCK switchCameraBlock; 16 | @property (nonatomic,copy) VOIDBLOCK flashLightControlBlock; 17 | @property (nonatomic,copy) VOIDBLOCK cancleRecordBlock; 18 | @property (nonatomic,copy) STRINGBLOCK scanMMetaBlock; 19 | #pragma mark 屏幕旋转 20 | -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation; 21 | @end 22 | 23 | @class AVPlayer; 24 | @interface JoyPlayerView : UIView 25 | @property(nonatomic,strong) CALayer *playerLayer; 26 | @property(nonatomic,strong) AVPlayer *player; 27 | @property(nonatomic,strong) NSURL *playUrl; 28 | @property(nonatomic,strong) UIButton *cancelButton; 29 | @property(nonatomic,strong) UIButton *doneButton; 30 | @property (nonatomic,copy) VOIDBLOCK playCancleBlock; 31 | @end 32 | 33 | 34 | -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/LW_CameraFocus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/LW_CameraFocus.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/LW_PhotoLibruary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/LW_PhotoLibruary.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/LW_StartRecordVideo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/LW_StartRecordVideo@2x.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/LW_StartRecordVideo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/LW_StartRecordVideo@3x.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/LW_SwitchCamera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/LW_SwitchCamera.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/LW_SwitchCamera1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/LW_SwitchCamera1.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/LW_Video_Down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/LW_Video_Down.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/LW_Video_FlashLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/LW_Video_FlashLight.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/trends_ preview_video_back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/trends_ preview_video_back@2x.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/trends_ preview_video_back@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/trends_ preview_video_back@3x.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/trends_preview_video_done@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/trends_preview_video_done@2x.png -------------------------------------------------------------------------------- /MediaRecordPlay/imageSources/trends_preview_video_done@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/MediaRecordPlay/imageSources/trends_preview_video_done@3x.png -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | target:smallVideo do 2 | platform :ios,'7.0' 3 | pod 'Masonry' 4 | pod 'JoyTool' 5 | end 6 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JoyTool (0.0.7): 3 | - Masonry 4 | - Masonry (1.0.2) 5 | 6 | DEPENDENCIES: 7 | - JoyTool 8 | - Masonry 9 | 10 | SPEC CHECKSUMS: 11 | JoyTool: f9d016d689056d476eebd8479ebd133161adbd9c 12 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e 13 | 14 | PODFILE CHECKSUM: a801b1b8957e8d16ef6e5a80a9e6baa5e0f37b5e 15 | 16 | COCOAPODS: 1.2.1 17 | -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/AVAudioSession+manager.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/AVAudioSession+manager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/CAAnimation+HCAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/CAAnimation+HCAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/CALayer+JoyLayer.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/CALayer+JoyLayer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/Joy.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Common/Joy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyAlert.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Utility/JoyAlert.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyBaseCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyBaseCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyBaseModel.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Models/JoyBaseModel.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyBaseVC+Extention.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Controllers/JoyBaseVC+Extention.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyBaseVC.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Controllers/JoyBaseVC.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyCellBaseModel+Action.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Models/JoyCellBaseModel+Action.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyCellBaseModel+Edit.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Models/JoyCellBaseModel+Edit.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyCellBaseModel.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Models/JoyCellBaseModel.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyCollectionView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyCollectionView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyDatePickView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyDatePickView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyImageCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/CollectionImageCell/JoyImageCollectionViewCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyInteractorBase.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Interactor/JoyInteractorBase.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyLeftAvatarRightLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftAvatarRightLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyLeftAvatarRightTopBottomLabel.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftAvatarRightTopBottomLabel.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyLeftIconCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftIconCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyLeftIconTopBottomLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftIconTopBottomLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyLeftLabelRightIconCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftLabelRightIconCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyLeftLabelRightPlaceHolderLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyLeftLabelRightPlaceHolderLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyLeftLabelTextViewCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyLeftLabelTextViewCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyLeftMiddleRightLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyLeftMiddleRightLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyMiddleLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyMiddleLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyNavProtocol.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Protocols/JoyNavProtocol.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyNoDataBackView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyNoDataBackView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyPickerView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyPickerView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyPresenterBase.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Presenter/JoyPresenterBase.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyProtoCol.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Protocols/JoyProtoCol.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoySectionBaseModel.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Models/JoySectionBaseModel.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoySwitchCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableSwitchCell/JoySwitchCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyTableAutoLayoutView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyTableAutoLayoutView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyTextCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyTextCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyTextNoLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyTextNoLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyTool.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Common/JoyTool.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/JoyUISegementView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyUISegementView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/NSObject+JoyRouter.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/NSObject+JoyRouter.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/NSString+JoyCategory.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/NSString+JoyCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/TNACellModelProtocol.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Protocols/TNACellModelProtocol.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/UIBarButtonItem+JoyBarItem.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UIBarButtonItem+JoyBarItem.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/UIImage+Extension.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UIImage+Extension.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/UIImageView+JoyCategory.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UIImageView+JoyCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/UITableViewCell+JoyCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UITableViewCell+JoyCell.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/UITextField+JoyCategory.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UITextField+JoyCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JoyTool/UIView+JoyCategory.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UIView+JoyCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/AVAudioSession+manager.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/AVAudioSession+manager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/CAAnimation+HCAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/CAAnimation+HCAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/CALayer+JoyLayer.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/CALayer+JoyLayer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/Joy.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Common/Joy.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyAlert.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Utility/JoyAlert.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyBaseCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyBaseCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyBaseModel.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Models/JoyBaseModel.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyBaseVC+Extention.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Controllers/JoyBaseVC+Extention.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyBaseVC.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Controllers/JoyBaseVC.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyCellBaseModel+Action.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Models/JoyCellBaseModel+Action.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyCellBaseModel+Edit.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Models/JoyCellBaseModel+Edit.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyCellBaseModel.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Models/JoyCellBaseModel.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyCollectionView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyCollectionView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyDatePickView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyDatePickView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyImageCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/CollectionImageCell/JoyImageCollectionViewCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyInteractorBase.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Interactor/JoyInteractorBase.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyLeftAvatarRightLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftAvatarRightLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyLeftAvatarRightTopBottomLabel.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftAvatarRightTopBottomLabel.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyLeftIconCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftIconCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyLeftIconTopBottomLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftIconTopBottomLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyLeftLabelRightIconCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftLabelRightIconCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyLeftLabelRightPlaceHolderLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyLeftLabelRightPlaceHolderLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyLeftLabelTextViewCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyLeftLabelTextViewCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyLeftMiddleRightLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyLeftMiddleRightLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyMiddleLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyMiddleLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyNavProtocol.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Protocols/JoyNavProtocol.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyNoDataBackView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyNoDataBackView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyPickerView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyPickerView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyPresenterBase.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Presenter/JoyPresenterBase.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyProtoCol.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Protocols/JoyProtoCol.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoySectionBaseModel.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Models/JoySectionBaseModel.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoySwitchCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableSwitchCell/JoySwitchCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyTableAutoLayoutView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyTableAutoLayoutView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyTextCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyTextCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyTextNoLabelCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyTextNoLabelCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyTool.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Common/JoyTool.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/JoyUISegementView.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Views/JoyUISegementView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/NSObject+JoyRouter.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/NSObject+JoyRouter.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/NSString+JoyCategory.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/NSString+JoyCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/TNACellModelProtocol.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Protocols/TNACellModelProtocol.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/UIBarButtonItem+JoyBarItem.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UIBarButtonItem+JoyBarItem.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/UIImage+Extension.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UIImage+Extension.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/UIImageView+JoyCategory.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UIImageView+JoyCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/UITableViewCell+JoyCell.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UITableViewCell+JoyCell.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/UITextField+JoyCategory.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UITextField+JoyCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JoyTool/UIView+JoyCategory.h: -------------------------------------------------------------------------------- 1 | ../../../JoyTool/JoyTool/Category/UIView+JoyCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/AVAudioSession+manager.h: -------------------------------------------------------------------------------- 1 | // 2 | // AVAudioSession+manager.h 3 | // LW 4 | // 5 | // Created by joymake on 16/6/30. 6 | // Copyright © 2016年 joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AVAudioSession (manager) 12 | //播放声音文件 13 | - (void)playSoundWithResource:(NSString *)fileName ofType:(NSString *)type; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/AVAudioSession+manager.m: -------------------------------------------------------------------------------- 1 | // 2 | // AVAudioSession+manager.m 3 | // LW 4 | // 5 | // Created by joymake on 16/6/30. 6 | // Copyright © 2016年 joymake. All rights reserved. 7 | // 8 | 9 | #import "AVAudioSession+manager.h" 10 | 11 | @implementation AVAudioSession (manager) 12 | - (void)playSoundWithResource:(NSString *)fileName ofType:(NSString *)type{ 13 | NSError *error = nil; 14 | [self setCategory:AVAudioSessionCategoryPlayback error:&error]; 15 | 16 | NSString *path = [[NSBundle mainBundle]pathForResource:fileName ofType:type]; 17 | if ([[NSFileManager defaultManager] fileExistsAtPath:path]) { 18 | SystemSoundID sound; 19 | AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath:path],&sound); 20 | AudioServicesPlaySystemSound(sound); 21 | } 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/CAAnimation+HCAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // CAAnimation+HCAnimation.h 3 | // HCKit 4 | // 5 | // Created by Joymake on 16/5/31. 6 | // Copyright © 2016年 Joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | typedef NS_ENUM(NSInteger, Axis) { 13 | AxisX = 0, ///< x轴 14 | AxisY, ///< y轴 15 | AxisZ ///< z轴 16 | }; 17 | 18 | typedef NS_ENUM(NSInteger, ShakeDerection) { 19 | ShakeDerectionAxisX = 0, ///< 左右 20 | ShakeDerectionAxisY, ///< 上下 21 | }; 22 | 23 | @interface CAAnimation (HCAnimation) 24 | 25 | /** 26 | * 在具体的UIView上实现一个缩放的动画 27 | *@param view 动画的载体 28 | *@param fromValue 起始缩放 29 | *@param scaleValue 最终缩放值 30 | *@param repeat 动画循环次数,0表示无限循环 31 | *@param duration 动画运行一次的时间 32 | *@param autoreverses 是否恢复起始状态 33 | */ 34 | + (void)showScaleAnimationInView:(UIView *)view fromValue:(CGFloat)fromValue ScaleValue:(CGFloat)scaleValue Repeat:(CGFloat)repeat Duration:(CGFloat)duration autoreverses:(BOOL)autoreverses; 35 | 36 | /** 37 | * 在具体的UIView上实现一个移动的动画 38 | *@param view 动画的载体 39 | *@param repeat 动画循环次数,0表示无限循环 40 | *@param duration 动画运行一次的时间 41 | */ 42 | + (void)showMoveAnimationInView:(UIView *)view Position:(CGPoint)position Repeat:(CGFloat)repeat Duration:(CGFloat)duration; 43 | 44 | /** 45 | * 在具体的UIView上实现一个旋转的动画 46 | *@param view 动画的载体 47 | *@param degree 旋转的弧度 48 | *@param direction 旋转的方向 49 | *@param repeat 动画循环次数,0表示无限循环 50 | *@param duration 动画运行一次的时间 51 | */ 52 | + (void)showRotateAnimationInView:(UIView *)view Degree:(CGFloat)degree Direction:(Axis)direction Repeat:(CGFloat)repeat Duration:(CGFloat)duration autoreverses:(BOOL)autoreverses; 53 | 54 | /** 55 | * 在具体的UIView上实现一个透明度渐变的动画 56 | *@param view 动画的载体 57 | *@param fromAlpha 起始透明度 58 | *@param alpha 最终显示的透明度 59 | *@param repeat 动画循环次数,0表示无限循环 60 | *@param duration 动画运行一次的时间 61 | *@param autoreverses 是否恢复起始状态 62 | */ 63 | + (void)showOpacityAnimationInView:(UIView *)view fromAlpha:(CGFloat)fromAlpha Alpha:(CGFloat)alpha Repeat:(CGFloat)repeat Duration:(CGFloat)duration autoreverses:(BOOL)autoreverses; 64 | 65 | /** 66 | * 在具体的UIView上实现一个震动的动画 67 | *@param view 动画的载体 68 | *@param offset 震动的偏移量 69 | *@param derection 震动方向 70 | *@param repeat 动画循环次数,0表示无限循环 71 | *@param duration 动画运行一次的时间 72 | */ 73 | + (void)showShakeAnimationInView:(UIView *)view Offset:(CGFloat)offset Direction:(ShakeDerection)derection Repeat:(CGFloat)repeat Duration:(CGFloat)duration; 74 | 75 | /** 76 | *清除具体UIView上的所有动画 77 | *@param view 实施清除的对象 78 | */ 79 | + (void)clearAnimationInView:(UIView *)view; 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/CALayer+JoyLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer+JoyLayer.h 3 | // Pods 4 | // 5 | // Created by wangguopeng on 2016/11/18. 6 | // Copyright © 2016年 joymake. All rights reserved. 7 | // 8 | // 9 | 10 | #import 11 | 12 | @interface CALayer (JoyLayer) 13 | - (CATextLayer*)textLayer:(NSString*)text rotate:(CGFloat)angel frame:(CGRect)frame position:(CGPoint)position font:(NSInteger)fontSize; 14 | 15 | @end 16 | 17 | @interface CALayer (Transition) 18 | 19 | /* 20 | * 动画类型 21 | */ 22 | typedef enum{ 23 | 24 | //水波 25 | TransitionAnimTypeRippleEffect=0, 26 | 27 | //吸走 28 | TransitionAnimTypeSuckEffect, 29 | 30 | //翻开书本 31 | TransitionAnimTypePageCurl, 32 | 33 | //正反翻转 34 | TransitionAnimTypeOglFlip, 35 | 36 | //正方体 37 | TransitionAnimTypeCube, 38 | 39 | //push推开 40 | TransitionAnimTypeReveal, 41 | 42 | //合上书本 43 | TransitionAnimTypePageUnCurl, 44 | 45 | //镜头开 46 | cameraIrisHollowOpen, 47 | 48 | //镜头关 49 | cameraIrisHollowClose, 50 | 51 | // 交叉淡化 52 | CATransitionFade, 53 | //随机 54 | TransitionAnimTypeRamdom, 55 | 56 | 57 | }TransitionAnimType; 58 | 59 | 60 | 61 | 62 | /* 63 | * 动画方向 64 | */ 65 | typedef enum{ 66 | 67 | //从上 68 | TransitionSubtypesFromTop=0, 69 | 70 | //从左 71 | TransitionSubtypesFromLeft, 72 | 73 | //从下 74 | TransitionSubtypesFromBotoom, 75 | 76 | //从右 77 | TransitionSubtypesFromRight, 78 | 79 | //随机 80 | TransitionSubtypesFromRamdom, 81 | 82 | }TransitionSubType; 83 | 84 | 85 | /* 86 | * 动画曲线 87 | */ 88 | typedef enum { 89 | 90 | //默认 91 | TransitionCurveDefault, 92 | 93 | //缓进 94 | TransitionCurveEaseIn, 95 | 96 | //缓出 97 | TransitionCurveEaseOut, 98 | 99 | //缓进缓出 100 | TransitionCurveEaseInEaseOut, 101 | 102 | //线性 103 | TransitionCurveLinear, 104 | 105 | //随机 106 | TransitionCurveRamdom, 107 | 108 | }TransitionCurve; 109 | 110 | 111 | /** 112 | * 转场动画 113 | * 114 | * @param animType 转场动画类型 115 | * @param curve 转动动画曲线 116 | * @param duration 转动动画时长 117 | * 118 | * @return 转场动画实例 119 | */ 120 | -(CATransition *)transitionWithAnimType:(TransitionAnimType)animType subType:(TransitionSubType)subType curve:(TransitionCurve)curve duration:(CGFloat)duration; 121 | 122 | @end 123 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/CALayer+JoyLayer.m: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer+JoyLayer.m 3 | // Pods 4 | // 5 | // Created by wangguopeng on 2016/11/18. 6 | // Copyright © 2016年 joymake. All rights reserved.// 7 | // 8 | 9 | #import "CALayer+JoyLayer.h" 10 | 11 | @implementation CALayer (JoyLayer) 12 | - (CATextLayer*)textLayer:(NSString*)text rotate:(CGFloat)angel frame:(CGRect)frame position:(CGPoint)position font:(NSInteger)fontSize 13 | { 14 | CATextLayer *txtLayer = [CATextLayer layer]; 15 | 16 | txtLayer.frame = frame; 17 | 18 | //设置锚点,绕中心点旋转 19 | txtLayer.anchorPoint = CGPointMake(0.5, 0.5); 20 | txtLayer.string = text; 21 | txtLayer.alignmentMode = [NSString stringWithFormat:@"right"]; 22 | txtLayer.fontSize = fontSize; 23 | txtLayer.foregroundColor = [UIColor grayColor].CGColor; 24 | 25 | txtLayer.shadowColor = [UIColor yellowColor].CGColor; 26 | txtLayer.shadowOffset = CGSizeMake(5, 2); 27 | txtLayer.shadowRadius = 6; 28 | txtLayer.shadowOpacity = 0.6; 29 | 30 | //layer没有center,用Position 31 | [txtLayer setPosition:position]; 32 | //旋转 33 | txtLayer.transform = CATransform3DMakeRotation(angel,0,0,1); 34 | return txtLayer; 35 | } 36 | 37 | @end 38 | 39 | 40 | @implementation CALayer (Transition) 41 | 42 | 43 | /** 44 | * 转场动画 45 | * 46 | * @param animType 转场动画类型 47 | * @param subtype 转动动画方向 48 | * @param curve 转动动画曲线 49 | * @param duration 转动动画时长 50 | * 51 | * @return 转场动画实例 52 | */ 53 | -(CATransition *)transitionWithAnimType:(TransitionAnimType)animType subType:(TransitionSubType)subType curve:(TransitionCurve)curve duration:(CGFloat)duration{ 54 | 55 | NSString *key = @"transition"; 56 | 57 | if([self animationForKey:key]!=nil){ 58 | [self removeAnimationForKey:key]; 59 | } 60 | 61 | 62 | CATransition *transition=[CATransition animation]; 63 | 64 | //动画时长 65 | transition.duration=duration; 66 | 67 | //动画类型 68 | transition.type=[self animaTypeWithTransitionType:animType]; 69 | 70 | //动画方向 71 | transition.subtype=[self animaSubtype:subType]; 72 | 73 | //缓动函数 74 | transition.timingFunction=[CAMediaTimingFunction functionWithName:[self curve:curve]]; 75 | 76 | //完成动画删除 77 | transition.removedOnCompletion = YES; 78 | 79 | [self addAnimation:transition forKey:key]; 80 | 81 | return transition; 82 | } 83 | 84 | 85 | 86 | /* 87 | * 返回动画曲线 88 | */ 89 | -(NSString *)curve:(TransitionCurve)curve{ 90 | 91 | //曲线数组 92 | NSArray *funcNames=@[kCAMediaTimingFunctionDefault,kCAMediaTimingFunctionEaseIn,kCAMediaTimingFunctionEaseInEaseOut,kCAMediaTimingFunctionEaseOut,kCAMediaTimingFunctionLinear]; 93 | 94 | return [self objFromArray:funcNames index:curve isRamdom:(TransitionCurveRamdom == curve)]; 95 | } 96 | 97 | 98 | 99 | /* 100 | * 返回动画方向 101 | */ 102 | -(NSString *)animaSubtype:(TransitionSubType)subType{ 103 | 104 | //设置转场动画的方向 105 | NSArray *subtypes=@[kCATransitionFromTop,kCATransitionFromLeft,kCATransitionFromBottom,kCATransitionFromRight]; 106 | 107 | return [self objFromArray:subtypes index:subType isRamdom:(TransitionSubtypesFromRamdom == subType)]; 108 | } 109 | 110 | /* 111 | * 返回动画类型 112 | */ 113 | -(NSString *)animaTypeWithTransitionType:(TransitionAnimType)type{ 114 | 115 | //设置转场动画的类型 116 | NSArray *animArray=@[@"rippleEffect",@"suckEffect",@"pageCurl",@"oglFlip",@"cube",@"reveal",@"pageUnCurl",@"cameraIrisHollowOpen",@"cameraIrisHollowClose",@"fade"]; 117 | 118 | return [self objFromArray:animArray index:type isRamdom:(TransitionAnimTypeRamdom == type)]; 119 | } 120 | 121 | 122 | 123 | /* 124 | * 统一从数据返回对象 125 | */ 126 | -(id)objFromArray:(NSArray *)array index:(NSUInteger)index isRamdom:(BOOL)isRamdom{ 127 | 128 | NSUInteger count = array.count; 129 | 130 | NSUInteger i = isRamdom?arc4random_uniform((u_int32_t)count) : index; 131 | 132 | return array[i]; 133 | } 134 | @end 135 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/NSObject+JoyRouter.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+JoyRouter.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/3/8. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSObject (JoyRouter) 12 | -(NSObject *)joyProtocolObjectFromStr:(NSString *)classStr; 13 | 14 | 15 | -(Class)joyClassFromStr:(NSString *)classStr; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/NSObject+JoyRouter.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+JoyRouter.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/3/8. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | #import "NSObject+JoyRouter.h" 10 | 11 | @implementation NSObject (JoyRouter) 12 | -(NSObject *)joyProtocolObjectFromStr:(NSString *)classStr{ 13 | Class JoyClass = NSClassFromString(classStr); 14 | NSObject *joyVC = [[JoyClass alloc]init]; 15 | return joyVC; 16 | } 17 | 18 | -(Class)joyClassFromStr:(NSString *)classStr{ 19 | return NSClassFromString(classStr); 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/NSString+JoyCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JoyCategory.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/2/24. 6 | // Copyright © 2017年 Joy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (JoyCategory) 12 | /** 13 | * 返回字符串的长度 14 | * 15 | */ 16 | - (NSInteger)strLength; 17 | 18 | /** 19 | * 截取字符串 20 | * 21 | */ 22 | 23 | - (NSString *)subToMaxIndex:(NSInteger)maxNum; 24 | 25 | /* 26 | * 判断字符串是否为空 27 | * 28 | */ 29 | + (BOOL)joy_isNullString:(NSString *)string; 30 | /** 31 | * 判断字符串是否为空 32 | */ 33 | + (BOOL)joy_isVaildString:(NSString *)value; 34 | /** 35 | * 返回字符串的长度 36 | * 37 | */ 38 | - (NSInteger)joy_lengthAndChinese; 39 | /** 40 | * 判断字符串的首字符是不是中文 41 | */ 42 | - (BOOL)joy_isChineseChar; 43 | 44 | - (NSString *)joy_clip_10char; 45 | 46 | //是否是emoji表情 47 | - (BOOL)joy_isEmoji; 48 | 49 | //是否是特殊字符 50 | - (BOOL)joy_isSpecialCharacter; 51 | 52 | // 判断是否为空格 53 | - (BOOL)joy_isEmpty; 54 | 55 | // 判断是否为数字 56 | - (BOOL)joy_isIntType; 57 | 58 | //汉子转化为拼音 59 | - (NSString *)joy_phonetic; 60 | 61 | //判断是否纯数字 62 | - (BOOL)joy_checkIsNumber; 63 | 64 | - (NSString *)joy_replaceCharactersAtIndexes:(NSArray *)indexes withString:(NSString *)aString; 65 | 66 | - (NSMutableArray *)joy_itemsForPattern:(NSString *)pattern captureGroupIndex:(NSUInteger)index; 67 | 68 | //根据最大尺寸和字体计算文字的实际尺寸 69 | - (CGSize)joy_sizeWithMaxSize:(CGSize)maxSize andFont:(UIFont *)font; 70 | 71 | // 字典转json串 72 | +(NSString *)joy_jsonStringWithDict:(NSDictionary *)dict; 73 | 74 | // json串转字典 75 | + (NSDictionary *)joy_dictionaryWithJsonString:(NSString *)jsonString; 76 | 77 | // 编码 url中的特殊字符 78 | + (NSString *)joy_urlEncodedString:(NSString *)urlString; 79 | 80 | // 把当前字符串转成字典 81 | -(id)joy_JSONValue; 82 | 83 | #pragma mark 邮箱是否正确 84 | - (BOOL)isValidateEmail; 85 | @end 86 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/UIBarButtonItem+JoyBarItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItem+JoyBarItem.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/2/24. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIBarButtonItem (JoyBarItem) 12 | + (UIBarButtonItem *)JoyBarButtonItemWithTarget:(id)target 13 | action:(SEL)selector 14 | normalImage:(NSString *)normalImgName 15 | highLightImage:(NSString *) highLightImageName 16 | title:(NSString *)title 17 | titleColor:(UIColor *)titleColor 18 | frame:(CGRect)frame 19 | bundle:(NSString *)bundleName; 20 | ; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/UIBarButtonItem+JoyBarItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItem+JoyBarItem.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/2/24. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | #import "UIBarButtonItem+JoyBarItem.h" 10 | #import "Joy.h" 11 | #import "UIImage+Extension.h" 12 | @implementation UIBarButtonItem (JoyBarItem) 13 | + (UIBarButtonItem *)JoyBarButtonItemWithTarget:(id)target 14 | action:(SEL)selector 15 | normalImage:(NSString *)normalImgName 16 | highLightImage:(NSString *)highLightImageName 17 | title:(NSString *)title 18 | titleColor:(UIColor *)titleColor 19 | frame:(CGRect)frame 20 | bundle:(NSString *)bundleName 21 | { 22 | normalImgName = JOY_GETBUNDLE_PATH(JoyToolBundle,normalImgName); 23 | highLightImageName = JOY_GETBUNDLE_PATH(JoyToolBundle,normalImgName); 24 | 25 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 26 | [button setFrame:frame]; 27 | UIImage* rendingNormalImage = [[UIImage imageNamed:normalImgName] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; 28 | UIImage* rendingHighlightImage = [[UIImage imageNamed:highLightImageName] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; 29 | if (rendingNormalImage.size.height>35) { 30 | rendingNormalImage = [UIImage UIBezierPathClip:rendingNormalImage cornerRadius:rendingNormalImage.size.width]; 31 | rendingNormalImage = [UIImage scaleToSize:rendingNormalImage size:CGSizeMake(35, 35)]; 32 | rendingHighlightImage = [UIImage scaleToSize:rendingHighlightImage size:CGSizeMake(35, 35)]; 33 | } 34 | [button setImage:rendingNormalImage forState:UIControlStateNormal]; 35 | [button setImage:rendingHighlightImage forState:UIControlStateHighlighted]; 36 | [button setTitle:title forState:UIControlStateNormal]; 37 | [button setTitleColor:[titleColor colorWithAlphaComponent:0.6] forState:UIControlStateHighlighted]; 38 | [button setTitleColor:titleColor forState:UIControlStateNormal]; 39 | [button addTarget:target action:selector forControlEvents:UIControlEventTouchUpInside]; 40 | button.titleLabel.font = [UIFont systemFontOfSize:17]; 41 | button.titleEdgeInsets = UIEdgeInsetsMake(2.5, 2.5, 0, 0); 42 | [button sizeToFit]; 43 | button.frame = (CGRect){ 44 | frame.origin, 45 | {button.frame.size.width + 2.5,button.frame.size.height}, 46 | }; 47 | return [[UIBarButtonItem alloc]initWithCustomView:button]; 48 | } 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/UIImage+Extension.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Extension.h 3 | // LW 4 | // 5 | // Created by Joymake on 2016/11/9. 6 | // Copyright © 2016年 joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | FOUNDATION_EXPORT double ImageEffectsVersionNumber; 11 | FOUNDATION_EXPORT const unsigned char ImageEffectsVersionString[]; 12 | 13 | @interface UIImage (Extension) 14 | - (UIImage *)lightImage; 15 | 16 | - (UIImage *)extraLightImage; 17 | 18 | - (UIImage *)darkImage; 19 | 20 | - (UIImage *)tintedImageWithColor:(UIColor *)tintColor; 21 | 22 | - (UIImage *)blurredImageWithRadius:(CGFloat)blurRadius; 23 | - (UIImage *)blurredImageWithSize:(CGSize)blurSize; 24 | - (UIImage *)blurredImageWithSize:(CGSize)blurSize 25 | tintColor:(UIColor *)tintColor 26 | saturationDeltaFactor:(CGFloat)saturationDeltaFactor 27 | maskImage:(UIImage *)maskImage; 28 | - (UIImage *)screenShot; 29 | 30 | 31 | + (UIImage *)sd_animatedGIFNamed:(NSString *)name; 32 | 33 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data; 34 | 35 | - (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size; 36 | 37 | + (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)size; 38 | 39 | #pragma markUIBezierPath 裁剪 40 | + (UIImage *)UIBezierPathClip:(UIImage *)img cornerRadius:(CGFloat)c; 41 | @end 42 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/UIImageView+JoyCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+JoyCategory.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/2/28. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | #define SDIMAGE_LOAD(IMAGE_VIEW,URLSTRING,PLACEHOLDER_IMAGESTRING) [IMAGE_VIEW setImageWithUrlString:URLSTRING placeholderImage:[UIImage imageNamed:PLACEHOLDER_IMAGESTRING]]; 10 | 11 | #import 12 | 13 | typedef void(^completionBlock)(UIImage *image, NSError *error); 14 | @interface UIImageView (JoyCategory) 15 | 16 | /** 17 | * 设置图片 18 | */ 19 | - (void)setImageWithUrlString:(NSString *)urlString; 20 | 21 | /** 22 | * 设置图片(placeholder) 23 | */ 24 | - (void)setImageWithUrlString:(NSString *)urlString placeholderImage:(UIImage *)placeholder; 25 | 26 | /** 27 | * 设置图片(完成回调) 28 | */ 29 | - (void)setImageWithUrlString:(NSString *)urlString completed:(completionBlock)completedBlock; 30 | 31 | /** 32 | * 设置图片(placeholder+完成回调) 33 | */ 34 | - (void)setImageWithUrlString:(NSString *)urlString placeholderImage:(UIImage *)placeholder completed:(completionBlock)completedBlock; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/UIImageView+JoyCategory.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+JoyCategory.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/2/28. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | #import "UIImageView+JoyCategory.h" 10 | #if __has_include ("UIImageView+WebCache.h") 11 | #import "UIImageView+WebCache.h" 12 | #endif 13 | 14 | @implementation UIImageView (JoyCategory) 15 | 16 | /** 17 | * 设置图片 18 | */ 19 | - (void)setImageWithUrlString:(NSString *)urlString 20 | { 21 | [self setImageWithUrlString:urlString placeholderImage:nil]; 22 | } 23 | 24 | /** 25 | * 设置图片(placeholder) 26 | */ 27 | - (void)setImageWithUrlString:(NSString *)urlString placeholderImage:(UIImage *)placeholder 28 | { 29 | [self setImageWithUrlString:urlString placeholderImage:placeholder completed:nil]; 30 | } 31 | 32 | /** 33 | * 设置图片(完成回调) 34 | */ 35 | - (void)setImageWithUrlString:(NSString *)urlString completed:(completionBlock)completedBlock 36 | { 37 | [self setImageWithUrlString:urlString placeholderImage:nil completed:completedBlock]; 38 | } 39 | 40 | /** 41 | * 设置图片(placeholder+完成回调) 42 | */ 43 | - (void)setImageWithUrlString:(NSString *)urlString placeholderImage:(UIImage *)placeholder completed:(completionBlock)completedBlock 44 | { 45 | #if __has_include ("UIImageView+WebCache.h") 46 | [self sd_setImageWithURL:[NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] placeholderImage:placeholder options:SDWebImageRetryFailed completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { 47 | if (completedBlock) 48 | { 49 | completedBlock(image, error); 50 | } 51 | }]; 52 | #else 53 | self.image = placeholder; 54 | #endif 55 | } 56 | @end 57 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/UITableViewCell+JoyCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell+JoyCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/3/15. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 设计目的:配合“JoyTableAutoLayoutView”使用,实现CELL的多继承功能,使其可以扩展非joykit框架外的cell功能 8 | 9 | #import 10 | 11 | //***********************代理协议*********************************** 12 | @protocol JoyCellDelegate 13 | @optional 14 | 15 | #pragma mark 编辑结束时 子类选调 不仅仅text类cell可用,其他switch、button等状态改变也可用 16 | - (void)textChanged:(NSIndexPath *)selectIndex 17 | andText:(NSString *)content 18 | andChangedKey:(NSString *)changeTextKey; 19 | 20 | #pragma mark 字符发生变化时 21 | - (void)textHasChanged:(NSIndexPath *)selectIndex 22 | andText:(NSString *)content 23 | andChangedKey:(NSString *)changeTextKey; 24 | 25 | #pragma mark 字符即将编辑时 26 | - (void)textshouldBeginEditWithTextContainter:(id)textContainer 27 | andIndexPath:(NSIndexPath *)indexPath; 28 | 29 | #pragma mark 字符即将结束编辑时 30 | - (void)textshouldEndEditWithTextContainter:(id)textContainer 31 | andIndexPath:(NSIndexPath *)indexPath; 32 | 33 | 34 | #pragma mark cell点击回调,比如button、自定义imageview的点击或者其他事件需要触发点击效果的 35 | - (void)cellDidSelectWithIndexPath:(NSIndexPath *)indexPath action:(NSString *)action; 36 | 37 | @end 38 | //***********************代理协议*********************************** 39 | 40 | 41 | //***********************传模型协议,实现*************************** 42 | @protocol JoyCellProtocol //|* 43 | @optional //|* 44 | - (void)setCellWithModel:(NSObject *)model; //|* 45 | @end //|* 46 | //***********************传模型协议,必须实现************************* 47 | 48 | @interface UITableViewCell (JoyCell) 49 | 50 | #pragma mark 51 | @property (nonatomic,weak) id delegate; 52 | 53 | @property (strong, nonatomic) NSIndexPath * index; 54 | 55 | @property (nonatomic,copy)void (^beginUpdatesBlock)(); 56 | 57 | @property (nonatomic,copy)void (^endUpdatesBlock)(); 58 | 59 | @property (nonatomic,copy)void (^scrollBlock)(NSIndexPath *indexPath,UITableViewScrollPosition scrollPosition,BOOL animated); 60 | @end 61 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/UITableViewCell+JoyCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell+JoyCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/3/15. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | #import "UITableViewCell+JoyCell.h" 10 | #import 11 | 12 | @implementation UITableViewCell (JoyCell) 13 | 14 | -(void)setDelegate:(id)delegate{ 15 | objc_setAssociatedObject(self, _cmd, delegate, OBJC_ASSOCIATION_ASSIGN); 16 | } 17 | 18 | -(id)delegate{ 19 | return objc_getAssociatedObject(self, @selector(setDelegate:)); 20 | } 21 | 22 | -(void)setIndex:(NSIndexPath *)index{ 23 | objc_setAssociatedObject(self, _cmd, index, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 24 | } 25 | 26 | -(NSIndexPath *)index{ 27 | return objc_getAssociatedObject(self, @selector(setIndex:)); 28 | } 29 | 30 | //-(void)setMaxNum:(NSInteger)maxNum{ 31 | // objc_setAssociatedObject(self, _cmd, @(maxNum), OBJC_ASSOCIATION_ASSIGN); 32 | //} 33 | // 34 | //-(NSInteger)maxNum{ 35 | // return [objc_getAssociatedObject(self, @selector(setMaxNum:)) integerValue]; 36 | //} 37 | 38 | -(void)setBeginUpdatesBlock:(void (^)())beginUpdatesBlock{ 39 | objc_setAssociatedObject(self, _cmd, beginUpdatesBlock, OBJC_ASSOCIATION_COPY_NONATOMIC); 40 | } 41 | 42 | -(void (^)())beginUpdatesBlock{ 43 | return objc_getAssociatedObject(self, @selector(setBeginUpdatesBlock:)); 44 | } 45 | 46 | -(void)setEndUpdatesBlock:(void (^)())endUpdatesBlock{ 47 | objc_setAssociatedObject(self, _cmd, endUpdatesBlock, OBJC_ASSOCIATION_COPY_NONATOMIC); 48 | } 49 | 50 | -(void (^)())endUpdatesBlock{ 51 | return objc_getAssociatedObject(self, @selector(setEndUpdatesBlock:)); 52 | } 53 | 54 | -(void)setScrollBlock:(void (^)(NSIndexPath *, UITableViewScrollPosition, BOOL))scrollBlock{ 55 | objc_setAssociatedObject(self, _cmd, scrollBlock, OBJC_ASSOCIATION_COPY_NONATOMIC); 56 | } 57 | 58 | -(void (^)(NSIndexPath *, UITableViewScrollPosition, BOOL))scrollBlock{ 59 | return objc_getAssociatedObject(self, @selector(setScrollBlock:)); 60 | } 61 | @end 62 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/UITextField+JoyCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+JoyCategory.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/2/24. 6 | // Copyright © 2017年 Joy. All rights reserved. 7 | // 8 | 9 | typedef void(^textFieldChangedBlock)(); 10 | #import 11 | 12 | @interface UITextField (JoyCategory) 13 | 14 | #pragma MARK 设置最大字符数限制,超过后会截掉 15 | -(void)setTextMaxNum:(NSInteger )maxNum; 16 | 17 | #pragma MARK 超过最大字数后提示信息 18 | - (void)setTextTopicStr:(NSString *)topic; 19 | 20 | #pragma MARK 文本超过最大字数后回调 21 | - (void)textHasOverMaxNum:(textFieldChangedBlock)textHasOverMaxNumBlock; 22 | #pragma MARK 文本字数变化后回调 23 | - (void)textHasChanged:(textFieldChangedBlock)textHasChangedBlock; 24 | 25 | -(void)setLeftContentPadding:(CGFloat)padding; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Category/UIView+JoyCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+JoyCategory.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/2/27. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | #import 12 | 13 | @interface UIView (JoyCategory) 14 | @property(nonatomic,readonly)UIViewController* viewController; 15 | @property (nonatomic, assign) CGFloat x; 16 | @property (nonatomic, assign) CGFloat y; 17 | /** 18 | * Shortcut for frame.origin.x. 19 | * 20 | * Sets frame.origin.x = left 21 | */ 22 | @property (nonatomic) CGFloat left; 23 | 24 | /** 25 | * Shortcut for frame.origin.y 26 | * 27 | * Sets frame.origin.y = top 28 | */ 29 | @property (nonatomic) CGFloat top; 30 | 31 | /** 32 | * Shortcut for frame.origin.x + frame.size.width 33 | * 34 | * Sets frame.origin.x = right - frame.size.width 35 | */ 36 | @property (nonatomic) CGFloat right; 37 | 38 | /** 39 | * Shortcut for frame.origin.y + frame.size.height 40 | * 41 | * Sets frame.origin.y = bottom - frame.size.height 42 | */ 43 | @property (nonatomic) CGFloat bottom; 44 | 45 | /** 46 | * Shortcut for frame.size.width 47 | * 48 | * Sets frame.size.width = width 49 | */ 50 | @property (nonatomic) CGFloat width; 51 | 52 | /** 53 | * Shortcut for frame.size.height 54 | * 55 | * Sets frame.size.height = height 56 | */ 57 | @property (nonatomic) CGFloat height; 58 | 59 | /** 60 | * Shortcut for center.x 61 | * 62 | * Sets center.x = centerX 63 | */ 64 | @property (nonatomic) CGFloat centerX; 65 | 66 | /** 67 | * Shortcut for center.y 68 | * 69 | * Sets center.y = centerY 70 | */ 71 | @property (nonatomic) CGFloat centerY; 72 | 73 | /** 74 | * Return the x coordinate on the screen. 75 | */ 76 | @property (nonatomic, readonly) CGFloat ttScreenX; 77 | 78 | /** 79 | * Return the y coordinate on the screen. 80 | */ 81 | @property (nonatomic, readonly) CGFloat ttScreenY; 82 | 83 | /** 84 | * Return the x coordinate on the screen, taking into account scroll views. 85 | */ 86 | @property (nonatomic, readonly) CGFloat screenViewX; 87 | 88 | /** 89 | * Return the y coordinate on the screen, taking into account scroll views. 90 | */ 91 | @property (nonatomic, readonly) CGFloat screenViewY; 92 | 93 | /** 94 | * Return the view frame on the screen, taking into account scroll views. 95 | */ 96 | @property (nonatomic, readonly) CGRect screenFrame; 97 | 98 | /** 99 | * Shortcut for frame.origin 100 | */ 101 | @property (nonatomic) CGPoint origin; 102 | 103 | /** 104 | * Shortcut for frame.size 105 | */ 106 | @property (nonatomic) CGSize size; 107 | 108 | /** 109 | * Return the width in portrait or the height in landscape. 110 | */ 111 | @property (nonatomic, readonly) CGFloat orientationWidth; 112 | 113 | /** 114 | * Return the height in portrait or the width in landscape. 115 | */ 116 | @property (nonatomic, readonly) CGFloat orientationHeight; 117 | 118 | /** 119 | * Finds the first descendant view (including this view) that is a member of a particular class. 120 | */ 121 | - (UIView*)descendantOrSelfWithClass:(Class)cls; 122 | 123 | /** 124 | * Finds the first ancestor view (including this view) that is a member of a particular class. 125 | */ 126 | - (UIView*)ancestorOrSelfWithClass:(Class)cls; 127 | 128 | /** 129 | * Removes all subviews. 130 | */ 131 | - (void)removeAllSubviews; 132 | 133 | /** 134 | * Calculates the offset of this view from another view in screen coordinates. 135 | * 136 | * otherView should be a parent view of this view. 137 | */ 138 | - (CGPoint)offsetFromView:(UIView*)otherView; 139 | 140 | /** 141 | +* Retrive all subviews recuisivly in the reciver 142 | */ 143 | 144 | - (NSArray*)allSubviews; 145 | @end 146 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/CollectionImageCell/JoyImageCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyImageCollectionViewCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/7/11. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | collectioncell 13 | */ 14 | @interface JoyImageCollectionViewCell : UICollectionViewCell 15 | - (void)setCellWithModel:(NSObject *)cellModel; 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/CollectionImageCell/JoyImageCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyImageCollectionViewCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/7/11. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyImageCollectionViewCell.h" 10 | #import "JoyCellBaseModel.h" 11 | #import "UIImageView+JoyCategory.h" 12 | 13 | @interface JoyImageCollectionViewCell () 14 | 15 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 16 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 17 | @end 18 | @implementation JoyImageCollectionViewCell 19 | 20 | - (void)awakeFromNib { 21 | [super awakeFromNib]; 22 | } 23 | - (void)setCellWithModel:(JoyImageCellBaseModel *)cellModel{ 24 | [self.imageView setImageWithUrlString:cellModel.avatar placeholderImage:[UIImage imageNamed:cellModel.placeHolderImageStr]]; 25 | self.titleLabel.text = cellModel.title; 26 | } 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftAvatarRightLabelCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftAvatarRightLabelCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/16. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JoyBaseCell.h" 11 | @interface JoyLeftAvatarRightLabelCell : JoyBaseCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftAvatarRightLabelCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftAvatarRightLabelCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/16. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyLeftAvatarRightLabelCell.h" 10 | #import "joy.h" 11 | @interface JoyLeftAvatarRightLabelCell () 12 | @property (weak, nonatomic) IBOutlet UIImageView *headImageView; 13 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 14 | 15 | @end 16 | @implementation JoyLeftAvatarRightLabelCell 17 | 18 | 19 | - (void)setCellWithModel:(JoyImageCellBaseModel *)model{ 20 | 21 | NSString *placeHolderImageStr = JOY_GETBUNDLE_PATH(model.avatarBundleName,model.placeHolderImageStr); 22 | 23 | SDIMAGE_LOAD(self.headImageView, model.avatar,placeHolderImageStr); 24 | if (model.title) { 25 | self.titleLabel.text = model.title; 26 | } 27 | if (model.titleColor) { 28 | self.titleLabel.textColor = model.titleColor; 29 | } 30 | if (model.title) { 31 | self.titleLabel.text = model.title; 32 | } 33 | if (model.viewShape == EImageTypeRound) { 34 | self.headImageView.layer.cornerRadius = 27; 35 | self.headImageView.layer.masksToBounds = YES; 36 | } 37 | } 38 | 39 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 40 | [super setSelected:selected animated:animated]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftAvatarRightTopBottomLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftAvatarRightTopBottomLabel.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/22. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | #import "UIImageView+JoyCategory.h" 11 | 12 | /** 13 | 左头像右上下label 14 | */ 15 | @interface JoyLeftAvatarRightTopBottomLabel : JoyBaseCell 16 | 17 | @property (weak, nonatomic) IBOutlet UIImageView *headImageView; 18 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 19 | @property (weak, nonatomic) IBOutlet UILabel *subtitleLabel; 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftAvatarRightTopBottomLabel.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftAvatarRightTopBottomLabel.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/22. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | 10 | #import "JoyLeftAvatarRightTopBottomLabel.h" 11 | #import "JoyCellBaseModel.h" 12 | #import "joy.h" 13 | 14 | @implementation JoyLeftAvatarRightTopBottomLabel 15 | -(void)setCellWithModel:(JoyImageCellBaseModel *)model{ 16 | NSString *placeHolderImageStr = JOY_GETBUNDLE_PATH(model.avatarBundleName,model.placeHolderImageStr); 17 | self.titleLabel.text = model.title; 18 | self.subtitleLabel.text = model.subTitle; 19 | if (model.titleColor) { 20 | self.titleLabel.textColor = model.titleColor; 21 | } 22 | if (model.subTitleColor) { 23 | self.subtitleLabel.textColor = model.subTitleColor; 24 | } 25 | SDIMAGE_LOAD(self.headImageView, model.avatar,placeHolderImageStr); 26 | 27 | 28 | // [self.headImageView setImageWithUrlString:model.avatar placeholderImage:[UIImage imageNamed:model.placeHolderImageStr]]; 29 | 30 | }@end 31 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftIconCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftIconCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/7/25. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | 12 | /** 13 | 左icon 右label 14 | */ 15 | @interface JoyLeftIconCell : JoyBaseCell 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftIconCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftIconCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/7/25. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyLeftIconCell.h" 10 | #import "JoyCellBaseModel.h" 11 | #import "joy.h" 12 | 13 | @interface JoyLeftIconCell () 14 | 15 | @property (weak, nonatomic) IBOutlet UIImageView *iconImageView; 16 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 17 | 18 | @end 19 | 20 | @implementation JoyLeftIconCell 21 | 22 | -(void)setCellWithModel:(JoyImageCellBaseModel *)model{ 23 | NSString *placeHolderImageStr = JOY_GETBUNDLE_PATH(model.avatarBundleName,model.placeHolderImageStr); 24 | SDIMAGE_LOAD(_iconImageView, model.avatar, placeHolderImageStr); 25 | 26 | if (model.viewShape == EImageTypeRound) { 27 | _iconImageView.layer.masksToBounds = YES; 28 | _iconImageView.layer.cornerRadius = 13; 29 | }else{ 30 | _iconImageView.layer.masksToBounds = NO; 31 | } 32 | _titleLabel.text = model.title; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftIconTopBottomLabelCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftIconTopBottomLabelCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/9/9. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | /** 12 | 左icon 右上下label 13 | */ 14 | @interface JoyLeftIconTopBottomLabelCell : JoyBaseCell 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftIconTopBottomLabelCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftIconTopBottomLabelCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/9/9. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyLeftIconTopBottomLabelCell.h" 10 | #import "joy.h" 11 | 12 | @interface JoyLeftIconTopBottomLabelCell () 13 | @property (weak, nonatomic) IBOutlet UIImageView *accessView; 14 | 15 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 16 | 17 | @property (weak, nonatomic) IBOutlet UILabel *subTitleLabel; 18 | @end 19 | 20 | @implementation JoyLeftIconTopBottomLabelCell 21 | 22 | - (void)awakeFromNib { 23 | [super awakeFromNib]; 24 | } 25 | 26 | -(void)setCellWithModel:(JoyImageCellBaseModel *)model{ 27 | self.titleLabel.text = model.title; 28 | self.subTitleLabel.text = model.subTitle; 29 | if (model.titleColor) { 30 | self.titleLabel.textColor = model.titleColor; 31 | } 32 | if (model.subTitleColor) { 33 | self.subTitleLabel.textColor = model.subTitleColor; 34 | } 35 | NSString *placeHolderImageStr = JOY_GETBUNDLE_PATH(model.avatarBundleName,model.placeHolderImageStr); 36 | self.accessView.image = model.placeHolderImageStr.length?[UIImage imageNamed:placeHolderImageStr]:nil; 37 | 38 | } 39 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 40 | [super setSelected:selected animated:animated]; 41 | 42 | // Configure the view for the selected state 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftLabelRightIconCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftLabelRightIconCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/5/11. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | @interface JoyLeftLabelRightIconCell : JoyBaseCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableImageCell/JoyLeftLabelRightIconCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftLabelRightIconCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/5/11. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyLeftLabelRightIconCell.h" 10 | #import "JoyCellBaseModel.h" 11 | #import "joy.h" 12 | 13 | @interface JoyLeftLabelRightIconCell () 14 | 15 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 16 | @property (weak, nonatomic) IBOutlet UIImageView *imageVIew; 17 | @end 18 | @implementation JoyLeftLabelRightIconCell 19 | 20 | 21 | - (void)setCellWithModel:(JoyImageCellBaseModel *)model{ 22 | self.titleLabel.text = model.title; 23 | NSString *placeHolderImageStr = JOY_GETBUNDLE_PATH(model.avatarBundleName,model.placeHolderImageStr); 24 | 25 | SDIMAGE_LOAD(self.imageVIew, model.avatar, placeHolderImageStr); 26 | if (model.titleColor) { 27 | self.titleLabel.textColor = model.titleColor; 28 | } 29 | if (model.viewShape == EImageTypeRound) { 30 | self.imageVIew.layer.masksToBounds = YES; 31 | self.imageVIew.layer.cornerRadius =self.imageVIew.frame.size.height/2; 32 | }else{ 33 | self.imageVIew.layer.masksToBounds = NO; 34 | } 35 | } 36 | 37 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 38 | [super setSelected:selected animated:animated]; 39 | 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyLeftLabelTextViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftLabelTextViewCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/8/31. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | 12 | /** 13 | 左文本右textview 14 | */ 15 | @interface JoyLeftLabelTextViewCell : JoyBaseCell 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyTextCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyTextCell 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/16. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 左title 右文本 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | /** 12 | 左title 右文本 13 | */ 14 | @interface JoyTextCell : JoyBaseCell 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyTextCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyTextCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/16. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyTextCell.h" 10 | #import "JoyCellBaseModel.h" 11 | #import "NSString+JoyCategory.h" 12 | #import "UITextField+JoyCategory.h" 13 | #import "joy.h" 14 | 15 | @interface JoyTextCell() 16 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 17 | @property (weak, nonatomic) IBOutlet UITextField *textFieldText; 18 | @property (nonatomic,copy) NSString *inputOldStr; 19 | @property (nonatomic,copy)NSString *changeTextKey; 20 | @end 21 | 22 | @implementation JoyTextCell 23 | 24 | - (void)setCellWithModel:(JoyTextCellBaseModel *)model{ 25 | self.changeTextKey = model.changeKey; 26 | self.textFieldText.keyboardType = model.keyboardType?model.keyboardType:UIKeyboardTypeDefault; 27 | [self.textFieldText setTextMaxNum:model.maxNumber]; 28 | self.textFieldText.secureTextEntry = model.secureTextEntry; 29 | if (self.maxNum && model.subTitle.strLength> self.maxNum) { 30 | model.subTitle = [model.subTitle subToMaxIndex:self.maxNum]; 31 | } 32 | self.titleLabel.text = model.title; 33 | self.textFieldText.text = model.subTitle; 34 | self.textFieldText.placeholder = model.placeHolder; 35 | objc_setAssociatedObject(self, @selector(editingEnd:), model, OBJC_ASSOCIATION_RETAIN); 36 | if (model.titleColor) { 37 | self.titleLabel.textColor = model.titleColor; 38 | } 39 | if (model.placeHolder) { 40 | NSMutableAttributedString *placeholder = [[NSMutableAttributedString alloc]initWithString:model.placeHolder]; 41 | [placeholder addAttribute:NSForegroundColorAttributeName 42 | value:UIColorFromRGB(0x95989F) 43 | range:NSMakeRange(0, model.placeHolder.length)]; 44 | self.textFieldText.attributedPlaceholder = placeholder; 45 | 46 | } 47 | } 48 | 49 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 50 | [super setSelected:selected animated:animated]; 51 | } 52 | 53 | - (IBAction)editDidBegin:(id)sender { 54 | 55 | } 56 | 57 | - (IBAction)editingEnd:(UITextField *)textField { 58 | if ([self.delegate respondsToSelector:@selector(textChanged:andText:andChangedKey:)]) { 59 | JoyTextCellBaseModel *model = objc_getAssociatedObject(self, _cmd); 60 | model.subTitle = textField.text; 61 | [self.delegate textChanged:self.index andText:textField.text andChangedKey:self.changeTextKey]; 62 | } 63 | } 64 | 65 | - (BOOL)textViewShouldBeginEditing:(UITextView *)textView{ 66 | if ([self.delegate respondsToSelector:@selector(textshouldBeginEditWithTextContainter:andIndexPath:)]) { 67 | [self.delegate textshouldBeginEditWithTextContainter:textView andIndexPath:self.index]; 68 | } 69 | return YES; 70 | } 71 | 72 | - (BOOL)textViewShouldEndEditing:(UITextView *)textView{ 73 | if ([self.delegate respondsToSelector:@selector(textshouldEndEditWithTextContainter:andIndexPath:)]) { 74 | [self.delegate textshouldEndEditWithTextContainter:textView andIndexPath:self.index]; 75 | } 76 | return YES; 77 | } 78 | - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ 79 | if ([self.delegate respondsToSelector:@selector(textshouldBeginEditWithTextContainter:andIndexPath:)]) { 80 | [self.delegate textshouldBeginEditWithTextContainter:textField andIndexPath:self.index]; 81 | } 82 | return YES; 83 | } 84 | 85 | - (BOOL)textFieldShouldEndEditing:(UITextField *)textField{ 86 | if ([self.delegate respondsToSelector:@selector(textshouldEndEditWithTextContainter:andIndexPath:)]) { 87 | [self.delegate textshouldEndEditWithTextContainter:textField andIndexPath:self.index]; 88 | } 89 | return YES; 90 | } 91 | 92 | - (BOOL)textFieldShouldReturn:(UITextField *)textField{ 93 | [textField resignFirstResponder]; 94 | return YES; 95 | } 96 | 97 | @end 98 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyTextNoLabelCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TNATextAndTitleTopDownTableCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/7/12. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | /** 12 | 纯文本 13 | */ 14 | @interface JoyTextNoLabelCell : JoyBaseCell 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLTextCell/JoyTextNoLabelCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyBaseCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyBaseCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/16. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | //十六进制颜色赋值 10 | 11 | 12 | #import "UIView+JoyCategory.h" 13 | #import "JoyCellBaseModel.h" 14 | #import "UIImageView+JoyCategory.h" 15 | #import "UITableViewCell+JoyCell.h" 16 | /** 17 | 基类cell 18 | */ 19 | 20 | @interface JoyBaseCell : UITableViewCell 21 | @property (assign, nonatomic) NSInteger maxNum; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyBaseCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyBaseCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/16. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | @implementation JoyBaseCell 12 | 13 | 14 | - (void)setCellWithModel:(NSObject *)model{ 15 | 16 | } 17 | 18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 19 | [super setSelected:selected animated:animated]; 20 | 21 | // Configure the view for the selected state 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyBaseCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyLeftLabelRightPlaceHolderLabelCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftLabelRightPlaceHolderLabelCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/4/15. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | 12 | /** 13 | 左label 右placeholderLabel 14 | */ 15 | @interface JoyLeftLabelRightPlaceHolderLabelCell : JoyBaseCell 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyLeftLabelRightPlaceHolderLabelCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftLabelRightPlaceHolderLabelCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/4/15. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyLeftLabelRightPlaceHolderLabelCell.h" 10 | #import "JoyCellBaseModel.h" 11 | #import "joy.h" 12 | @interface JoyLeftLabelRightPlaceHolderLabelCell () 13 | 14 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 15 | @property (weak, nonatomic) IBOutlet UILabel *subTitleLabel; 16 | @property (weak, nonatomic) IBOutlet UILabel *placeHolderLabe; 17 | 18 | @end 19 | 20 | @implementation JoyLeftLabelRightPlaceHolderLabelCell 21 | 22 | - (void)awakeFromNib { 23 | [super awakeFromNib]; 24 | // Initialization code 25 | } 26 | 27 | - (void)setCellWithModel:(JoyCellBaseModel *)model{ 28 | self.titleLabel.text = model.title; 29 | self.subTitleLabel.text = model.subTitle; 30 | self.titleLabel.textColor = model.titleColor?:UIColorFromRGB(0x000000); 31 | self.placeHolderLabe.text = model.placeHolder; 32 | self.placeHolderLabe.hidden = self.subTitleLabel.text.length; 33 | } 34 | 35 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 36 | [super setSelected:selected animated:animated]; 37 | 38 | // Configure the view for the selected state 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyLeftMiddleRightLabelCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftMiddleRightLabelCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/16. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | @interface JoyLeftMiddleRightLabelCell : JoyBaseCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyLeftMiddleRightLabelCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyLeftMiddleRightLabelCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/16. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyLeftMiddleRightLabelCell.h" 10 | 11 | @interface JoyLeftMiddleRightLabelCell () 12 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 13 | @property (weak, nonatomic) IBOutlet UILabel *middleLabel; 14 | @property (weak, nonatomic) IBOutlet UILabel *rightLabel; 15 | 16 | @end 17 | 18 | @implementation JoyLeftMiddleRightLabelCell 19 | 20 | - (void)setCellWithModel:(JoyCellBaseModel *)model{ 21 | JoyCellBaseModel *setModel = (JoyCellBaseModel *)model; 22 | self.titleLabel.text = setModel.title; 23 | self.middleLabel.text = setModel.topicTitle; 24 | self.rightLabel.text = model.subTitle; 25 | if (model.titleColor) { 26 | self.titleLabel.textColor = model.titleColor; 27 | } 28 | if (model.subTitleColor) { 29 | self.middleLabel.textColor = model.subTitleColor; 30 | } 31 | 32 | } 33 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 34 | [super setSelected:selected animated:animated]; 35 | 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyMiddleLabelCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyMiddleLabelCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/7/27. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | @interface JoyMiddleLabelCell : JoyBaseCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyMiddleLabelCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyMiddleLabelCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/7/27. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyMiddleLabelCell.h" 10 | 11 | @interface JoyMiddleLabelCell () 12 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 13 | 14 | @end 15 | 16 | @implementation JoyMiddleLabelCell 17 | 18 | - (void)setCellWithModel:(JoyCellBaseModel *)model{ 19 | self.titleLabel.text = model.title; 20 | if (model.titleColor) { 21 | self.titleLabel.textColor = model.titleColor; 22 | } 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableLabelCell/JoyMiddleLabelCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableSwitchCell/JoySwitchCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoySwitchCell.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/5/11. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseCell.h" 10 | 11 | 12 | /** 13 | 开关cell 14 | */ 15 | @interface JoySwitchCell : JoyBaseCell 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/CellsLibruary/TableSwitchCell/JoySwitchCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // SwitchCell.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/5/11. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoySwitchCell.h" 10 | #import "JoyCellBaseModel.h" 11 | 12 | @interface JoySwitchCell () 13 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 14 | @property (weak, nonatomic) IBOutlet UISwitch *mySwitch; 15 | 16 | @end 17 | 18 | @implementation JoySwitchCell 19 | 20 | - (void)awakeFromNib { 21 | [super awakeFromNib]; 22 | } 23 | 24 | -(void)setCellWithModel:(JoySwitchCellBaseModel *)model{ 25 | self.titleLabel.text = model.title; 26 | self.mySwitch.userInteractionEnabled = !model.disable; 27 | self.mySwitch.on = model.on; 28 | __block JoySwitchCellBaseModel *switchModel = model; 29 | __weak typeof (self) weakSelf = self; 30 | model.aToBCellBlock= ^(id onState){ 31 | switchModel.on = [onState boolValue]; 32 | [weakSelf.mySwitch setOn:[onState boolValue] animated:NO]; 33 | [weakSelf.mySwitch layoutIfNeeded]; 34 | }; 35 | objc_setAssociatedObject(self, @selector(switchValueChanged:), model, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 36 | } 37 | 38 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 39 | [super setSelected:selected animated:animated]; 40 | } 41 | 42 | - (IBAction)switchValueChanged:(UISwitch *)sender { 43 | JoySwitchCellBaseModel *model = objc_getAssociatedObject(self, _cmd) ; 44 | model.on = sender.on; 45 | if ([self.delegate respondsToSelector:@selector(textChanged:andText:andChangedKey:)]) { 46 | [self.delegate textChanged:self.index andText:(NSString *)@(sender.on) andChangedKey:model.changeKey]; 47 | } 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Common/JoyTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyTool.h 3 | // Pods 4 | // 5 | // Created by wangguopeng on 2017/4/12. 6 | // 7 | // 8 | 9 | #ifndef JoyTool_h 10 | #define JoyTool_h 11 | 12 | #import "Joy.h" 13 | #import "JoyAlert.h" 14 | #import "JoyDatePickView.h" 15 | #import "JoyPickerView.h" 16 | #import "JoyUISegementView.h" 17 | #import "JoyCollectionView.h" 18 | #import "JoyBaseModel.h" 19 | 20 | #import "JoyNavProtocol.h" 21 | #import "TNACellModelProtocol.h" 22 | #import "JoyProtoCol.h" 23 | 24 | #import "JoyBaseVC.h" 25 | #import "JoyTableAutoLayoutView.h" 26 | #import "JoyPresenterBase.h" 27 | #import "JoyInteractorBase.h" 28 | #import "JoySectionBaseModel.h" 29 | #import "JoyCellBaseModel.h" 30 | 31 | #import "JoyCellBaseModel+Action.h" 32 | #import "JoyCellBaseModel+Edit.h" 33 | #import "JoyBaseVC+Extention.h" 34 | #import "NSObject+JoyRouter.h" 35 | #import "NSString+JoyCategory.h" 36 | #import "UIBarButtonItem+JoyBarItem.h" 37 | #import "UIImageView+JoyCategory.h" 38 | #import "UITableViewCell+JoyCell.h" 39 | #import "UITextField+JoyCategory.h" 40 | #import "UIView+JoyCategory.h" 41 | 42 | #define JoyImageCollectionViewCell @"JoyImageCollectionViewCell" //collectionVieeCell 43 | #define JoyLeftAvatarRightLabelCell @"JoyLeftAvatarRightLabelCell" //左头像右label 44 | #define JoyLeftAvatarRightTopBottomLabel @"JoyLeftAvatarRightTopBottomLabel" //左头像右上下label 45 | #define JoyLeftIconCell @"JoyLeftIconCell" //左icon右label 46 | #define JoyLeftIconTopBottomLabelCell @"JoyLeftIconTopBottomLabelCell" //左icon右上下label 47 | #define JoyLeftLabelRightIconCell @"JoyLeftLabelRightIconCell" //左label右icon 48 | #define JoyLeftLabelRightPlaceHolderLabelCell @"JoyLeftLabelRightPlaceHolderLabelCell" //左label右placeholder label 49 | #define JoyLeftLabelTextViewCell @"JoyLeftLabelTextViewCell" //左label右placeholde textview 50 | #define JoyLeftMiddleRightLabelCell @"JoyLeftMiddleRightLabelCell" //左中右label 51 | #define JoyMiddleLabelCell @"JoyMiddleLabelCell" //中label 52 | #define JoyTextCell @"JoyTextCell" //左label右textfield 53 | #define JoyTextNoLabelCell @"JoyTextNoLabelCell" //空textfield 54 | 55 | #endif /* JoyTool_h */ 56 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Controllers/JoyBaseVC+Extention.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyBaseVC+Extention.h 3 | // 4 | // Created by wangguopeng on 2017/3/15. 5 | // Copyright © 2017年 JoyMake. All rights reserved. 6 | // 7 | 8 | #import "JoyBaseVC.h" 9 | 10 | @interface JoyBaseVC (Extention) 11 | 12 | #pragma mark 禁用导航按钮 13 | - (void)disableRightNavItem; 14 | 15 | #pragma mark 启用导航按钮 16 | - (void)enableRightNavItem; 17 | 18 | #pragma mark 开始moblog 19 | - (void)moblogStartOrEnd:(BOOL)isStart; 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Controllers/JoyBaseVC+Extention.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyBaseVC+Extention.m 3 | // 4 | // Created by wangguopeng on 2017/3/15. 5 | // Copyright © 2017年 JoyMake. All rights reserved. 6 | // 7 | 8 | #import "JoyBaseVC+Extention.h" 9 | #if __has_include () 10 | #import 11 | #define MobClickLog [MobClick beginLogPageView:NSStringFromClass([self class])] 12 | #define MobEndLog [MobClick endLogPageView:NSStringFromClass([self class])] 13 | #else 14 | #define MobClickLog 15 | #define MobEndLog 16 | #endif 17 | 18 | @implementation JoyBaseVC (Extention) 19 | 20 | - (void)disableRightNavItem{ 21 | [self.navigationItem.rightBarButtonItems enumerateObjectsUsingBlock:^(UIBarButtonItem * obj, NSUInteger idx, BOOL * _Nonnull stop) { 22 | obj.enabled = NO; 23 | }]; 24 | } 25 | 26 | -(void)enableRightNavItem{ 27 | [self.navigationItem.rightBarButtonItems enumerateObjectsUsingBlock:^(UIBarButtonItem * obj, NSUInteger idx, BOOL * _Nonnull stop) { 28 | obj.enabled = YES; 29 | }]; 30 | } 31 | 32 | - (void)moblogStartOrEnd:(BOOL)isStart{ 33 | if (isStart){MobClickLog;} 34 | else{MobEndLog;} 35 | } 36 | 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Controllers/JoyBaseVC.h: -------------------------------------------------------------------------------- 1 | 2 | // Created by wangguopeng on 16/3/16. 3 | // Copyright © 2016年 Joy. All rights reserved. 4 | // vc基类 5 | 6 | #import 7 | #import "joy.h" 8 | #import "JoyNavProtocol.h" 9 | 10 | @interface JoyBaseVC : UIViewController 11 | 12 | #pragma mark每个子controller的标题,按需所传 13 | @property(nonatomic,copy)NSString *titleStr; 14 | 15 | #pragma mark 需要返回的页面,不传则返回上一级页面 16 | @property (nonatomic,copy) NSString *popVCName; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Interactor/JoyInteractorBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyInteractorBase.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/8/23. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | 10 | #define KHeadSectionH 10 11 | #define KNormalSectionH 40 12 | #define KSepatatorInsetLeading 90 13 | 14 | #import 15 | #import "joy.h" 16 | @interface JoyInteractorBase : NSObject 17 | 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Interactor/JoyInteractorBase.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyInteractorBase.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/8/23. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyInteractorBase.h" 10 | @implementation JoyInteractorBase 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Models/JoyBaseModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyBaseModel.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/5/30. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JoyBaseModel : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Models/JoyBaseModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyBaseModel.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/5/30. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyBaseModel.h" 10 | #import 11 | 12 | @implementation JoyBaseModel 13 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key 14 | { 15 | NSLog(@"%@未定义",key); 16 | } 17 | 18 | -(id)valueForUndefinedKey:(NSString *)key{ 19 | NSLog(@"找不到%@对应的字段",key); 20 | return nil; 21 | } 22 | 23 | - (id)copyWithZone:(NSZone *)zone 24 | 25 | { 26 | 27 | id objCopy = [[[self class] allocWithZone:zone] init]; 28 | 29 | Class clazz = [self class]; 30 | 31 | u_int count; 32 | 33 | objc_property_t* properties = class_copyPropertyList(clazz, &count); 34 | 35 | NSMutableArray* propertyArray = [NSMutableArray arrayWithCapacity:count]; 36 | 37 | for (int i = 0; i < count ; i++) 38 | 39 | { 40 | 41 | const char* propertyName = property_getName(properties[i]); 42 | 43 | [propertyArray addObject:[NSString stringWithCString:propertyName encoding:NSUTF8StringEncoding]]; 44 | 45 | } 46 | 47 | free(properties); 48 | 49 | for (int i = 0; i < count ; i++) 50 | 51 | { 52 | 53 | NSString *name=[propertyArray objectAtIndex:i]; 54 | 55 | id value=[self valueForKey:name]; 56 | 57 | if([value respondsToSelector:@selector(copyWithZone:)]){ 58 | 59 | [objCopy setValue:[value copy] forKey:name]; 60 | 61 | }else{ 62 | 63 | [objCopy setValue:value forKey:name]; 64 | 65 | } 66 | 67 | } 68 | 69 | return objCopy; 70 | 71 | } 72 | 73 | - (id)mutableCopyWithZone:(NSZone *)zone 74 | 75 | { 76 | 77 | id objCopy = [[[self class] allocWithZone:zone] init]; 78 | 79 | Class clazz = [self class]; 80 | 81 | u_int count; 82 | 83 | objc_property_t* properties = class_copyPropertyList(clazz, &count); 84 | 85 | NSMutableArray* propertyArray = [NSMutableArray arrayWithCapacity:count]; 86 | 87 | for (int i = 0; i < count ; i++) 88 | 89 | { 90 | 91 | const char* propertyName = property_getName(properties[i]); 92 | 93 | [propertyArray addObject:[NSString stringWithCString:propertyName encoding:NSUTF8StringEncoding]]; 94 | 95 | } 96 | 97 | free(properties); 98 | 99 | for (int i = 0; i < count ; i++) 100 | 101 | { 102 | 103 | NSString *name=[propertyArray objectAtIndex:i]; 104 | 105 | id value=[self valueForKey:name]; 106 | if([name isEqualToString:@"registeredPlugins"]){ 107 | NSLog(@""); 108 | } 109 | if([value respondsToSelector:@selector(mutableCopyWithZone:)]){ 110 | 111 | [objCopy setValue:[value mutableCopy] forKey:name]; 112 | 113 | }else{ 114 | 115 | [objCopy setValue:value forKey:name]; 116 | 117 | } 118 | 119 | } 120 | 121 | return objCopy; 122 | 123 | } 124 | 125 | @end 126 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Models/JoyCellBaseModel+Action.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyCellBaseModel+Action.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2016/12/27. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyCellBaseModel.h" 10 | 11 | @interface JoyCellBaseModel (Action) 12 | //点击事件回调时实现model的回调函数,执行此函数 13 | - (void)didSelect; 14 | 15 | - (void)goVC:(UIViewController *)vc; 16 | 17 | - (UINavigationController *)getNav; 18 | 19 | - (void)goBack; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Models/JoyCellBaseModel+Action.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyCellBaseModel+Action.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2016/12/27. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyCellBaseModel+Action.h" 10 | @implementation JoyCellBaseModel (Action) 11 | 12 | - (void)didSelect 13 | { 14 | if (self.tapAction) 15 | { 16 | SEL selector = NSSelectorFromString(self.tapAction); 17 | IMP imp = [self methodForSelector:selector]; 18 | void (*func)(id, SEL) = (void *)imp; 19 | if ([self respondsToSelector:selector]) 20 | {func(self, selector);} 21 | } 22 | } 23 | 24 | - (void)goVC:(UIViewController *)vc{ 25 | [[self getNav] pushViewController:vc animated:YES]; 26 | } 27 | 28 | - (UINavigationController *)getNav 29 | { 30 | UITabBarController *tabBarVC = (UITabBarController *)[UIApplication sharedApplication].keyWindow.rootViewController; 31 | if ([tabBarVC isKindOfClass:[UITabBarController class]]) 32 | { 33 | return tabBarVC.selectedViewController; 34 | } 35 | else if ([tabBarVC isKindOfClass:[UINavigationController class]]) 36 | { 37 | return (UINavigationController *)tabBarVC; 38 | } 39 | else 40 | { 41 | return [[UINavigationController alloc]initWithRootViewController:tabBarVC]; 42 | } 43 | } 44 | 45 | - (void)goBack{ 46 | [[self getNav] popViewControllerAnimated:YES]; 47 | } 48 | 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Models/JoyCellBaseModel+Edit.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyCellBaseModel+Edit.h 3 | // Pods 4 | // 5 | // Created by wangguopeng on 2017/4/7. 6 | // 7 | // 8 | 9 | #import"JoyCellBaseModel.h" 10 | 11 | @interface JoyCellBaseModel (Edit) 12 | @property (nonatomic,assign) BOOL canMove; 13 | 14 | @property (nonatomic,assign) BOOL selected; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Models/JoyCellBaseModel+Edit.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyCellBaseModel+Edit.m 3 | // Pods 4 | // 5 | // Created by wangguopeng on 2017/4/7. 6 | // 7 | // 8 | 9 | #import "JoyCellBaseModel+Edit.h" 10 | #import 11 | 12 | @implementation JoyCellBaseModel (Edit) 13 | 14 | -(void)setCanMove:(BOOL)canMove{ 15 | objc_setAssociatedObject(self, _cmd, @(canMove), OBJC_ASSOCIATION_ASSIGN); 16 | } 17 | 18 | -(BOOL)canMove{ 19 | return [objc_getAssociatedObject(self, @selector(setCanMove:)) boolValue]?:NO; 20 | } 21 | 22 | -(void)setSelected:(BOOL)selected{ 23 | objc_setAssociatedObject(self, _cmd, @(selected), OBJC_ASSOCIATION_ASSIGN); 24 | } 25 | 26 | -(BOOL)selected{ 27 | return [objc_getAssociatedObject(self, @selector(setSelected:)) boolValue]?:NO; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Models/JoyCellBaseModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyCellBaseModel 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/16. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | 8 | // 禁止随意扩充此类⚠️ 9 | // 禁止随意扩充此类⚠️ 10 | // 禁止随意扩充此类⚠️ 11 | // 禁止随意扩充此类⚠️ 12 | // 所有业务类字段和方法请在子类中实现⚠️ 13 | 14 | #import 15 | #import 16 | 17 | typedef NS_ENUM(NSInteger,ECellType) { 18 | ECellXibType, 19 | ECellCodeType 20 | }; 21 | 22 | typedef NS_ENUM(NSInteger,ETextCellType) { 23 | leftViewModel, 24 | rightViewModel, 25 | normalModel 26 | }; 27 | 28 | typedef NS_ENUM(NSInteger,EImageType) { 29 | EImageTypeRound, 30 | EImageTypeSquare 31 | }; 32 | 33 | 34 | typedef NS_ENUM(NSInteger,ERefreshScheme) { 35 | ERefreshSchemeRow, //单列 36 | ERefreshSchemeSection, //单section 37 | ERefreshSchemeTable, //整个table 38 | ERefreshSchemeView //整个view 扩展类使用 39 | 40 | }; 41 | 42 | 43 | typedef void(^CellBlock)(id obj,ERefreshScheme refreshScheme); 44 | 45 | typedef void(^AToBCellBlock)(id obj); 46 | 47 | @interface JoyCellBaseModel : NSObject{ 48 | NSString *_cellName; 49 | } 50 | //cellType xib 或代码 51 | @property (nonatomic,assign) ECellType cellType; 52 | 53 | // 背景色 54 | @property (nonatomic,strong) UIColor *backgroundColor; 55 | 56 | //标题 57 | @property (nonatomic,copy) NSString *title; 58 | 59 | //标题颜色 60 | @property (nonatomic,strong) UIColor *titleColor; 61 | 62 | //副标题 63 | @property (nonatomic,copy) NSString *subTitle; 64 | 65 | //标题颜色 66 | @property (nonatomic,strong) UIColor *subTitleColor; 67 | 68 | //副标题 69 | @property (nonatomic,copy) NSString *topicTitle; 70 | 71 | //右箭头隐藏与否 yes隐藏 no显示 72 | @property (nonatomic,assign) UITableViewCellAccessoryType accessoryType; 73 | 74 | //cell的编辑类型 75 | @property (nonatomic,assign) UITableViewCellEditingStyle editingStyle; 76 | 77 | //cell的名字,复用使用 78 | @property (nonatomic,copy) NSString *cellName; 79 | 80 | //bundleName xib且非公共cell时,需要传自己的bundle名字 81 | @property (nonatomic,copy) NSString *bundleName; 82 | 83 | //二级副标题 84 | @property (nonatomic,copy) NSString *placeHolder; 85 | 86 | //cell的高度 87 | @property (nonatomic,assign) CGFloat cellH; 88 | 89 | //点击事件的sel name 在子类中实现 90 | @property (nonatomic,copy) NSString *tapAction; 91 | 92 | //文本类cell text发生变化时传回的key值用于修改对象对应的值 93 | @property (nonatomic,copy) NSString *changeKey; 94 | 95 | //值改变事件 96 | @property (nonatomic,copy) NSString *valuechangeAction; 97 | 98 | @property (nonatomic,assign) bool disable; 99 | 100 | //点击事件回调时实现model的回调函数,执行此函数 101 | @property (nonatomic,copy)CellBlock cellBlock; 102 | 103 | //正向传值,以减少没必要的cell刷新 104 | @property (nonatomic,copy)AToBCellBlock aToBCellBlock; 105 | 106 | @end 107 | 108 | 109 | #pragma mark 文本类型model 110 | @interface JoyTextCellBaseModel : JoyCellBaseModel 111 | 112 | //文本的边框类型 113 | @property (nonatomic,assign) UITextBorderStyle borderStyle; 114 | 115 | //文本类 text密码键盘 116 | @property (nonatomic,assign) BOOL secureTextEntry; 117 | 118 | @property (nonatomic,assign) ETextCellType textFieldModel; 119 | 120 | //文本类cell text max字符数量 121 | @property (nonatomic,assign) NSInteger maxNumber; 122 | 123 | //文本类 text 键盘类型 124 | @property (nonatomic,assign) UIKeyboardType keyboardType; 125 | 126 | @end 127 | 128 | #pragma mark 图片类型model 129 | @interface JoyImageCellBaseModel : JoyCellBaseModel 130 | @property (nonatomic,copy) NSString *avatarBundleName; 131 | 132 | @property (nonatomic,copy) NSString *avatar; 133 | 134 | @property (nonatomic,assign) EImageType viewShape; 135 | 136 | @property (nonatomic,copy) NSString *placeHolderImageStr; 137 | @end 138 | 139 | #pragma mark 开关类型model 140 | @interface JoySwitchCellBaseModel : JoyCellBaseModel 141 | @property (nonatomic,assign) BOOL on; 142 | 143 | @end 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Models/JoyCellBaseModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyCellBaseModel 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/16. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyCellBaseModel.h" 10 | //#import "AppDelegate.h" 11 | 12 | @implementation JoyCellBaseModel 13 | 14 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key 15 | { 16 | NSLog(@"%@",key); 17 | } 18 | 19 | -(id)valueForUndefinedKey:(NSString *)key{ 20 | NSLog(@"找不到%@对应的字段",key); 21 | return nil; 22 | } 23 | 24 | //@synthesize cellName = _cellName; 25 | -(void)setCellName:(NSString *)cellName{ 26 | _cellName = cellName; 27 | } 28 | 29 | -(NSString *)cellName{ 30 | return _cellName?:@"JoyLeftMiddleRightLabelCell"; 31 | } 32 | 33 | @end 34 | 35 | 36 | @implementation JoyTextCellBaseModel 37 | -(NSString *)cellName{ 38 | return _cellName?:@"JoyTextNoLabelCell"; 39 | } 40 | 41 | @end 42 | 43 | @implementation JoyImageCellBaseModel 44 | -(NSString *)cellName{ 45 | return _cellName?:@"JoyLeftAvatarRightLabelCell"; 46 | } 47 | 48 | @end 49 | 50 | @implementation JoySwitchCellBaseModel 51 | -(NSString *)cellName{ 52 | return _cellName?:@"JoySwitchCell"; 53 | } 54 | 55 | @end 56 | //OC最初设定@property和@synthesize的作用: 57 | // 58 | //@property的作用是定义属性,声明getter,setter方法。(注意:属性不是变量) 59 | //@synthesize的作用是实现属性的,如getter,setter方法. 60 | //在声明属性的情况下如果重写setter,getter,方法,就需要把未识别的变量在@synthesize中定义,把属性的存取方法作用于变量。如: 61 | // 62 | //.h文件中 63 | // 64 | //后来因为使用@property灰常频繁,就简略了@synthesize的表达。 65 | // 66 | //从Xcode4.4以后@property已经独揽了@synthesize的功能主要有三个作用: 67 | // 68 | //(1)生成了私有的带下划线的的成员变量因此子类不可以直接访问,但是可以通过get/set方法访问。那么如果想让定义的成员变量让子类直接访问那么只能在.h文件中定义成员    变量了,因为它默认是@protected 69 | //(2)生成了get/set方法的实现 70 | //当: 71 | //用@property声明的成员属性,相当于自动生成了setter getter方法,如果重写了set和get方法,与@property声明的成员属性就不是一个成员属性了,是另外一个实例变量,而这个实例变量需要手动声明。所以会报错误。 72 | //总结:一定要分清属性和变量的区别,不能混淆。@synthesize 声明的属性=变量。意思是,将属性的setter,getter方法,作用于这个变量。 73 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Models/JoySectionBaseModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoySectionBaseModel 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/23. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface JoySectionBaseModel : NSObject 13 | @property (nonatomic,strong)NSMutableArray *rowArrayM; 14 | @property (nonatomic,assign)CGFloat sectionH; 15 | @property (nonatomic,assign)CGFloat sectionFootH; 16 | @property (nonatomic,copy) NSString *sectionTitle; 17 | @property (nonatomic,copy) NSString *sectionSubTitle; 18 | @property (nonatomic,copy) NSString *sectionFootTitle; 19 | @property (nonatomic,copy) NSString *sectionKey; 20 | @property (nonatomic,assign) CGFloat sectionLeadingOffSet; 21 | 22 | 23 | + (instancetype)sectionWithHeaderModel:(id)sectionHeaderModel footerModel:(id)sectionFooterModel cellModels:(NSArray *)cellModels sectionH:(CGFloat)sectionH sectionTitle:(NSString *)sectionTitle; 24 | @end 25 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Models/JoySectionBaseModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoySectionBaseModel 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/3/23. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoySectionBaseModel.h" 10 | 11 | @implementation JoySectionBaseModel 12 | -(NSMutableArray *)rowArrayM{ 13 | if (!_rowArrayM) { 14 | _rowArrayM = [NSMutableArray arrayWithCapacity:0]; 15 | } 16 | return _rowArrayM; 17 | } 18 | 19 | + (instancetype)sectionWithHeaderModel:(id)sectionHeaderModel footerModel:(id)sectionFooterModel cellModels:(NSArray *)cellModels sectionH:(CGFloat)sectionH sectionTitle:(NSString *)sectionTitle{ 20 | JoySectionBaseModel *sectionModel = [[JoySectionBaseModel alloc]init]; 21 | sectionModel.sectionH = sectionH; 22 | sectionModel.sectionTitle = sectionTitle; 23 | [sectionModel.rowArrayM addObjectsFromArray:cellModels]; 24 | return sectionModel; 25 | } 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Presenter/JoyPresenterBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyPresenterBase.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/8/23. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | #import "joy.h" 12 | 13 | @class JoyBaseVC; 14 | @interface JoyPresenterBase : NSObject 15 | @property (nonatomic, weak)UIView *rootView; 16 | 17 | - (id)initWithView:(UIView *)view; 18 | @property (nonatomic,strong,readonly) JoyBaseVC *currentVC; 19 | #pragma mark 屏蔽右导航 20 | - (void)disableRightNavItem; 21 | 22 | #pragma mark 启用右导航 23 | -(void)enableRightNavItem; 24 | 25 | #pragma mark navitemClickAction 26 | - (void)leftNavItemClickAction; 27 | 28 | - (void)rightNavItemClickAction; 29 | 30 | #pragma mark 返回 31 | - (void)goBack; 32 | 33 | #pragma MARk goVC 34 | - (void)goVC:(JoyBaseVC *)vc; 35 | 36 | - (void)presentVC:(UIViewController *)vc; 37 | 38 | #pragma mark gobackAction 39 | - (void)popToVCWithVCName:(NSString *)vcName; 40 | 41 | #pragma MARk goRoot 42 | - (void)popToRootVC; 43 | 44 | #pragma mark private method Action 45 | - (void)performTapAction:(NSString *)tapActionStr; 46 | 47 | #pragma mark reloadData 48 | - (void)reloadDataSource; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Protocols/JoyNavProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyNavProtocol.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/3/15. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class JoyBaseVC; 12 | @protocol JoyNavProtocol 13 | #pragma mark 设置导航 默认返回图片是 \header_icon_back 所有参数均可不传 action 默认rightNavItemClickAction 14 | - (void)setRightNavItemWithTitle:(NSString *)rightNavItemTitle 15 | andImageStr:(NSString *)normalImageStr 16 | andHighLightImageStr:(NSString *)highLightImageStr 17 | action:(SEL)action 18 | bundle:(NSString *)bundleName; 19 | 20 | #pragma mark 设置导航 默认返回图片是 header_icon_back 所有参数均可不传 action 默认leftNavItemClickAction 21 | - (void)setLeftNavItemWithTitle:(NSString *)leftNavItemTitle 22 | andImageStr:(NSString *)normalImageStr 23 | andHighLightImageStr:(NSString *)highLightImageStr 24 | action:(SEL)action 25 | bundle:(NSString *)bundleName; 26 | 27 | #pragma mark 快速设置导航 28 | - (void)setLeftNaviItemWithTitle:(NSString *)leftTitle; 29 | 30 | - (void)setRightNavItemWithTitle:(NSString *)rightTitle; 31 | 32 | #pragma mark 快速动画导航 33 | - (void)setLeftNavWithGifStr:(NSString *)gifStr; 34 | 35 | - (void)setRightNavWithGifStr:(NSString *)gifStr; 36 | #pragma mark设置view的默认约束为全屏 37 | - (void)setDefaultConstraintWithView:(UIView *)view 38 | andTitle:(NSString *)title; 39 | 40 | #pragma mark左导航事件 内置隐藏键盘 41 | - (void)leftNavItemClickAction; 42 | 43 | #pragma mark右导航事件 内置隐藏键盘 44 | - (void)rightNavItemClickAction; 45 | 46 | #pragma mark返回事件 47 | - (void)goBack; 48 | 49 | #pragma markgo某个vc 50 | - (void)goVC:(JoyBaseVC *)vc; 51 | 52 | #pragma mark根据vc的name返回到某个vc 53 | - (void)popToVCWithVCName:(NSString *)vcName; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Protocols/JoyProtoCol.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyProtoCol.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/3/8. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | typedef void (^JoyBlock)(id parameter); 10 | #import 11 | #import 12 | 13 | @protocol JoyProtoCol 14 | 15 | - (void)setParameter:(id)parameter block:(JoyBlock)block; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Protocols/TNACellModelProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // TNACellModelProtocol.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2016/12/27. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol TNACellModelProtocol 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Utility/JoyAlert.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyAlert.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/3/8. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | typedef void(^AlertBlock)(UIAlertView *alertView,NSInteger btnIndex); 13 | @interface JoyAlert : NSObject 14 | 15 | + (instancetype)shareAlert; 16 | 17 | - (void)showAlertViewWithTitle:(NSString *)title message:(NSString *)message cancle:(NSString *)cancleStr confirm:(NSString *)confirmStr alertBlock:(AlertBlock)alertBlock; 18 | 19 | // message 确定回调 20 | - (void)showalertWithMessage:(NSString *)message alertBlock:(AlertBlock)alertBlock; 21 | 22 | // 仅显示message 23 | + (void)showWithMessage:(NSString *)message; 24 | @end 25 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Utility/JoyAlert.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyAlert.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 2017/3/8. 6 | // Copyright © 2017年 JoyMake. All rights reserved. 7 | // 8 | 9 | #import "JoyAlert.h" 10 | #import 11 | 12 | @implementation JoyAlert 13 | + (instancetype)shareAlert 14 | { 15 | static JoyAlert *shareAlert; 16 | static dispatch_once_t onceToken; 17 | dispatch_once(&onceToken, ^{ 18 | if (shareAlert == nil) { 19 | shareAlert = [[[self class] alloc]init]; 20 | } 21 | }); 22 | return shareAlert; 23 | } 24 | 25 | #pragma mark - 原生UIalertView 26 | - (void)showAlertViewWithTitle:(NSString *)title message:(NSString *)message cancle:(NSString *)cancleStr confirm:(NSString *)confirmStr alertBlock:(AlertBlock)alertBlock 27 | { 28 | UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:title message:message delegate:self cancelButtonTitle:cancleStr otherButtonTitles:confirmStr, nil]; 29 | objc_setAssociatedObject(self, _cmd, alertBlock, OBJC_ASSOCIATION_COPY_NONATOMIC); 30 | [alertView show]; 31 | } 32 | 33 | - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 34 | { 35 | AlertBlock block = objc_getAssociatedObject(self, @selector(showAlertViewWithTitle:message:cancle:confirm:alertBlock:)); 36 | block?block(alertView,buttonIndex):nil; 37 | } 38 | 39 | #pragma mark - 40 | - (void)showalertWithMessage:(NSString *)message alertBlock:(AlertBlock)alertBlock 41 | { 42 | [self showAlertViewWithTitle:nil message:message cancle:NSLocalizedString(@"确定", nil) confirm:nil alertBlock:^(UIAlertView *alertView, NSInteger btnIndex) { 43 | alertBlock?alertBlock(alertView,btnIndex):nil; 44 | }]; 45 | } 46 | 47 | 48 | + (void)showWithMessage:(NSString *)message 49 | { 50 | [[JoyAlert shareAlert] showalertWithMessage:message alertBlock:^(UIAlertView *alertView, NSInteger btnIndex) { 51 | ; 52 | }]; 53 | } 54 | @end 55 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Views/JoyCollectionView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyCollectionView.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/7/11. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "UIView+JoyCategory.h" 10 | 11 | @interface JoyCollectionView : UIView 12 | @property(nonatomic,strong)UICollectionView *collectionView; 13 | 14 | -(CGFloat)setData:(NSMutableArray *)dataArray; 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Views/JoyDatePickView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyDatePickView.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/1/25. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "UIView+JoyCategory.h" 10 | 11 | @interface JoyDatePickView : UIView 12 | @property (nonatomic,copy)void (^entryClickBlock)(NSString *selectDate); 13 | 14 | - (void)setDate:(NSDate *)date; 15 | 16 | - (void)setMinDate:(NSDate *)minimumDate; 17 | 18 | - (void)setMaxDate:(NSDate *)maximumDate; 19 | 20 | - (void)showPickView; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Views/JoyNoDataBackView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyNoDataBackView.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/9/1. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JoyNoDataBackView : UIView 12 | @property (nonatomic,copy)NSString *imageStr; 13 | @property(nonatomic,copy)NSString *labelStr; 14 | @end 15 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Views/JoyNoDataBackView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JoyNoDataBackView.m 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/9/1. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "JoyNoDataBackView.h" 10 | 11 | @interface JoyNoDataBackView () 12 | 13 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 14 | @property (weak, nonatomic) IBOutlet UILabel *label; 15 | @end 16 | 17 | @implementation JoyNoDataBackView 18 | -(void)setImageStr:(NSString *)imageStr{ 19 | _imageStr = imageStr; 20 | [self.imageView setImage:[UIImage imageNamed:imageStr]]; 21 | } 22 | 23 | -(void)setLabelStr:(NSString *)labelStr{ 24 | _labelStr = labelStr; 25 | self.label.text = labelStr; 26 | } 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Views/JoyNoDataBackView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Views/JoyPickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyPickerView.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/1/4. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "UIView+JoyCategory.h" 10 | 11 | @interface JoyPickerView : UIView 12 | @property (nonatomic,strong)UIPickerView *pickerView; 13 | @property (nonatomic,copy)void (^CancleBtnClickBlock)(); 14 | @property (nonatomic,copy)void (^EntryBtnClickBlock)(); 15 | @property (nonatomic,copy)void (^pickSelectBlock)(NSInteger coponent,NSInteger row); 16 | 17 | //数组套数组格式,多section 18 | - (void)reloadPickViewWithDataSource:(NSArray *)sourceArray; 19 | 20 | - (void)showPickView; 21 | 22 | - (void)hidePickView; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Views/JoyTableAutoLayoutView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TNAAutoLayoutTableBaseView.h 3 | // Toon 4 | // 5 | // Created by wangguopeng on 16/6/20. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // autolayout table 8 | 9 | //autolayout基类,勿改,若需修改,请建子类修改 10 | 11 | 12 | #import "UIView+JoyCategory.h" 13 | #import "joy.h" 14 | 15 | #pragma mark 文本编辑协议 16 | @protocol TextChangedDelegete 17 | @optional; 18 | #pragma mark 文本取消第一响应时 19 | - (void)textFieldChangedWithIndexPath:(NSIndexPath *)indexPath 20 | andChangedText:(NSString *)content 21 | andChangedKey:(NSString *)key; 22 | 23 | #pragma MARK 文本内容发生变化比如输了一个字符 24 | - (void)textHasChanged:(NSIndexPath *)selectIndex 25 | andText:(NSString *)content 26 | andChangedKey:(NSString *)changeTextKey; 27 | 28 | @end 29 | 30 | #pragma MARK 滚动协议 31 | @protocol ScrollDelegate 32 | 33 | - (void)scrollDidScroll:(UIScrollView *)scrollView; 34 | 35 | @end 36 | 37 | typedef void(^CellSelectBlock)(NSIndexPath *indexPath,NSString *tapAction); 38 | 39 | typedef void(^CellEditingBlock)(UITableViewCellEditingStyle editingStyle,NSIndexPath *indexPath); 40 | 41 | typedef void(^CellMoveBlock)(NSIndexPath *sourceIndexPath,NSIndexPath *toIndexPath); 42 | 43 | typedef void(^CellTextEndChanged)(NSIndexPath *indexPath,NSString *content,NSString *key); 44 | 45 | typedef void(^CellTextCharacterHasChanged)(NSIndexPath *indexPath,NSString *content,NSString *key); 46 | 47 | @class JoySectionBaseModel; 48 | @interface JoyTableAutoLayoutView : UIView 49 | 50 | @property (nonatomic,strong)UITableView *tableView; 51 | 52 | @property (nonatomic,strong)NSMutableArray *dataArrayM; 53 | 54 | @property (nonatomic,weak)id delegate; 55 | 56 | @property (nonatomic,weak)id scrollDelegate; 57 | 58 | @property (nonatomic,strong)NSIndexPath *oldSelectIndexPath; 59 | 60 | @property (nonatomic,strong)NSIndexPath *currentSelectIndexPath; 61 | 62 | @property (nonatomic,copy)CellSelectBlock tableDidSelectBlock; 63 | 64 | @property (nonatomic,copy)CellEditingBlock tableEditingBlock; 65 | 66 | @property (nonatomic,copy)CellMoveBlock tableMoveBlock; 67 | 68 | @property (nonatomic,copy)CellTextEndChanged tableTextEndChangedBlock; 69 | 70 | @property (nonatomic,copy)CellTextCharacterHasChanged tableTextCharacterHasChangedBlock; 71 | 72 | @property (nonatomic,strong)UIView *backView; 73 | 74 | @property (nonatomic,assign)BOOL editing; 75 | 76 | #pragma mark table headview 77 | - (void)setTableHeaderView:(UIView *)headView; 78 | 79 | #pragma mark table footview 80 | - (void)setTableFootView:(UIView *)footView; 81 | 82 | #pragma mark 刷新整个table 83 | - (void)reloadTableView; 84 | 85 | #pragma mark 刷新section 86 | - (void)reloadSection:(NSIndexPath *)indexPath; 87 | 88 | #pragma mark 刷新列 89 | - (void)reloadRow:(NSIndexPath *)indexPath; 90 | 91 | #pragma mark 设置约束 子类调super时用 92 | - (void)setConstraint; 93 | 94 | #pragma mark 准备刷新 95 | - (void)beginUpdates; 96 | 97 | #pragma mark 结束新列 98 | - (void)endUpdates; 99 | 100 | @end 101 | 102 | @interface JoyTableBaseView : JoyTableAutoLayoutView 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/Views/JoyUISegementView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JoyUISegementView.h 3 | // CustomSegMent 4 | // 5 | // Created by wangguopeng on 16/7/7. 6 | // Copyright © 2016年 Joy. All rights reserved. 7 | // 8 | 9 | #import "UIView+JoyCategory.h" 10 | 11 | @interface JoyUISegementView : UIView 12 | @property (nonatomic,strong)NSArray *segmentItems; 13 | @property (nonatomic,strong)UIColor *separateColor; 14 | @property (nonatomic,strong)UIColor *selectColor; 15 | @property (nonatomic,strong)UIColor *deselectColor; 16 | @property (nonatomic,strong)UIColor *bottomSliderColor; 17 | @property (nonatomic,assign)NSInteger selectIndex; 18 | @property (nonatomic,copy)void (^setmentValuechangedBlock)(NSInteger selectIndex); 19 | @end 20 | -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/imageSources/header_icon_back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/Pods/JoyTool/JoyTool/imageSources/header_icon_back@2x.png -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/imageSources/header_icon_back@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/Pods/JoyTool/JoyTool/imageSources/header_icon_back@3x.png -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/imageSources/joymakeHead.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/Pods/JoyTool/JoyTool/imageSources/joymakeHead.jpg -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/imageSources/select@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/Pods/JoyTool/JoyTool/imageSources/select@2x.png -------------------------------------------------------------------------------- /Pods/JoyTool/JoyTool/imageSources/select@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/Pods/JoyTool/JoyTool/imageSources/select@3x.png -------------------------------------------------------------------------------- /Pods/JoyTool/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 wangguopeng 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 | -------------------------------------------------------------------------------- /Pods/JoyTool/README.md: -------------------------------------------------------------------------------- 1 | # JoyTool 2 | 3 | [![CI Status](http://img.shields.io/travis/wangguopeng/JoyTool.svg?style=flat)](https://travis-ci.org/wangguopeng/JoyTool) 4 | [![Version](https://img.shields.io/cocoapods/v/JoyTool.svg?style=flat)](http://cocoapods.org/pods/JoyTool) 5 | [![License](https://img.shields.io/cocoapods/l/JoyTool.svg?style=flat)](http://cocoapods.org/pods/JoyTool) 6 | [![Platform](https://img.shields.io/cocoapods/p/JoyTool.svg?style=flat)](http://cocoapods.org/pods/JoyTool) 7 | 8 | ## Example 9 | 10 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 11 | 12 | ## Requirements 13 | 14 | ## Installation 15 | 16 | JoyTool is available through [CocoaPods](http://cocoapods.org). To install 17 | it, simply add the following line to your Podfile: 18 | 19 | ```ruby 20 | pod "JoyTool" 21 | ``` 22 | 23 | ## Author 24 | 25 | wangguopeng, joymake@wo.com 26 | 27 | ## License 28 | 29 | JoyTool is available under the MIT license. See the LICENSE file for more info. 30 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JoyTool (0.0.7): 3 | - Masonry 4 | - Masonry (1.0.2) 5 | 6 | DEPENDENCIES: 7 | - JoyTool 8 | - Masonry 9 | 10 | SPEC CHECKSUMS: 11 | JoyTool: f9d016d689056d476eebd8479ebd133161adbd9c 12 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e 13 | 14 | PODFILE CHECKSUM: a801b1b8957e8d16ef6e5a80a9e6baa5e0f37b5e 15 | 16 | COCOAPODS: 1.2.1 17 | -------------------------------------------------------------------------------- /Pods/Masonry/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | /** 13 | * A group of MASConstraint objects 14 | */ 15 | @interface MASCompositeConstraint : MASConstraint 16 | 17 | /** 18 | * Creates a composite with a predefined array of children 19 | * 20 | * @param children child MASConstraints 21 | * 22 | * @return a composite constraint 23 | */ 24 | - (id)initWithChildren:(NSArray *)children; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint+Private.h 3 | // Masonry 4 | // 5 | // Created by Nick Tymchenko on 29/04/14. 6 | // Copyright (c) 2014 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | 11 | @protocol MASConstraintDelegate; 12 | 13 | 14 | @interface MASConstraint () 15 | 16 | /** 17 | * Whether or not to check for an existing constraint instead of adding constraint 18 | */ 19 | @property (nonatomic, assign) BOOL updateExisting; 20 | 21 | /** 22 | * Usually MASConstraintMaker but could be a parent MASConstraint 23 | */ 24 | @property (nonatomic, weak) id delegate; 25 | 26 | /** 27 | * Based on a provided value type, is equal to calling: 28 | * NSNumber - setOffset: 29 | * NSValue with CGPoint - setPointOffset: 30 | * NSValue with CGSize - setSizeOffset: 31 | * NSValue with MASEdgeInsets - setInsets: 32 | */ 33 | - (void)setLayoutConstantWithValue:(NSValue *)value; 34 | 35 | @end 36 | 37 | 38 | @interface MASConstraint (Abstract) 39 | 40 | /** 41 | * Sets the constraint relation to given NSLayoutRelation 42 | * returns a block which accepts one of the following: 43 | * MASViewAttribute, UIView, NSValue, NSArray 44 | * see readme for more details. 45 | */ 46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; 47 | 48 | /** 49 | * Override to set a custom chaining behaviour 50 | */ 51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 52 | 53 | @end 54 | 55 | 56 | @protocol MASConstraintDelegate 57 | 58 | /** 59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example 60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks 61 | */ 62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; 63 | 64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * When you are debugging or printing the constraints attached to a view this subclass 13 | * makes it easier to identify which constraints have been created via Masonry 14 | */ 15 | @interface MASLayoutConstraint : NSLayoutConstraint 16 | 17 | /** 18 | * a key to associate with this constraint 19 | */ 20 | @property (nonatomic, strong) id mas_key; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASLayoutConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASLayoutConstraint.h" 10 | 11 | @implementation MASLayoutConstraint 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASAttribute.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * An immutable tuple which stores the view and the related NSLayoutAttribute. 13 | * Describes part of either the left or right hand side of a constraint equation 14 | */ 15 | @interface MASViewAttribute : NSObject 16 | 17 | /** 18 | * The view which the reciever relates to. Can be nil if item is not a view. 19 | */ 20 | @property (nonatomic, weak, readonly) MAS_VIEW *view; 21 | 22 | /** 23 | * The item which the reciever relates to. 24 | */ 25 | @property (nonatomic, weak, readonly) id item; 26 | 27 | /** 28 | * The attribute which the reciever relates to 29 | */ 30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; 31 | 32 | /** 33 | * Convenience initializer. 34 | */ 35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; 36 | 37 | /** 38 | * The designated initializer. 39 | */ 40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; 41 | 42 | /** 43 | * Determine whether the layoutAttribute is a size attribute 44 | * 45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight 46 | */ 47 | - (BOOL)isSizeAttribute; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewAttribute.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASAttribute.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | 11 | @implementation MASViewAttribute 12 | 13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { 14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; 15 | return self; 16 | } 17 | 18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { 19 | self = [super init]; 20 | if (!self) return nil; 21 | 22 | _view = view; 23 | _item = item; 24 | _layoutAttribute = layoutAttribute; 25 | 26 | return self; 27 | } 28 | 29 | - (BOOL)isSizeAttribute { 30 | return self.layoutAttribute == NSLayoutAttributeWidth 31 | || self.layoutAttribute == NSLayoutAttributeHeight; 32 | } 33 | 34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute { 35 | if ([viewAttribute isKindOfClass:self.class]) { 36 | return self.view == viewAttribute.view 37 | && self.layoutAttribute == viewAttribute.layoutAttribute; 38 | } 39 | return [super isEqual:viewAttribute]; 40 | } 41 | 42 | - (NSUInteger)hash { 43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint.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 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | // 2 | // Masonry.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Masonry. 12 | FOUNDATION_EXPORT double MasonryVersionNumber; 13 | 14 | //! Project version string for Masonry. 15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; 16 | 17 | #import "MASUtilities.h" 18 | #import "View+MASAdditions.h" 19 | #import "View+MASShorthandAdditions.h" 20 | #import "ViewController+MASAdditions.h" 21 | #import "NSArray+MASAdditions.h" 22 | #import "NSArray+MASShorthandAdditions.h" 23 | #import "MASConstraint.h" 24 | #import "MASCompositeConstraint.h" 25 | #import "MASViewAttribute.h" 26 | #import "MASViewConstraint.h" 27 | #import "MASConstraintMaker.h" 28 | #import "MASLayoutConstraint.h" 29 | #import "NSLayoutConstraint+MASDebugAdditions.h" 30 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASAdditions.h 3 | // 4 | // 5 | // Created by Daniel Hammond on 11/26/13. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | typedef NS_ENUM(NSUInteger, MASAxisType) { 14 | MASAxisTypeHorizontal, 15 | MASAxisTypeVertical 16 | }; 17 | 18 | @interface NSArray (MASAdditions) 19 | 20 | /** 21 | * Creates a MASConstraintMaker with each view in the callee. 22 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view 23 | * 24 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 25 | * 26 | * @return Array of created MASConstraints 27 | */ 28 | - (NSArray *)mas_makeConstraints:(void (^)(MASConstraintMaker *make))block; 29 | 30 | /** 31 | * Creates a MASConstraintMaker with each view in the callee. 32 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 33 | * If an existing constraint exists then it will be updated instead. 34 | * 35 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 36 | * 37 | * @return Array of created/updated MASConstraints 38 | */ 39 | - (NSArray *)mas_updateConstraints:(void (^)(MASConstraintMaker *make))block; 40 | 41 | /** 42 | * Creates a MASConstraintMaker with each view in the callee. 43 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 44 | * All constraints previously installed for the views will be removed. 45 | * 46 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 47 | * 48 | * @return Array of created/updated MASConstraints 49 | */ 50 | - (NSArray *)mas_remakeConstraints:(void (^)(MASConstraintMaker *make))block; 51 | 52 | /** 53 | * distribute with fixed spacing 54 | * 55 | * @param axisType which axis to distribute items along 56 | * @param fixedSpacing the spacing between each item 57 | * @param leadSpacing the spacing before the first item and the container 58 | * @param tailSpacing the spacing after the last item and the container 59 | */ 60 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 61 | 62 | /** 63 | * distribute with fixed item size 64 | * 65 | * @param axisType which axis to distribute items along 66 | * @param fixedItemLength the fixed length of each item 67 | * @param leadSpacing the spacing before the first item and the container 68 | * @param tailSpacing the spacing after the last item and the container 69 | */ 70 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand array additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface NSArray (MASShorthandAdditions) 18 | 19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 22 | 23 | @end 24 | 25 | @implementation NSArray (MASShorthandAdditions) 26 | 27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 28 | return [self mas_makeConstraints:block]; 29 | } 30 | 31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 32 | return [self mas_updateConstraints:block]; 33 | } 34 | 35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 36 | return [self mas_remakeConstraints:block]; 37 | } 38 | 39 | @end 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * makes debug and log output of NSLayoutConstraints more readable 13 | */ 14 | @interface NSLayoutConstraint (MASDebugAdditions) 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | #ifdef MAS_VIEW_CONTROLLER 14 | 15 | @interface MAS_VIEW_CONTROLLER (MASAdditions) 16 | 17 | /** 18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute 19 | */ 20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom; 26 | 27 | 28 | @end 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Pods/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 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/Joymake.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | JoyTool-JoyTool.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 2 11 | 12 | JoyTool.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 1 16 | 17 | Masonry.xcscheme_^#shared#^_ 18 | 19 | orderHint 20 | 3 21 | 22 | Pods-smallVideo.xcscheme_^#shared#^_ 23 | 24 | orderHint 25 | 4 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/wangguopeng.xcuserdatad/xcschemes/JoyTool-JoyTool.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/wangguopeng.xcuserdatad/xcschemes/JoyTool.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/wangguopeng.xcuserdatad/xcschemes/Masonry.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/wangguopeng.xcuserdatad/xcschemes/Pods-smallVideo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/wangguopeng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | JoyTool-JoyTool.xcscheme 8 | 9 | isShown 10 | 11 | 12 | JoyTool.xcscheme 13 | 14 | isShown 15 | 16 | 17 | Masonry.xcscheme 18 | 19 | isShown 20 | 21 | 22 | Pods-smallVideo.xcscheme 23 | 24 | isShown 25 | 26 | 27 | 28 | SuppressBuildableAutocreation 29 | 30 | 36F5D443A1C899454F5887724C27F53D 31 | 32 | primary 33 | 34 | 35 | 3A809090BFFA23D4A70BC932CDA2F422 36 | 37 | primary 38 | 39 | 40 | AD60115B07959A56A86E6EAE1B8B1DB9 41 | 42 | primary 43 | 44 | 45 | D3123A45816E7653945CF9B6F1D0C35B 46 | 47 | primary 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Pods/Target Support Files/JoyTool/JoyTool-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_JoyTool : NSObject 3 | @end 4 | @implementation PodsDummy_JoyTool 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/JoyTool/JoyTool-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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/JoyTool/JoyTool.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/JoyTool 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/JoyTool" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JoyTool" "${PODS_ROOT}/Headers/Public/Masonry" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/JoyTool 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/JoyTool/ResourceBundle-JoyTool-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 0.0.7 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Masonry : NSObject 3 | @end 4 | @implementation PodsDummy_Masonry 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Masonry 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JoyTool" "${PODS_ROOT}/Headers/Public/Masonry" 4 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-smallVideo/Pods-smallVideo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## JoyTool 5 | 6 | Copyright (c) 2017 wangguopeng 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## Masonry 28 | 29 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy 32 | of this software and associated documentation files (the "Software"), to deal 33 | in the Software without restriction, including without limitation the rights 34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 35 | copies of the Software, and to permit persons to whom the Software is 36 | furnished to do so, subject to the following conditions: 37 | 38 | The above copyright notice and this permission notice shall be included in 39 | all copies or substantial portions of the Software. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 47 | THE SOFTWARE. 48 | Generated by CocoaPods - https://cocoapods.org 49 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-smallVideo/Pods-smallVideo-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2017 wangguopeng <joymake@wo.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | JoyTool 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 47 | 48 | Permission is hereby granted, free of charge, to any person obtaining a copy 49 | of this software and associated documentation files (the "Software"), to deal 50 | in the Software without restriction, including without limitation the rights 51 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 52 | copies of the Software, and to permit persons to whom the Software is 53 | furnished to do so, subject to the following conditions: 54 | 55 | The above copyright notice and this permission notice shall be included in 56 | all copies or substantial portions of the Software. 57 | 58 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 59 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 60 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 61 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 62 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 63 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 64 | THE SOFTWARE. 65 | License 66 | MIT 67 | Title 68 | Masonry 69 | Type 70 | PSGroupSpecifier 71 | 72 | 73 | FooterText 74 | Generated by CocoaPods - https://cocoapods.org 75 | Title 76 | 77 | Type 78 | PSGroupSpecifier 79 | 80 | 81 | StringsTable 82 | Acknowledgements 83 | Title 84 | Acknowledgements 85 | 86 | 87 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-smallVideo/Pods-smallVideo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_smallVideo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_smallVideo 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-smallVideo/Pods-smallVideo-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-smallVideo/Pods-smallVideo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JoyTool" "${PODS_ROOT}/Headers/Public/Masonry" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JoyTool" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/JoyTool" -isystem "${PODS_ROOT}/Headers/Public/Masonry" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"JoyTool" -l"Masonry" -framework "Foundation" -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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-smallVideo/Pods-smallVideo.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JoyTool" "${PODS_ROOT}/Headers/Public/Masonry" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JoyTool" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/JoyTool" -isystem "${PODS_ROOT}/Headers/Public/Masonry" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"JoyTool" -l"Masonry" -framework "Foundation" -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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SmallVideo 2 | 3 | ![Magic.gif](http://upload-images.jianshu.io/upload_images/1488115-7d4f4bba2ca52b00.gif?imageMogr2/auto-orient/strip) 4 | 本章介绍一下完整视频采集的实现,主要有功能有 5 | 1.音、视频文件录制播放 6 | 2.焦距设置 7 | 3.防抖功能 8 | 4.摄像头切换 9 | 5.手电筒功能 10 | 6.聚焦处理 11 | 7.二维码扫描 12 | 8.视频裁剪压缩 13 | 9.流数据采集处理(暂未处理,后期会补上) 14 | ###实现思路如下 15 | ``` 16 | 由于小视频、流媒体、二维码扫描用的都是使用了AVFoundation的框架,只 17 | 是输入AVCaptureInput、输出AVCaptureoutput对象不同和对应的输出内容处理不 18 | 一样,所以想写一个工具类来集中处理 19 | 功能还是比较全的,代码量也不小,目前大约六、七百行,通过.h文件大家可以自己 20 | 去找自己感兴趣的地方去看 21 | 因为是个多功能集成类,为了不至于一上来所有的输入输出对象都加入进来,所以所有 22 | 输入输出对象以及设备管理对象均以懒加载的方式去按需加载 23 | ``` 24 | 25 | 26 | ``` 27 | //调用 创建view,约束宽高, 28 | 29 | JoyRecordView *recoreView = [[JoyRecordView alloc]init]; 30 | objc_setAssociatedObject(self, _cmd, recoreView, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 31 | [[UIApplication sharedApplication].keyWindow addSubview:recoreView]; 32 | MAS_CONSTRAINT(recoreView, make.edges.mas_equalTo([UIApplication sharedApplication].keyWindow);); 33 | 34 | [[UIApplication sharedApplication].keyWindow updateConstraintsIfNeeded]; 35 | ``` 36 | 37 | 注意,动画、约束等部分功能使用了JoyTool pod库内容,需要的话pod 安装,不需要的话就删除响应代码 38 | 39 | 40 | 简单写了个demo,主要还是看player的实现,view临时写了一个,你可以把回调拿到vc里去处理 41 | 42 | -------------------------------------------------------------------------------- /smallVideo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /smallVideo.xcodeproj/project.xcworkspace/xcuserdata/wangguopeng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/smallVideo.xcodeproj/project.xcworkspace/xcuserdata/wangguopeng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /smallVideo.xcodeproj/xcuserdata/Joymake.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | smallVideo.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /smallVideo.xcodeproj/xcuserdata/wangguopeng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | smallVideo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 2F29458A1EF3F70F00495AC0 16 | 17 | primary 18 | 19 | 20 | 2F2945A31EF3F70F00495AC0 21 | 22 | primary 23 | 24 | 25 | 2F2945AE1EF3F70F00495AC0 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /smallVideo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /smallVideo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /smallVideo.xcworkspace/xcuserdata/Joymake.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/smallVideo.xcworkspace/xcuserdata/Joymake.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /smallVideo.xcworkspace/xcuserdata/wangguopeng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joy-make/SmallVideo/fda44b6e60291ae87c674548205721fbba82bc8f/smallVideo.xcworkspace/xcuserdata/wangguopeng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /smallVideo.xcworkspace/xcuserdata/wangguopeng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /smallVideo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // smallVideo 4 | // 5 | // Created by wangguopeng on 2017/6/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /smallVideo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // smallVideo 4 | // 5 | // Created by wangguopeng on 2017/6/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /smallVideo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /smallVideo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /smallVideo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /smallVideo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | NSCameraUsageDescription 24 | camera 25 | NSMicrophoneUsageDescription 26 | microphone 27 | NSPhotoLibraryUsageDescription 28 | photo 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UIRequiredDeviceCapabilities 34 | 35 | armv7 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /smallVideo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // smallVideo 4 | // 5 | // Created by wangguopeng on 2017/6/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /smallVideo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // smallVideo 4 | // 5 | // Created by wangguopeng on 2017/6/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "JoyRecordView.h" 11 | #import 12 | 13 | @interface ViewController () 14 | @property (nonatomic,strong)JoyRecordView *recoreView; 15 | @end 16 | 17 | @implementation ViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | self.recoreView = [[JoyRecordView alloc]init]; 22 | [self.view addSubview:self.recoreView]; 23 | } 24 | 25 | 26 | -(void)updateViewConstraints{ 27 | [super updateViewConstraints]; 28 | __weak __typeof(&*self)weakSelf = self; 29 | MAS_CONSTRAINT(self.recoreView, make.edges.mas_equalTo(weakSelf.view);); 30 | } 31 | 32 | - (void)didReceiveMemoryWarning { 33 | [super didReceiveMemoryWarning]; 34 | } 35 | 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /smallVideo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // smallVideo 4 | // 5 | // Created by wangguopeng on 2017/6/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /smallVideoTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /smallVideoTests/smallVideoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // smallVideoTests.m 3 | // smallVideoTests 4 | // 5 | // Created by wangguopeng on 2017/6/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface smallVideoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation smallVideoTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /smallVideoUITests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /smallVideoUITests/smallVideoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // smallVideoUITests.m 3 | // smallVideoUITests 4 | // 5 | // Created by wangguopeng on 2017/6/16. 6 | // Copyright © 2017年 joymake. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface smallVideoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation smallVideoUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | --------------------------------------------------------------------------------