├── VideoClip ├── Pods │ ├── Headers │ │ ├── Private │ │ │ ├── Masonry │ │ │ │ ├── Masonry.h │ │ │ │ ├── MASUtilities.h │ │ │ │ ├── MASConstraint.h │ │ │ │ ├── MASViewAttribute.h │ │ │ │ ├── MASViewConstraint.h │ │ │ │ ├── View+MASAdditions.h │ │ │ │ ├── MASConstraintMaker.h │ │ │ │ ├── MASLayoutConstraint.h │ │ │ │ ├── NSArray+MASAdditions.h │ │ │ │ ├── MASCompositeConstraint.h │ │ │ │ ├── MASConstraint+Private.h │ │ │ │ ├── View+MASShorthandAdditions.h │ │ │ │ ├── ViewController+MASAdditions.h │ │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ │ └── NSLayoutConstraint+MASDebugAdditions.h │ │ │ └── BlocksKit │ │ │ │ ├── BlocksKit.h │ │ │ │ ├── BKMacros.h │ │ │ │ ├── BlocksKit+UIKit.h │ │ │ │ ├── BlocksKit+MessageUI.h │ │ │ │ ├── NSArray+BlocksKit.h │ │ │ │ ├── NSSet+BlocksKit.h │ │ │ │ ├── NSTimer+BlocksKit.h │ │ │ │ ├── UIView+BlocksKit.h │ │ │ │ ├── UIControl+BlocksKit.h │ │ │ │ ├── UIWebView+BlocksKit.h │ │ │ │ ├── NSDictionary+BlocksKit.h │ │ │ │ ├── NSIndexSet+BlocksKit.h │ │ │ │ ├── NSInvocation+BlocksKit.h │ │ │ │ ├── NSMutableSet+BlocksKit.h │ │ │ │ ├── NSOrderedSet+BlocksKit.h │ │ │ │ ├── UIAlertView+BlocksKit.h │ │ │ │ ├── UITextField+BlocksKit.h │ │ │ │ ├── A2BlockInvocation.h │ │ │ │ ├── A2DynamicDelegate.h │ │ │ │ ├── NSMutableArray+BlocksKit.h │ │ │ │ ├── UIActionSheet+BlocksKit.h │ │ │ │ ├── NSMutableIndexSet+BlocksKit.h │ │ │ │ ├── NSObject+BKBlockExecution.h │ │ │ │ ├── NSObject+BKBlockObservation.h │ │ │ │ ├── UIBarButtonItem+BlocksKit.h │ │ │ │ ├── NSCache+BlocksKit.h │ │ │ │ ├── NSMutableDictionary+BlocksKit.h │ │ │ │ ├── NSMutableOrderedSet+BlocksKit.h │ │ │ │ ├── NSObject+A2BlockDelegate.h │ │ │ │ ├── NSObject+BKAssociatedObjects.h │ │ │ │ ├── UIGestureRecognizer+BlocksKit.h │ │ │ │ ├── UIPopoverController+BlocksKit.h │ │ │ │ ├── NSObject+A2DynamicDelegate.h │ │ │ │ ├── UIImagePickerController+BlocksKit.h │ │ │ │ ├── NSURLConnection+BlocksKit.h │ │ │ │ ├── MFMailComposeViewController+BlocksKit.h │ │ │ │ └── MFMessageComposeViewController+BlocksKit.h │ │ └── Public │ │ │ ├── Masonry │ │ │ ├── Masonry.h │ │ │ ├── MASConstraint.h │ │ │ ├── MASUtilities.h │ │ │ ├── MASConstraintMaker.h │ │ │ ├── MASViewAttribute.h │ │ │ ├── MASViewConstraint.h │ │ │ ├── View+MASAdditions.h │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── MASConstraint+Private.h │ │ │ ├── View+MASShorthandAdditions.h │ │ │ ├── ViewController+MASAdditions.h │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ └── NSLayoutConstraint+MASDebugAdditions.h │ │ │ └── BlocksKit │ │ │ ├── BlocksKit.h │ │ │ ├── BKMacros.h │ │ │ ├── BlocksKit+UIKit.h │ │ │ ├── NSSet+BlocksKit.h │ │ │ ├── BlocksKit+MessageUI.h │ │ │ ├── NSArray+BlocksKit.h │ │ │ ├── NSTimer+BlocksKit.h │ │ │ ├── UIView+BlocksKit.h │ │ │ ├── NSIndexSet+BlocksKit.h │ │ │ ├── UIControl+BlocksKit.h │ │ │ ├── UIWebView+BlocksKit.h │ │ │ ├── A2BlockInvocation.h │ │ │ ├── A2DynamicDelegate.h │ │ │ ├── NSDictionary+BlocksKit.h │ │ │ ├── NSInvocation+BlocksKit.h │ │ │ ├── NSMutableSet+BlocksKit.h │ │ │ ├── NSOrderedSet+BlocksKit.h │ │ │ ├── UIAlertView+BlocksKit.h │ │ │ ├── UITextField+BlocksKit.h │ │ │ ├── NSMutableArray+BlocksKit.h │ │ │ ├── NSObject+BKBlockExecution.h │ │ │ ├── UIActionSheet+BlocksKit.h │ │ │ ├── NSMutableIndexSet+BlocksKit.h │ │ │ ├── NSObject+BKBlockObservation.h │ │ │ ├── UIBarButtonItem+BlocksKit.h │ │ │ ├── NSCache+BlocksKit.h │ │ │ ├── NSMutableDictionary+BlocksKit.h │ │ │ ├── NSMutableOrderedSet+BlocksKit.h │ │ │ ├── NSObject+A2BlockDelegate.h │ │ │ ├── NSObject+BKAssociatedObjects.h │ │ │ ├── UIGestureRecognizer+BlocksKit.h │ │ │ ├── UIPopoverController+BlocksKit.h │ │ │ ├── NSObject+A2DynamicDelegate.h │ │ │ ├── UIImagePickerController+BlocksKit.h │ │ │ ├── NSURLConnection+BlocksKit.h │ │ │ ├── MFMailComposeViewController+BlocksKit.h │ │ │ └── MFMessageComposeViewController+BlocksKit.h │ ├── Target Support Files │ │ ├── Masonry │ │ │ ├── Masonry-prefix.pch │ │ │ ├── Masonry-dummy.m │ │ │ └── Masonry.xcconfig │ │ ├── BlocksKit │ │ │ ├── BlocksKit-prefix.pch │ │ │ ├── BlocksKit-dummy.m │ │ │ └── BlocksKit.xcconfig │ │ └── Pods-VideoClip │ │ │ ├── Pods-VideoClip-dummy.m │ │ │ ├── Pods-VideoClip.debug.xcconfig │ │ │ ├── Pods-VideoClip.release.xcconfig │ │ │ ├── Pods-VideoClip-acknowledgements.markdown │ │ │ ├── Pods-VideoClip-acknowledgements.plist │ │ │ └── Pods-VideoClip-frameworks.sh │ ├── Masonry │ │ ├── Masonry │ │ │ ├── MASLayoutConstraint.m │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── Masonry.h │ │ │ ├── ViewController+MASAdditions.h │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ ├── MASViewAttribute.m │ │ │ ├── MASViewAttribute.h │ │ │ ├── ViewController+MASAdditions.m │ │ │ ├── MASViewConstraint.h │ │ │ ├── MASConstraint+Private.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ └── View+MASShorthandAdditions.h │ │ └── LICENSE │ ├── Manifest.lock │ └── BlocksKit │ │ ├── BlocksKit │ │ ├── UIKit │ │ │ ├── UIImagePickerController+BlocksKit.h │ │ │ ├── UIPopoverController+BlocksKit.h │ │ │ ├── UIWebView+BlocksKit.h │ │ │ ├── UIControl+BlocksKit.h │ │ │ ├── UIView+BlocksKit.m │ │ │ ├── UIPopoverController+BlocksKit.m │ │ │ ├── UIImagePickerController+BlocksKit.m │ │ │ ├── UITextField+BlocksKit.h │ │ │ ├── UIBarButtonItem+BlocksKit.m │ │ │ ├── UIView+BlocksKit.h │ │ │ ├── UIWebView+BlocksKit.m │ │ │ ├── UIBarButtonItem+BlocksKit.h │ │ │ ├── UIControl+BlocksKit.m │ │ │ └── UIGestureRecognizer+BlocksKit.m │ │ ├── Core │ │ │ ├── NSMutableSet+BlocksKit.m │ │ │ ├── NSMutableArray+BlocksKit.m │ │ │ ├── NSMutableIndexSet+BlocksKit.m │ │ │ ├── NSTimer+BlocksKit.m │ │ │ ├── NSMutableDictionary+BlocksKit.m │ │ │ ├── NSInvocation+BlocksKit.h │ │ │ ├── NSInvocation+BlocksKit.m │ │ │ ├── NSMutableOrderedSet+BlocksKit.m │ │ │ ├── NSMutableIndexSet+BlocksKit.h │ │ │ ├── NSMutableDictionary+BlocksKit.h │ │ │ ├── NSMutableSet+BlocksKit.h │ │ │ ├── NSMutableArray+BlocksKit.h │ │ │ ├── NSMutableOrderedSet+BlocksKit.h │ │ │ ├── NSTimer+BlocksKit.h │ │ │ ├── NSObject+BKBlockExecution.m │ │ │ ├── NSSet+BlocksKit.m │ │ │ ├── NSDictionary+BlocksKit.m │ │ │ ├── NSIndexSet+BlocksKit.m │ │ │ ├── BKMacros.h │ │ │ ├── NSOrderedSet+BlocksKit.m │ │ │ ├── NSObject+BKAssociatedObjects.m │ │ │ └── NSArray+BlocksKit.m │ │ ├── MessageUI │ │ │ ├── MFMailComposeViewController+BlocksKit.h │ │ │ ├── MFMessageComposeViewController+BlocksKit.h │ │ │ ├── MFMessageComposeViewController+BlocksKit.m │ │ │ └── MFMailComposeViewController+BlocksKit.m │ │ ├── DynamicDelegate │ │ │ ├── Foundation │ │ │ │ ├── NSCache+BlocksKit.m │ │ │ │ └── NSCache+BlocksKit.h │ │ │ ├── NSObject+A2DynamicDelegate.h │ │ │ ├── NSObject+A2DynamicDelegate.m │ │ │ └── A2BlockInvocation.h │ │ ├── BlocksKit+MessageUI.h │ │ ├── BlocksKit+UIKit.h │ │ └── BlocksKit.h │ │ ├── LICENSE │ │ └── README.md ├── demo.png ├── Podfile ├── VideoClip │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── cut_bar_left.imageset │ │ │ ├── cut_bar_left.png │ │ │ ├── cut_bar_left@2x.png │ │ │ ├── cut_bar_left@3x.png │ │ │ └── Contents.json │ │ ├── cut_bar_right.imageset │ │ │ ├── cut_bar_right.png │ │ │ ├── cut_bar_right@2x.png │ │ │ ├── cut_bar_right@3x.png │ │ │ └── Contents.json │ │ ├── clip_video_play.imageset │ │ │ ├── clip_video_play.png │ │ │ ├── clip_video_play@2x.png │ │ │ ├── clip_video_play@3x.png │ │ │ └── Contents.json │ │ ├── cut_bar_progress.imageset │ │ │ ├── cut_bar_progress.png │ │ │ ├── cut_bar_progress@2x.png │ │ │ ├── cut_bar_progress@3x.png │ │ │ └── Contents.json │ │ ├── video_record_back.imageset │ │ │ ├── video_record_back.png │ │ │ ├── video_record_back@2x.png │ │ │ ├── video_record_back@3x.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── FMLVideoChoiceCell.m │ ├── FMLChoiceVideoController.h │ ├── AppDelegate.h │ ├── FMLScaledImageViewCell.h │ ├── FMLVideoChoiceCell.h │ ├── main.m │ ├── FMLPlayLayerView.h │ ├── FMLClipVideoViewController.h │ ├── FMLScaledImageViewCell.m │ ├── AVAsset+FMLVideo.h │ ├── UIView+Extension.h │ ├── UIImage+FMLClipRect.h │ ├── FMLVideoCommand.h │ ├── VideoClip.pch │ ├── FMLPlayLayerView.m │ ├── FMLClipFrameView.h │ ├── Info.plist │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ ├── UIView+Extension.m │ ├── UIImage+FMLClipRect.m │ ├── AppDelegate.m │ ├── AVAsset+FMLVideo.m │ ├── FMLScaledImageViewCell.xib │ └── FMLVideoChoiceCell.xib ├── VideoClip.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── VideoClip.xcworkspace │ └── contents.xcworkspacedata ├── Podfile.lock ├── VideoClipTests │ ├── Info.plist │ └── VideoClipTests.m └── VideoClipUITests │ ├── Info.plist │ └── VideoClipUITests.m ├── README.md └── .gitignore /VideoClip/Pods/Headers/Private/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /VideoClip/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/demo.png -------------------------------------------------------------------------------- /VideoClip/Podfile: -------------------------------------------------------------------------------- 1 | 2 | target 'VideoClip' do 3 | pod 'Masonry' 4 | pod 'BlocksKit' 5 | end -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/BKMacros.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/BKMacros.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/BKMacros.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/BKMacros.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/BlocksKit+UIKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/BlocksKit+UIKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/BlocksKit+UIKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/BlocksKit+UIKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/BlocksKit+MessageUI.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/BlocksKit+MessageUI.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSArray+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSArray+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSTimer+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSTimer+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/UIView+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIView+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/BlocksKit+MessageUI.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/BlocksKit+MessageUI.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSArray+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSArray+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSTimer+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSTimer+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/UIView+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIView+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/UIControl+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIControl+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/UIWebView+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIWebView+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSIndexSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSIndexSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/UIControl+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIControl+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/UIWebView+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIWebView+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSDictionary+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSDictionary+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSIndexSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSIndexSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSInvocation+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSInvocation+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSMutableSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSMutableSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSOrderedSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSOrderedSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/UIAlertView+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIAlertView+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/UITextField+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UITextField+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/A2BlockInvocation.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/A2BlockInvocation.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/A2DynamicDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/A2DynamicDelegate.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSDictionary+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSDictionary+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSInvocation+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSInvocation+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSMutableSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSMutableSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSOrderedSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSOrderedSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/UIAlertView+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIAlertView+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/UITextField+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UITextField+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VideoClip 2 | 简单的视频裁剪demo 3 | ![Demo预览](https://github.com/xiaofeixia9/VideoClip/blob/master/VideoClip/demo.png) 4 | -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/A2BlockInvocation.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/A2BlockInvocation.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/A2DynamicDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/A2DynamicDelegate.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSMutableArray+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSMutableArray+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/UIActionSheet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIActionSheet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSMutableArray+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSMutableArray+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSObject+BKBlockExecution.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKBlockExecution.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/UIActionSheet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIActionSheet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/Masonry/Masonry-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSMutableIndexSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSMutableIndexSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSObject+BKBlockExecution.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKBlockExecution.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSObject+BKBlockObservation.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKBlockObservation.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/UIBarButtonItem+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIBarButtonItem+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSMutableIndexSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSMutableIndexSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSObject+BKBlockObservation.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKBlockObservation.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/UIBarButtonItem+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIBarButtonItem+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/BlocksKit/BlocksKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSCache+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSCache+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSMutableDictionary+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSMutableDictionary+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSMutableOrderedSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSMutableOrderedSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSObject+A2BlockDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2BlockDelegate.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSObject+BKAssociatedObjects.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKAssociatedObjects.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/UIGestureRecognizer+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIGestureRecognizer+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/UIPopoverController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIPopoverController+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSCache+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSCache+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSMutableDictionary+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSMutableDictionary+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSMutableOrderedSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSMutableOrderedSet+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSObject+A2BlockDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2BlockDelegate.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSObject+BKAssociatedObjects.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKAssociatedObjects.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/UIGestureRecognizer+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIGestureRecognizer+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/UIPopoverController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIPopoverController+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSObject+A2DynamicDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2DynamicDelegate.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSObject+A2DynamicDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2DynamicDelegate.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/UIImagePickerController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIImagePickerController+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/UIImagePickerController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/UIKit/UIImagePickerController+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/NSURLConnection+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSURLConnection+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/NSURLConnection+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSURLConnection+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/MFMailComposeViewController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/MessageUI/MFMailComposeViewController+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/MFMailComposeViewController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/MessageUI/MFMailComposeViewController+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Public/BlocksKit/MFMessageComposeViewController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/MessageUI/MFMessageComposeViewController+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Headers/Private/BlocksKit/MFMessageComposeViewController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | ../../../BlocksKit/BlocksKit/MessageUI/MFMessageComposeViewController+BlocksKit.h -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/Masonry/Masonry-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Masonry : NSObject 3 | @end 4 | @implementation PodsDummy_Masonry 5 | @end 6 | -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/BlocksKit/BlocksKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_BlocksKit : NSObject 3 | @end 4 | @implementation PodsDummy_BlocksKit 5 | @end 6 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_left.imageset/cut_bar_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/cut_bar_left.imageset/cut_bar_left.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_left.imageset/cut_bar_left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/cut_bar_left.imageset/cut_bar_left@2x.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_left.imageset/cut_bar_left@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/cut_bar_left.imageset/cut_bar_left@3x.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_right.imageset/cut_bar_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/cut_bar_right.imageset/cut_bar_right.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/clip_video_play.imageset/clip_video_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/clip_video_play.imageset/clip_video_play.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_right.imageset/cut_bar_right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/cut_bar_right.imageset/cut_bar_right@2x.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_right.imageset/cut_bar_right@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/cut_bar_right.imageset/cut_bar_right@3x.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/clip_video_play.imageset/clip_video_play@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/clip_video_play.imageset/clip_video_play@2x.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/clip_video_play.imageset/clip_video_play@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/clip_video_play.imageset/clip_video_play@3x.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_progress.imageset/cut_bar_progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/cut_bar_progress.imageset/cut_bar_progress.png -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/Pods-VideoClip/Pods-VideoClip-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_VideoClip : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_VideoClip 5 | @end 6 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_progress.imageset/cut_bar_progress@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/cut_bar_progress.imageset/cut_bar_progress@2x.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_progress.imageset/cut_bar_progress@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/cut_bar_progress.imageset/cut_bar_progress@3x.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/video_record_back.imageset/video_record_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/video_record_back.imageset/video_record_back.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/video_record_back.imageset/video_record_back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/video_record_back.imageset/video_record_back@2x.png -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/video_record_back.imageset/video_record_back@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaofeixia9/VideoClip/HEAD/VideoClip/VideoClip/Assets.xcassets/video_record_back.imageset/video_record_back@3x.png -------------------------------------------------------------------------------- /VideoClip/VideoClip.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLVideoChoiceCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // FMLVideoChoiceCell.m 3 | // VideoClip 4 | // 5 | // Created by Collion on 16/7/23. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import "FMLVideoChoiceCell.h" 10 | 11 | @implementation FMLVideoChoiceCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /VideoClip/VideoClip.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLChoiceVideoController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMLChoiceVideoController.h 3 | // VideoClip 4 | // 5 | // Created by Collion on 16/7/23. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FMLChoiceVideoController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // VideoClip 4 | // 5 | // Created by Collion on 16/7/23. 6 | // Copyright © 2016年 Collion. 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 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLScaledImageViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMLScaledImageViewCell.h 3 | // VideoClip 4 | // 5 | // Created by samo on 16/9/2. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FMLScaledImageViewCell : UICollectionViewCell 12 | 13 | @property (nonatomic, strong) UIImage *imageData; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLVideoChoiceCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMLVideoChoiceCell.h 3 | // VideoClip 4 | // 5 | // Created by Collion on 16/7/23. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FMLVideoChoiceCell : UICollectionViewCell 12 | 13 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // VideoClip 4 | // 5 | // Created by Collion on 16/7/23. 6 | // Copyright © 2016年 Collion. 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 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLPlayLayerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMLPlayLayerView.h 3 | // Niupu_SNS 4 | // 5 | // Created by samo on 16/8/17. 6 | // Copyright © 2016年 WE. All rights reserved. 7 | // 8 | #import 9 | @class AVPlayer, AVPlayerLayer; 10 | 11 | @interface FMLPlayLayerView : UIView 12 | 13 | @property (nonatomic, strong) AVPlayer *player; 14 | @property (nonatomic, strong, readonly) AVPlayerLayer *playerLayer; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLClipVideoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMLClipVideoViewController.h 3 | // VideoClip 4 | // 5 | // Created by Collion on 16/7/23. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface FMLClipVideoViewController : UIViewController 13 | 14 | - (instancetype)initClipVideoVCWithAssetURL:(NSURL *)assetUrl; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_left.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cut_bar_left.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "cut_bar_left@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "cut_bar_left@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_right.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cut_bar_right.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "cut_bar_right@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "cut_bar_right@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/clip_video_play.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "clip_video_play.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "clip_video_play@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "clip_video_play@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/cut_bar_progress.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cut_bar_progress.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "cut_bar_progress@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "cut_bar_progress@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/video_record_back.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "video_record_back.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "video_record_back@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "video_record_back@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLScaledImageViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // FMLScaledImageViewCell.m 3 | // VideoClip 4 | // 5 | // Created by samo on 16/9/2. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import "FMLScaledImageViewCell.h" 10 | 11 | @interface FMLScaledImageViewCell () 12 | 13 | @property (weak, nonatomic) IBOutlet UIImageView *scaledIamgeView; 14 | 15 | @end 16 | 17 | @implementation FMLScaledImageViewCell 18 | 19 | - (void)setImageData:(UIImage *)imageData 20 | { 21 | _imageData = imageData; 22 | 23 | self.scaledIamgeView.image = imageData; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/AVAsset+FMLVideo.h: -------------------------------------------------------------------------------- 1 | // 2 | // AVAsset+FMLVideo.h 3 | // VideoClip 4 | // 5 | // Created by samo on 16/7/27. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AVAsset (FMLVideo) 12 | 13 | /** 14 | * 获取每帧图片 15 | * 16 | * @param imageCount 需要获取的图片个数 17 | * @param imageBackBlock 得到一个图片时返回的block 18 | */ 19 | - (void)fml_getImagesCount:(NSUInteger)imageCount imageBackBlock:(void (^)(UIImage *))imageBackBlock; 20 | 21 | /** 22 | * 获取视频的总秒数 23 | */ 24 | - (Float64)fml_getSeconds; 25 | 26 | /** 获取fps */ 27 | - (float)fml_getFPS; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/UIView+Extension.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Extension.h 3 | // 01-黑酷 4 | // 5 | // Created by apple on 14-6-27. 6 | // Copyright (c) 2014年 heima. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (Extension) 12 | @property (nonatomic, assign) CGFloat x; 13 | @property (nonatomic, assign) CGFloat y; 14 | @property (nonatomic, assign) CGFloat width; 15 | @property (nonatomic, assign) CGFloat height; 16 | @property (nonatomic, assign) CGSize size; 17 | @property (nonatomic, assign) CGFloat centerX; 18 | @property (nonatomic, assign) CGFloat centerY; 19 | @property (assign, nonatomic) CGPoint origion; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/UIImage+FMLClipRect.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+FMLClipRect.h 3 | // VideoClip 4 | // 5 | // Created by samo on 16/8/2. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 边界裁剪,适应显示区域 8 | 9 | #import 10 | 11 | @interface UIImage (FMLClipRect) 12 | 13 | /** 14 | * 裁剪图片 15 | * 16 | * @param imageRect 原始图片大小 17 | * @param clipRect 需要裁剪成的图片大小 18 | * @param image 完成裁剪后的回调 19 | */ 20 | - (void)fml_imageOrginalRect:(CGRect)orginalRect clipRect:(CGRect)clipRect completeBlock:(void (^)(UIImage *))imageBackBlock; 21 | 22 | 23 | + (UIImage *)fml_scaleImage:(UIImage *)image maxDataSize:(NSUInteger)dataSize; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/BlocksKit/BlocksKit.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/BlocksKit 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/BlocksKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BlocksKit" "${PODS_ROOT}/Headers/Public/Masonry" 4 | OTHER_LDFLAGS = -framework "MessageUI" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /VideoClip/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/BlocksKit" "${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 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /VideoClip/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - BlocksKit (2.2.5): 3 | - BlocksKit/All (= 2.2.5) 4 | - BlocksKit/All (2.2.5): 5 | - BlocksKit/Core 6 | - BlocksKit/DynamicDelegate 7 | - BlocksKit/MessageUI 8 | - BlocksKit/UIKit 9 | - BlocksKit/Core (2.2.5) 10 | - BlocksKit/DynamicDelegate (2.2.5) 11 | - BlocksKit/MessageUI (2.2.5): 12 | - BlocksKit/Core 13 | - BlocksKit/DynamicDelegate 14 | - BlocksKit/UIKit (2.2.5): 15 | - BlocksKit/Core 16 | - BlocksKit/DynamicDelegate 17 | - Masonry (1.0.1) 18 | 19 | DEPENDENCIES: 20 | - BlocksKit 21 | - Masonry 22 | 23 | SPEC CHECKSUMS: 24 | BlocksKit: 7f422b971407001178d181a43b99014ea2591fe6 25 | Masonry: a1a931a0d08870ed8ae415a2ea5ea68ebcac77df 26 | 27 | PODFILE CHECKSUM: 44599003a9bad1f0364f91a2b6681e1663bb3208 28 | 29 | COCOAPODS: 1.0.1 30 | -------------------------------------------------------------------------------- /VideoClip/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - BlocksKit (2.2.5): 3 | - BlocksKit/All (= 2.2.5) 4 | - BlocksKit/All (2.2.5): 5 | - BlocksKit/Core 6 | - BlocksKit/DynamicDelegate 7 | - BlocksKit/MessageUI 8 | - BlocksKit/UIKit 9 | - BlocksKit/Core (2.2.5) 10 | - BlocksKit/DynamicDelegate (2.2.5) 11 | - BlocksKit/MessageUI (2.2.5): 12 | - BlocksKit/Core 13 | - BlocksKit/DynamicDelegate 14 | - BlocksKit/UIKit (2.2.5): 15 | - BlocksKit/Core 16 | - BlocksKit/DynamicDelegate 17 | - Masonry (1.0.1) 18 | 19 | DEPENDENCIES: 20 | - BlocksKit 21 | - Masonry 22 | 23 | SPEC CHECKSUMS: 24 | BlocksKit: 7f422b971407001178d181a43b99014ea2591fe6 25 | Masonry: a1a931a0d08870ed8ae415a2ea5ea68ebcac77df 26 | 27 | PODFILE CHECKSUM: 44599003a9bad1f0364f91a2b6681e1663bb3208 28 | 29 | COCOAPODS: 1.0.1 30 | -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/Pods-VideoClip/Pods-VideoClip.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BlocksKit" "${PODS_ROOT}/Headers/Public/Masonry" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BlocksKit" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/BlocksKit" -isystem "${PODS_ROOT}/Headers/Public/Masonry" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"BlocksKit" -l"Masonry" -framework "Foundation" -framework "MessageUI" -framework "UIKit" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/Pods-VideoClip/Pods-VideoClip.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BlocksKit" "${PODS_ROOT}/Headers/Public/Masonry" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BlocksKit" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/BlocksKit" -isystem "${PODS_ROOT}/Headers/Public/Masonry" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"BlocksKit" -l"Masonry" -framework "Foundation" -framework "MessageUI" -framework "UIKit" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /VideoClip/VideoClipTests/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /VideoClip/VideoClipUITests/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLVideoCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMLVideoCommand.h 3 | // VideoClip 4 | // 5 | // Created by Collion on 16/8/7. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface FMLVideoCommand : NSObject 13 | 14 | @property (nonatomic, strong, readonly) AVMutableComposition *mutableComposition; 15 | @property (nonatomic, strong, readonly) NSURL *assetURL; 16 | 17 | - (instancetype)initVideoCommendWithComposition:(AVMutableComposition *)composition; 18 | 19 | /** 20 | * 裁剪资源 21 | * 22 | * @param asset 被裁减的资源 23 | * @param startSecond 开始的秒数 24 | * @param endSecond 结束的秒数 25 | */ 26 | - (void)trimAsset:(AVAsset *)asset WithStartSecond:(Float64)startSecond andEndSecond:(Float64)endSecond; 27 | 28 | /** 导出资源 */ 29 | - (void)exportAsset; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/VideoClip.pch: -------------------------------------------------------------------------------- 1 | // 2 | // VideoClip.pch 3 | // VideoClip 4 | // 5 | // Created by samo on 16/7/28. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #ifndef VideoClip_pch 10 | #define VideoClip_pch 11 | 12 | #import "UIView+Extension.h" 13 | 14 | #define WEAKSELF __weak typeof(self) weakSelf = self; 15 | #define SMSColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0] 16 | 17 | #define FMLEditCommandCompletionNotification @"FMLEditCommandCompletionNotification" 18 | #define FMLExportCommandCompletionNotification @"FMLExportCommandCompletionNotification" 19 | 20 | #define FMLRecordViewSDKMinTime 8.0 ///< 最小时间限制 21 | #define FMLRecordViewSDKMaxTime 180.0 ///< 最长时间限制 22 | #define kScreenWidth [UIScreen mainScreen].bounds.size.width 23 | #define kScreenHeight [UIScreen mainScreen].bounds.size.height 24 | 25 | #endif /* VideoClip_pch */ 26 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLPlayLayerView.m: -------------------------------------------------------------------------------- 1 | // 2 | // FMLPlayLayerView.m 3 | // Niupu_SNS 4 | // 5 | // Created by samo on 16/8/17. 6 | // Copyright © 2016年 WE. All rights reserved. 7 | // 8 | 9 | #import "FMLPlayLayerView.h" 10 | #import 11 | 12 | @implementation FMLPlayLayerView 13 | 14 | - (instancetype)initWithFrame:(CGRect)frame 15 | { 16 | if (self = [super initWithFrame:frame]) { 17 | self.playerLayer.needsDisplayOnBoundsChange = YES; 18 | } 19 | 20 | return self; 21 | } 22 | 23 | - (AVPlayer *)player { 24 | return self.playerLayer.player; 25 | } 26 | 27 | - (void)setPlayer:(AVPlayer *)player { 28 | self.playerLayer.player = player; 29 | } 30 | 31 | // override UIView 32 | + (Class)layerClass { 33 | return [AVPlayerLayer class]; 34 | } 35 | 36 | - (AVPlayerLayer *)playerLayer { 37 | return (AVPlayerLayer *)self.layer; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIImagePickerController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImagePickerController+BlocksKit.h 3 | // BlocksKit 4 | // 5 | // Contributed by Yas Kuraishi. 6 | // 7 | 8 | #import 9 | 10 | /** UIImagePickerController with block callback. 11 | 12 | Created by [Yas Kuraishi](https://github.com/YasKuraishi) and contributed to 13 | BlocksKit. 14 | 15 | @warning UIImagePickerController is only available on a platform with 16 | UIKit. 17 | */ 18 | @interface UIImagePickerController (BlocksKit) 19 | 20 | /** 21 | * The block that fires after the receiver finished picking up an image 22 | */ 23 | @property (nonatomic, copy) void(^bk_didFinishPickingMediaBlock)(UIImagePickerController *, NSDictionary *); 24 | 25 | /** 26 | * The block that fires after the user cancels out of picker 27 | */ 28 | @property (nonatomic, copy) void(^bk_didCancelBlock)(UIImagePickerController *); 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSMutableSet+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableSet+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSMutableSet+BlocksKit.h" 7 | 8 | @implementation NSMutableSet (BlocksKit) 9 | 10 | - (void)bk_performSelect:(BOOL (^)(id obj))block { 11 | NSParameterAssert(block != nil); 12 | 13 | NSSet *list = [self objectsPassingTest:^BOOL(id obj, BOOL *stop) { 14 | return block(obj); 15 | }]; 16 | 17 | [self setSet:list]; 18 | } 19 | 20 | - (void)bk_performReject:(BOOL (^)(id obj))block { 21 | NSParameterAssert(block != nil); 22 | [self bk_performSelect:^BOOL(id obj) { 23 | return !block(obj); 24 | }]; 25 | } 26 | 27 | - (void)bk_performMap:(id (^)(id obj))block { 28 | NSParameterAssert(block != nil); 29 | 30 | NSMutableSet *new = [NSMutableSet setWithCapacity:self.count]; 31 | 32 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { 33 | id value = block(obj); 34 | if (!value) return; 35 | [new addObject:value]; 36 | }]; 37 | 38 | [self setSet:new]; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIPopoverController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIPopoverController+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Block functionality for UIPopoverController. 9 | 10 | Created by [Alexsander Akers](https://github.com/a2) and contributed to BlocksKit. 11 | 12 | @warning UIPopovercontroller is only available on a platform with UIKit. 13 | */ 14 | @interface UIPopoverController (BlocksKit) 15 | 16 | /** The block to be called when the popover controller will dismiss the popover. Return NO to prevent the dismissal of the view. */ 17 | @property (nonatomic, copy, setter = bk_setShouldDismissBlock:) BOOL (^bk_shouldDismissBlock)(UIPopoverController *popoverController); 18 | 19 | /** The block to be called when the user has taken action to dismiss the popover. This is not called when -dismissPopoverAnimated: is called directly. */ 20 | @property (nonatomic, copy, setter = bk_setDidDismissBlock:) void (^bk_didDismissBlock)(UIPopoverController *popoverController); 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/VideoClipTests/VideoClipTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // VideoClipTests.m 3 | // VideoClipTests 4 | // 5 | // Created by Collion on 16/7/23. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VideoClipTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation VideoClipTests 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 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSMutableArray+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSMutableArray+BlocksKit.h" 7 | 8 | @implementation NSMutableArray (BlocksKit) 9 | 10 | - (void)bk_performSelect:(BOOL (^)(id obj))block { 11 | NSParameterAssert(block != nil); 12 | 13 | NSIndexSet *list = [self indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { 14 | return !block(obj); 15 | }]; 16 | 17 | if (!list.count) return; 18 | [self removeObjectsAtIndexes:list]; 19 | } 20 | 21 | - (void)bk_performReject:(BOOL (^)(id obj))block { 22 | NSParameterAssert(block != nil); 23 | return [self bk_performSelect:^BOOL(id obj) { 24 | return !block(obj); 25 | }]; 26 | } 27 | 28 | - (void)bk_performMap:(id (^)(id obj))block { 29 | NSParameterAssert(block != nil); 30 | 31 | NSMutableArray *new = [self mutableCopy]; 32 | 33 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 34 | id value = block(obj) ?: [NSNull null]; 35 | if ([value isEqual:obj]) return; 36 | new[idx] = value; 37 | }]; 38 | 39 | [self setArray:new]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSMutableIndexSet+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableIndexSet+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSMutableIndexSet+BlocksKit.h" 7 | 8 | @implementation NSMutableIndexSet (BlocksKit) 9 | 10 | - (void)bk_performSelect:(BOOL (^)(NSUInteger index))block 11 | { 12 | NSParameterAssert(block != nil); 13 | 14 | NSIndexSet *list = [self indexesPassingTest:^BOOL(NSUInteger idx, BOOL *stop) { 15 | return !block(idx); 16 | }]; 17 | 18 | if (!list.count) return; 19 | [self removeIndexes:list]; 20 | } 21 | 22 | - (void)bk_performReject:(BOOL (^)(NSUInteger index))block 23 | { 24 | NSParameterAssert(block != nil); 25 | return [self bk_performSelect:^BOOL(NSUInteger idx) { 26 | return !block(idx); 27 | }]; 28 | } 29 | 30 | - (void)bk_performMap:(NSUInteger (^)(NSUInteger index))block 31 | { 32 | NSParameterAssert(block != nil); 33 | 34 | NSMutableIndexSet *new = [self mutableCopy]; 35 | 36 | [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { 37 | [new addIndex:block(idx)]; 38 | }]; 39 | 40 | [self removeAllIndexes]; 41 | [self addIndexes:new]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /VideoClip/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. -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSTimer+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimer+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSTimer+BlocksKit.h" 7 | 8 | @interface NSTimer (BlocksKitPrivate) 9 | 10 | + (void)bk_executeBlockFromTimer:(NSTimer *)aTimer; 11 | 12 | @end 13 | 14 | @implementation NSTimer (BlocksKit) 15 | 16 | + (id)bk_scheduledTimerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)(NSTimer *timer))block repeats:(BOOL)inRepeats 17 | { 18 | NSParameterAssert(block != nil); 19 | return [self scheduledTimerWithTimeInterval:inTimeInterval target:self selector:@selector(bk_executeBlockFromTimer:) userInfo:[block copy] repeats:inRepeats]; 20 | } 21 | 22 | + (id)bk_timerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)(NSTimer *timer))block repeats:(BOOL)inRepeats 23 | { 24 | NSParameterAssert(block != nil); 25 | return [self timerWithTimeInterval:inTimeInterval target:self selector:@selector(bk_executeBlockFromTimer:) userInfo:[block copy] repeats:inRepeats]; 26 | } 27 | 28 | + (void)bk_executeBlockFromTimer:(NSTimer *)aTimer { 29 | void (^block)(NSTimer *) = [aTimer userInfo]; 30 | if (block) block(aTimer); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/LICENSE: -------------------------------------------------------------------------------- 1 | // 2 | // LICENSE 3 | // BlocksKit 4 | // 5 | 6 | Copyright (c) 2011-2014 Zachary Waldowski, Alexsander Akers, and the BlocksKit Contributors 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSMutableDictionary+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableDictionary+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSMutableDictionary+BlocksKit.h" 7 | 8 | @implementation NSMutableDictionary (BlocksKit) 9 | 10 | - (void)bk_performSelect:(BOOL (^)(id key, id obj))block 11 | { 12 | NSParameterAssert(block != nil); 13 | 14 | NSArray *keys = [[self keysOfEntriesWithOptions:NSEnumerationConcurrent passingTest:^BOOL(id key, id obj, BOOL *stop) { 15 | return !block(key, obj); 16 | }] allObjects]; 17 | 18 | [self removeObjectsForKeys:keys]; 19 | } 20 | 21 | - (void)bk_performReject:(BOOL (^)(id key, id obj))block 22 | { 23 | NSParameterAssert(block != nil); 24 | [self bk_performSelect:^BOOL(id key, id obj) { 25 | return !block(key, obj); 26 | }]; 27 | } 28 | 29 | - (void)bk_performMap:(id (^)(id key, id obj))block 30 | { 31 | NSParameterAssert(block != nil); 32 | 33 | NSMutableDictionary *new = [self mutableCopy]; 34 | 35 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 36 | id value = block(key, obj) ?: [NSNull null]; 37 | if ([value isEqual:obj]) return; 38 | new[key] = value; 39 | }]; 40 | 41 | [self setDictionary:new]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLClipFrameView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMLClipFrameView.h 3 | // VideoClip 4 | // 5 | // Created by samo on 16/7/27. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class FMLClipFrameView; 13 | @protocol FMLClipFrameViewDelegate 14 | 15 | @optional 16 | - (void)didStartDragView; 17 | - (void)clipFrameView:(FMLClipFrameView *)clipFrameView didDragView:(Float64)second; 18 | - (void)clipFrameView:(FMLClipFrameView *)clipFrameView didEndDragLeftView:(Float64)second; 19 | - (void)clipFrameView:(FMLClipFrameView *)clipFrameView didEndDragRightView:(Float64)second; 20 | 21 | /** 22 | * 判断clipFrameView中的scrollview是否正在滚动 23 | * 24 | * @param clipFrameView 当前裁剪view 25 | * @param isScrolling 是否正在滚动 26 | */ 27 | - (void)clipFrameView:(FMLClipFrameView *)clipFrameView isScrolling:(BOOL)scrolling; 28 | 29 | @end 30 | 31 | @interface FMLClipFrameView : UIView 32 | 33 | @property (nonatomic, weak) id delegate; 34 | 35 | - (instancetype)initWithAsset:(AVAsset *)asset; 36 | 37 | - (void)resetProgressBarMode; 38 | 39 | - (void)setProgressBarPoisionWithSecond:(Float64)second; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/MessageUI/MFMailComposeViewController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // MFMailComposeViewController+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** MFMailComposeViewController with block callbacks. 9 | 10 | If you provide a completion handler to an instance of 11 | MFMailComposeViewController but do not implement a delegate callback for 12 | mailComposeController:didFinishWithResult:error:, the mail compose view 13 | controller will automatically be dismissed if it was launched modally. 14 | 15 | Created by [Igor Evsukov](https://github.com/evsukov89) and contributed to 16 | BlocksKit. 17 | 18 | @warning MFMailComposeViewController is only available on a platform with MessageUI. 19 | */ 20 | @interface MFMailComposeViewController (BlocksKit) 21 | 22 | /** The block fired on the dismissal of the mail composition interface. 23 | 24 | This block callback is an analog for the 25 | mailComposeController:didFinishWithResult:error:method 26 | of MFMailComposeViewControllerDelegate. 27 | */ 28 | @property (nonatomic, copy, setter = bk_setCompletionBlock:) void (^bk_completionBlock)(MFMailComposeViewController *controller, MFMailComposeResult result, NSError *error); 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSInvocation+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSInvocation+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** BlocksKit extensions for NSInvocation. */ 9 | @interface NSInvocation (BlocksKit) 10 | 11 | /** Generates a forwarding `NSInvocation` instance for a given method call 12 | encapsulated by the given block. 13 | 14 | NSInvocation *invocation = [NSInvocation invocationWithTarget:target block:^(id myObject) { 15 | [myObject someMethodWithArg:42.0]; 16 | }]; 17 | 18 | This returns an invocation with the appropriate target, selector, and arguments 19 | without creating the buffers yourself. It is only recommended to call a method 20 | on the argument to the block only once. More complicated forwarding machinery 21 | can be accomplished by the A2DynamicDelegate family of classes included in 22 | BlocksKit. 23 | 24 | Created by [Jonathan Rentzch](https://github.com/rentzsch) as 25 | `NSInvocation-blocks`. 26 | 27 | @param target The object to "grab" the block invocation from. 28 | @param block A code block. 29 | @return A fully-prepared instance of NSInvocation ready to be invoked. 30 | */ 31 | + (NSInvocation *)bk_invocationWithTarget:(id)target block:(void (^)(id target))block; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/MessageUI/MFMessageComposeViewController+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // MFMessageComposeViewController+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** MFMessageComposeViewController with block callback in addition to delegation. 9 | 10 | If you provide a completion handler to an instance of 11 | MFMessageComposeViewController but do not implement a delegate callback for 12 | messageComposeViewController:didFinishWithResult:error:, the message compose 13 | view controller will automatically be dismissed if it was launched modally. 14 | 15 | Created by [Igor Evsukov](https://github.com/evsukov89) and contributed to 16 | BlocksKit. 17 | 18 | @warning MFMessageComposeViewController is only available on a platform with MessageUI. 19 | */ 20 | @interface MFMessageComposeViewController (BlocksKit) 21 | 22 | /** The block fired on the dismissal of the SMS composition interface. 23 | 24 | This block callback is an analog for the 25 | messageComposeViewController:didFinishWithResult: method 26 | of MFMessageComposeViewControllerDelegate. 27 | */ 28 | @property (nonatomic, copy, setter = bk_setCompletionBlock:) void (^bk_completionBlock)(MFMessageComposeViewController *controller, MessageComposeResult result); 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSInvocation+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSInvocation+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSInvocation+BlocksKit.h" 7 | 8 | @interface BKInvocationGrabber : NSProxy 9 | 10 | + (BKInvocationGrabber *)grabberWithTarget:(id)target; 11 | 12 | @property (nonatomic, strong) id target; 13 | @property (nonatomic, strong) NSInvocation *invocation; 14 | 15 | @end 16 | 17 | @implementation BKInvocationGrabber 18 | 19 | + (BKInvocationGrabber *)grabberWithTarget:(id)target { 20 | BKInvocationGrabber *instance = [BKInvocationGrabber alloc]; 21 | instance.target = target; 22 | return instance; 23 | } 24 | 25 | - (NSMethodSignature*)methodSignatureForSelector:(SEL)selector { 26 | return [self.target methodSignatureForSelector:selector]; 27 | } 28 | 29 | - (void)forwardInvocation:(NSInvocation*)invocation { 30 | [invocation setTarget:self.target]; 31 | NSParameterAssert(self.invocation == nil); 32 | self.invocation = invocation; 33 | } 34 | 35 | @end 36 | 37 | 38 | @implementation NSInvocation (BlocksKit) 39 | 40 | + (NSInvocation *)bk_invocationWithTarget:(id)target block:(void (^)(id target))block 41 | { 42 | NSParameterAssert(block != nil); 43 | BKInvocationGrabber *grabber = [BKInvocationGrabber grabberWithTarget:target]; 44 | block(grabber); 45 | return grabber.invocation; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSMutableOrderedSet+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableOrderedSet+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSMutableOrderedSet+BlocksKit.h" 7 | 8 | @implementation NSMutableOrderedSet (BlocksKit) 9 | 10 | - (void)bk_performSelect:(BOOL (^)(id obj))block { 11 | NSParameterAssert(block != nil); 12 | 13 | NSIndexSet *list = [self indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { 14 | return !block(obj); 15 | }]; 16 | 17 | if (!list.count) return; 18 | [self removeObjectsAtIndexes:list]; 19 | } 20 | 21 | - (void)bk_performReject:(BOOL (^)(id obj))block { 22 | NSParameterAssert(block != nil); 23 | return [self bk_performSelect:^BOOL(id obj) { 24 | return !block(obj); 25 | }]; 26 | } 27 | 28 | - (void)bk_performMap:(id (^)(id obj))block { 29 | NSParameterAssert(block != nil); 30 | 31 | NSMutableIndexSet *newIndexes = [NSMutableIndexSet indexSet]; 32 | NSMutableArray *newObjects = [NSMutableArray arrayWithCapacity:self.count]; 33 | 34 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 35 | id value = block(obj) ?: [NSNull null]; 36 | if ([value isEqual:obj]) return; 37 | [newIndexes addIndex:idx]; 38 | [newObjects addObject:obj]; 39 | }]; 40 | 41 | [self replaceObjectsAtIndexes:newIndexes withObjects:newObjects]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIWebView+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebView+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Block callbacks for UIWebView. 9 | 10 | @warning UIWebView is only available on a platform with UIKit. 11 | */ 12 | 13 | @interface UIWebView (BlocksKit) 14 | 15 | /** The block to be decide whether a URL will be loaded. 16 | 17 | @warning If the delegate implements webView:shouldStartLoadWithRequest:navigationType:, 18 | the return values of both the delegate method and the block will be considered. 19 | */ 20 | @property (nonatomic, copy, setter = bk_setShouldStartLoadBlock:) BOOL (^bk_shouldStartLoadBlock)(UIWebView *webView, NSURLRequest *request, UIWebViewNavigationType navigationType); 21 | 22 | /** The block that is fired when the web view starts loading. */ 23 | @property (nonatomic, copy, setter = bk_setDidStartLoadBlock:) void (^bk_didStartLoadBlock)(UIWebView *webView); 24 | 25 | /** The block that is fired when the web view finishes loading. */ 26 | @property (nonatomic, copy, setter = bk_setDidFinishLoadBlock:) void (^bk_didFinishLoadBlock)(UIWebView *webView); 27 | 28 | /** The block that is fired when the web view stops loading due to an error. */ 29 | @property (nonatomic, copy, setter = bk_setDidFinishWithErrorBlock:) void (^bk_didFinishWithErrorBlock)(UIWebView *webView, NSError *error); 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /VideoClip/VideoClipUITests/VideoClipUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // VideoClipUITests.m 3 | // VideoClipUITests 4 | // 5 | // Created by Collion on 16/7/23. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VideoClipUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation VideoClipUITests 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 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | NSPhotoLibraryUsageDescription 28 | 请求调用相册 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSMutableIndexSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableIndexSet+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Block extensions for NSMutableIndexSet. 9 | 10 | These utilities expound upon the BlocksKit additions to the immutable 11 | superclass by allowing certain utilities to work on an instance of the mutable 12 | class, saving memory by not creating an immutable copy of the results. 13 | 14 | @see NSIndexSet(BlocksKit) 15 | */ 16 | @interface NSMutableIndexSet (BlocksKit) 17 | 18 | /** Filters a mutable index set to the indexes matching the block. 19 | 20 | @param block A single-argument, BOOL-returning code block. 21 | @see bk_reject: 22 | */ 23 | - (void)bk_performSelect:(BOOL (^)(NSUInteger index))block; 24 | 25 | /** Filters a mutable index set to all indexes but the ones matching the block, 26 | the logical inverse to bk_select:. 27 | 28 | @param block A single-argument, BOOL-returning code block. 29 | @see bk_select: 30 | */ 31 | - (void)bk_performReject:(BOOL (^)(NSUInteger index))block; 32 | 33 | /** Transform each index of the index set to a new index, as returned by the 34 | block. 35 | 36 | @param block A block that returns a new index for a index. 37 | @see bk_map: 38 | */ 39 | - (void)bk_performMap:(NSUInteger (^)(NSUInteger index))block; 40 | 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSCache+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSCache+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "A2DynamicDelegate.h" 7 | #import "NSCache+BlocksKit.h" 8 | #import "NSObject+A2BlockDelegate.h" 9 | 10 | #pragma mark Custom delegate 11 | 12 | @interface A2DynamicNSCacheDelegate : A2DynamicDelegate 13 | 14 | @end 15 | 16 | @implementation A2DynamicNSCacheDelegate 17 | 18 | - (void)cache:(NSCache *)cache willEvictObject:(id)obj 19 | { 20 | id realDelegate = self.realDelegate; 21 | if (realDelegate && [realDelegate respondsToSelector:@selector(cache:willEvictObject:)]) 22 | [realDelegate cache:cache willEvictObject:obj]; 23 | 24 | void (^orig)(NSCache *, id) = [self blockImplementationForMethod:_cmd]; 25 | if (orig) orig(cache, obj); 26 | } 27 | 28 | @end 29 | 30 | #pragma mark Category 31 | 32 | @implementation NSCache (BlocksKit) 33 | 34 | @dynamic bk_willEvictBlock; 35 | 36 | + (void)load 37 | { 38 | @autoreleasepool { 39 | [self bk_registerDynamicDelegate]; 40 | [self bk_linkDelegateMethods:@{ @"bk_willEvictBlock": @"cache:willEvictObject:" }]; 41 | } 42 | } 43 | 44 | #pragma mark Methods 45 | 46 | - (id)bk_objectForKey:(id)key withGetter:(id (^)(void))block 47 | { 48 | id object = [self objectForKey:key]; 49 | if (object) return object; 50 | 51 | if (block) { 52 | object = block(); 53 | [self setObject:object forKey:key]; 54 | } 55 | 56 | return object; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/BlocksKit+MessageUI.h: -------------------------------------------------------------------------------- 1 | // 2 | // BlocksKit+MessageUI 3 | // 4 | // The Objective-C block utilities you always wish you had. 5 | // 6 | // Copyright (c) 2011-2012, 2013-2014 Zachary Waldowski 7 | // Copyright (c) 2012-2013 Pandamonia LLC 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | #import 29 | #import 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSMutableDictionary+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableDictionary+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Block extensions for NSMutableDictionary. 9 | 10 | These utilities expound upon the BlocksKit additions to the immutable 11 | superclass by allowing certain utilities to work on an instance of the mutable 12 | class, saving memory by not creating an immutable copy of the results. 13 | 14 | Includes code by the following: 15 | 16 | - [Martin Schürrer](https://github.com/MSch) 17 | - [Zach Waldowski](https://github.com/zwaldowski) 18 | 19 | @see NSDictionary(BlocksKit) 20 | */ 21 | @interface NSMutableDictionary (BlocksKit) 22 | 23 | /** Filters a mutable dictionary to the key/value pairs matching the block. 24 | 25 | @param block A BOOL-returning code block for a key/value pair. 26 | @see bk_reject: 27 | */ 28 | - (void)bk_performSelect:(BOOL (^)(id key, id obj))block; 29 | 30 | /** Filters a mutable dictionary to the key/value pairs not matching the block, 31 | the logical inverse to bk_select:. 32 | 33 | @param block A BOOL-returning code block for a key/value pair. 34 | @see bk_select: 35 | */ 36 | - (void)bk_performReject:(BOOL (^)(id key, id obj))block; 37 | 38 | /** Transform each value of the dictionary to a new value, as returned by the 39 | block. 40 | 41 | @param block A block that returns a new value for a given key/value pair. 42 | @see bk_map: 43 | */ 44 | - (void)bk_performMap:(id (^)(id key, id obj))block; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSMutableSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableSet+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Block extensions for NSMutableSet. 9 | 10 | These utilities expound upon the BlocksKit additions to the immutable 11 | superclass by allowing certain utilities to work on an instance of the mutable 12 | class, saving memory by not creating an immutable copy of the results. 13 | 14 | Includes code by the following: 15 | 16 | - [Martin Schürrer](https://github.com/MSch) 17 | - [Zach Waldowski](https://github.com/zwaldowski) 18 | 19 | @see NSSet(BlocksKit) 20 | */ 21 | @interface NSMutableSet (BlocksKit) 22 | 23 | /** Filters a mutable set to the objects matching the block. 24 | 25 | @param block A single-argument, BOOL-returning code block. 26 | @see bk_reject: 27 | */ 28 | - (void)bk_performSelect:(BOOL (^)(id obj))block; 29 | 30 | /** Filters a mutable set to all objects but the ones matching the block, 31 | the logical inverse to bk_select:. 32 | 33 | @param block A single-argument, BOOL-returning code block. 34 | @see bk_select: 35 | */ 36 | - (void)bk_performReject:(BOOL (^)(id obj))block; 37 | 38 | /** Transform the objects in the set to the results of the block. 39 | 40 | This is sometimes referred to as a transform, mutating one of each object: 41 | [controllers bk_map:^id(id obj) { 42 | return [obj view]; 43 | }]; 44 | 45 | @param block A single-argument, object-returning code block. 46 | @see bk_map: 47 | */ 48 | - (void)bk_performMap:(id (^)(id obj))block; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSMutableArray+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Block extensions for NSMutableArray. 9 | 10 | These utilities expound upon the BlocksKit additions to the immutable 11 | superclass by allowing certain utilities to work on an instance of the mutable 12 | class, saving memory by not creating an immutable copy of the results. 13 | 14 | Includes code by the following: 15 | 16 | - [Martin Schürrer](https://github.com/MSch) 17 | - [Zach Waldowski](https://github.com/zwaldowski) 18 | 19 | @see NSArray(BlocksKit) 20 | */ 21 | @interface NSMutableArray (BlocksKit) 22 | 23 | /** Filters a mutable array to the objects matching the block. 24 | 25 | @param block A single-argument, BOOL-returning code block. 26 | @see bk_reject: 27 | */ 28 | - (void)bk_performSelect:(BOOL (^)(id obj))block; 29 | 30 | /** Filters a mutable array to all objects but the ones matching the block, 31 | the logical inverse to bk_select:. 32 | 33 | @param block A single-argument, BOOL-returning code block. 34 | @see bk_select: 35 | */ 36 | - (void)bk_performReject:(BOOL (^)(id obj))block; 37 | 38 | /** Transform the objects in the array to the results of the block. 39 | 40 | This is sometimes referred to as a transform, mutating one of each object: 41 | [foo bk_performMap:^id(id obj) { 42 | return [dateTransformer dateFromString:obj]; 43 | }]; 44 | 45 | @param block A single-argument, object-returning code block. 46 | @see bk_map: 47 | */ 48 | - (void)bk_performMap:(id (^)(id obj))block; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSMutableOrderedSet+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableOrderedSet+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Block extensions for NSMutableOrderedSet. 9 | 10 | These utilities expound upon the BlocksKit additions to the immutable 11 | superclass by allowing certain utilities to work on an instance of the mutable 12 | class, saving memory by not creating an immutable copy of the results. 13 | 14 | Includes code by the following: 15 | 16 | - [Martin Schürrer](https://github.com/MSch) 17 | - [Zach Waldowski](https://github.com/zwaldowski) 18 | 19 | @see NSOrderedSet(BlocksKit) 20 | */ 21 | @interface NSMutableOrderedSet (BlocksKit) 22 | 23 | /** Filters a mutable ordered set to the objects matching the block. 24 | 25 | @param block A single-argument, BOOL-returning code block. 26 | @see bk_reject: 27 | */ 28 | - (void)bk_performSelect:(BOOL (^)(id obj))block; 29 | 30 | /** Filters a mutable ordered set to all objects but the ones matching the 31 | block, the logical inverse to bk_select:. 32 | 33 | @param block A single-argument, BOOL-returning code block. 34 | @see bk_select: 35 | */ 36 | - (void)bk_performReject:(BOOL (^)(id obj))block; 37 | 38 | /** Transform the objects in the ordered set to the results of the block. 39 | 40 | This is sometimes referred to as a transform, mutating one of each object: 41 | [foo bk_performMap:^id(id obj) { 42 | return [dateTransformer dateFromString:obj]; 43 | }]; 44 | 45 | @param block A single-argument, object-returning code block. 46 | @see bk_map: 47 | */ 48 | - (void)bk_performMap:(id (^)(id obj))block; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIControl+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Block control event handling for UIControl. 9 | 10 | Includes code by the following: 11 | 12 | - [Kevin O'Neill](https://github.com/kevinoneill) 13 | - [Zach Waldowski](https://github.com/zwaldowski) 14 | 15 | @warning UIControl is only available on a platform with UIKit. 16 | */ 17 | @interface UIControl (BlocksKit) 18 | 19 | ///----------------------------------- 20 | /// @name Block event handling 21 | ///----------------------------------- 22 | 23 | /** Adds a block for a particular event to an internal dispatch table. 24 | 25 | @param handler A block representing an action message, with an argument for the sender. 26 | @param controlEvents A bitmask specifying the control events for which the action message is sent. 27 | @see removeEventHandlersForControlEvents: 28 | */ 29 | - (void)bk_addEventHandler:(void (^)(id sender))handler forControlEvents:(UIControlEvents)controlEvents; 30 | 31 | /** Removes all blocks for a particular event combination. 32 | @param controlEvents A bitmask specifying the control events for which the block will be removed. 33 | @see addEventHandler:forControlEvents: 34 | */ 35 | - (void)bk_removeEventHandlersForControlEvents:(UIControlEvents)controlEvents; 36 | 37 | /** Checks to see if the control has any blocks for a particular event combination. 38 | @param controlEvents A bitmask specifying the control events for which to check for blocks. 39 | @see addEventHandler:forControlEvents: 40 | @return Returns YES if there are blocks for these control events, NO otherwise. 41 | */ 42 | - (BOOL)bk_hasEventHandlersForControlEvents:(UIControlEvents)controlEvents; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIView+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "UIGestureRecognizer+BlocksKit.h" 7 | #import "UIView+BlocksKit.h" 8 | 9 | @implementation UIView (BlocksKit) 10 | 11 | - (void)bk_whenTouches:(NSUInteger)numberOfTouches tapped:(NSUInteger)numberOfTaps handler:(void (^)(void))block 12 | { 13 | if (!block) return; 14 | 15 | UITapGestureRecognizer *gesture = [UITapGestureRecognizer bk_recognizerWithHandler:^(UIGestureRecognizer *sender, UIGestureRecognizerState state, CGPoint location) { 16 | if (state == UIGestureRecognizerStateRecognized) block(); 17 | }]; 18 | 19 | gesture.numberOfTouchesRequired = numberOfTouches; 20 | gesture.numberOfTapsRequired = numberOfTaps; 21 | 22 | [self.gestureRecognizers enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 23 | if (![obj isKindOfClass:[UITapGestureRecognizer class]]) return; 24 | 25 | UITapGestureRecognizer *tap = obj; 26 | BOOL rightTouches = (tap.numberOfTouchesRequired == numberOfTouches); 27 | BOOL rightTaps = (tap.numberOfTapsRequired == numberOfTaps); 28 | if (rightTouches && rightTaps) { 29 | [gesture requireGestureRecognizerToFail:tap]; 30 | } 31 | }]; 32 | 33 | [self addGestureRecognizer:gesture]; 34 | } 35 | 36 | - (void)bk_whenTapped:(void (^)(void))block 37 | { 38 | [self bk_whenTouches:1 tapped:1 handler:block]; 39 | } 40 | 41 | - (void)bk_whenDoubleTapped:(void (^)(void))block 42 | { 43 | [self bk_whenTouches:2 tapped:1 handler:block]; 44 | } 45 | 46 | - (void)bk_eachSubview:(void (^)(UIView *subview))block 47 | { 48 | NSParameterAssert(block != nil); 49 | 50 | [self.subviews enumerateObjectsUsingBlock:^(UIView *subview, NSUInteger idx, BOOL *stop) { 51 | block(subview); 52 | }]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSCache+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSCache+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** NSCache with block adding of objects 9 | 10 | This category allows you to conditionally add objects to 11 | an instance of NSCache using blocks. Both the normal 12 | delegation pattern and a block callback for NSCache's one 13 | delegate method are allowed. 14 | 15 | These methods emulate Rails caching behavior. 16 | 17 | Created by [Igor Evsukov](https://github.com/evsukov89) and contributed to BlocksKit. 18 | */ 19 | 20 | @interface NSCache (BlocksKit) 21 | 22 | /** Returns the value associated with a given key. If there is no 23 | object for that key, it uses the result of the block, saves 24 | that to the cache, and returns it. 25 | 26 | This mimics the cache behavior of Ruby on Rails. The following code: 27 | 28 | @products = Rails.cache.fetch('products') do 29 | Product.all 30 | end 31 | 32 | becomes: 33 | 34 | NSMutableArray *products = [cache objectForKey:@"products" withGetter:^id{ 35 | return [Product all]; 36 | }]; 37 | 38 | @return The value associated with *key*, or the object returned 39 | by the block if no value is associated with *key*. 40 | @param key An object identifying the value. 41 | @param getterBlock A block used to get an object if there is no 42 | value in the cache. 43 | */ 44 | - (id)bk_objectForKey:(id)key withGetter:(id (^)(void))getterBlock; 45 | 46 | /** Called when an object is about to be evicted from the cache. 47 | 48 | This block callback is an analog for the cache:willEviceObject: 49 | method of NSCacheDelegate. 50 | */ 51 | @property (nonatomic, copy, setter = bk_setWillEvictBlock:) void (^bk_willEvictBlock)(NSCache *cache, id obj); 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSTimer+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimer+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Simple category on NSTimer to give it blocks capability. 9 | 10 | Created by [Jiva DeVoe](https://github.com/jivadevoe) as `NSTimer-Blocks`. 11 | */ 12 | @interface NSTimer (BlocksKit) 13 | 14 | /** Creates and returns a block-based NSTimer object and schedules it on the current run loop. 15 | 16 | @param inTimeInterval The number of seconds between firings of the timer. 17 | @param inBlock The block that the NSTimer fires. 18 | @param inRepeats If YES, the timer will repeatedly reschedule itself until invalidated. If NO, the timer will be invalidated after it fires. 19 | @return A new NSTimer object, configured according to the specified parameters. 20 | */ 21 | + (NSTimer *)bk_scheduledTimerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)(NSTimer *timer))inBlock repeats:(BOOL)inRepeats; 22 | 23 | /** Creates and returns a block-based NSTimer initialized with the specified block. 24 | 25 | You must add the new timer to a run loop, using `-addTimer:forMode:`. Then, 26 | after seconds seconds have elapsed, the timer fires the block. If the timer 27 | is configured to repeat, there is no need to subsequently re-add the timer. 28 | 29 | @param inTimeInterval The number of seconds between firings of the timer. 30 | @param inBlock The block that the NSTimer fires. 31 | @param inRepeats If YES, the timer will repeatedly reschedule itself until invalidated. If NO, the timer will be invalidated after it fires. 32 | @return A new NSTimer object, configured according to the specified parameters. 33 | */ 34 | + (NSTimer *)bk_timerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)(NSTimer *timer))inBlock repeats:(BOOL)inRepeats; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIPopoverController+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIPopoverController+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "A2DynamicDelegate.h" 7 | #import "NSObject+A2BlockDelegate.h" 8 | #import "UIPopoverController+BlocksKit.h" 9 | 10 | #pragma mark - Delegate 11 | 12 | @interface A2DynamicUIPopoverControllerDelegate : A2DynamicDelegate 13 | 14 | @end 15 | 16 | @implementation A2DynamicUIPopoverControllerDelegate 17 | 18 | - (BOOL)popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController 19 | { 20 | BOOL should = YES; 21 | 22 | id realDelegate = self.realDelegate; 23 | if (realDelegate && [realDelegate respondsToSelector:@selector(popoverControllerShouldDismissPopover:)]) 24 | should &= [realDelegate popoverControllerShouldDismissPopover:popoverController]; 25 | 26 | BOOL (^block)(UIPopoverController *) = [self blockImplementationForMethod:_cmd]; 27 | if (block) should &= block(popoverController); 28 | 29 | return should; 30 | } 31 | 32 | - (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController 33 | { 34 | id realDelegate = self.realDelegate; 35 | if (realDelegate && [realDelegate respondsToSelector:@selector(popoverControllerDidDismissPopover:)]) 36 | [realDelegate popoverControllerDidDismissPopover:popoverController]; 37 | 38 | void (^block)(UIPopoverController *) = [self blockImplementationForMethod:_cmd]; 39 | if (block) block(popoverController); 40 | } 41 | 42 | @end 43 | 44 | #pragma mark - Category 45 | 46 | @implementation UIPopoverController (BlocksKit) 47 | 48 | @dynamic bk_didDismissBlock, bk_shouldDismissBlock; 49 | 50 | + (void)load 51 | { 52 | @autoreleasepool { 53 | [self bk_registerDynamicDelegate]; 54 | [self bk_linkDelegateMethods:@{ @"bk_didDismissBlock": @"popoverControllerDidDismissPopover:", @"bk_shouldDismissBlock": @"popoverControllerShouldDismissPopover:" }]; 55 | } 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/BlocksKit+UIKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // BlocksKit+UIKit 3 | // 4 | // The Objective-C block utilities you always wish you had. 5 | // 6 | // Copyright (c) 2011-2012, 2013-2014 Zachary Waldowski 7 | // Copyright (c) 2012-2013 Pandamonia LLC 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import 36 | #import 37 | #import 38 | #import 39 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIImagePickerController+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImagePickerController+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "A2DynamicDelegate.h" 7 | #import "NSObject+A2BlockDelegate.h" 8 | #import "UIImagePickerController+BlocksKit.h" 9 | 10 | #pragma mark Custom delegate 11 | 12 | @interface A2DynamicUIImagePickerControllerDelegate : A2DynamicDelegate 13 | 14 | @end 15 | 16 | @implementation A2DynamicUIImagePickerControllerDelegate 17 | 18 | - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { 19 | id realDelegate = self.realDelegate; 20 | if (realDelegate && [realDelegate respondsToSelector:@selector(imagePickerController:didFinishPickingMediaWithInfo:)]) 21 | [realDelegate imagePickerController:picker didFinishPickingMediaWithInfo:info]; 22 | 23 | void (^block)(UIImagePickerController *, NSDictionary *) = [self blockImplementationForMethod:_cmd]; 24 | if (block) block(picker, info); 25 | } 26 | 27 | - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { 28 | id realDelegate = self.realDelegate; 29 | if (realDelegate && [realDelegate respondsToSelector:@selector(imagePickerControllerDidCancel:)]) 30 | [realDelegate imagePickerControllerDidCancel:picker]; 31 | 32 | void (^block)(UIImagePickerController *) = [self blockImplementationForMethod:_cmd]; 33 | if (block) block(picker); 34 | } 35 | 36 | @end 37 | 38 | #pragma mark Category 39 | 40 | @implementation UIImagePickerController (BlocksKit) 41 | 42 | @dynamic bk_didFinishPickingMediaBlock; 43 | @dynamic bk_didCancelBlock; 44 | 45 | + (void)load 46 | { 47 | @autoreleasepool { 48 | [self bk_registerDynamicDelegate]; 49 | [self bk_linkDelegateMethods:@{ @"bk_didFinishPickingMediaBlock": @"imagePickerController:didFinishPickingMediaWithInfo:", 50 | @"bk_didCancelBlock": @"imagePickerControllerDidCancel:" }]; 51 | } 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/UIView+Extension.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Extension.m 3 | // 01-黑酷 4 | // 5 | // Created by apple on 14-6-27. 6 | // Copyright (c) 2014年 heima. All rights reserved. 7 | // 8 | 9 | #import "UIView+Extension.h" 10 | 11 | @implementation UIView (Extension) 12 | 13 | - (void)setX:(CGFloat)x 14 | { 15 | CGRect frame = self.frame; 16 | frame.origin.x = x; 17 | self.frame = frame; 18 | } 19 | 20 | - (CGFloat)x 21 | { 22 | return self.frame.origin.x; 23 | } 24 | 25 | - (void)setY:(CGFloat)y 26 | { 27 | CGRect frame = self.frame; 28 | frame.origin.y = y; 29 | self.frame = frame; 30 | } 31 | 32 | - (CGFloat)y 33 | { 34 | return self.frame.origin.y; 35 | } 36 | 37 | - (void)setWidth:(CGFloat)width 38 | { 39 | CGRect frame = self.frame; 40 | frame.size.width = width; 41 | self.frame = frame; 42 | } 43 | 44 | - (CGFloat)width 45 | { 46 | return self.frame.size.width; 47 | } 48 | 49 | - (void)setHeight:(CGFloat)height 50 | { 51 | CGRect frame = self.frame; 52 | frame.size.height = height; 53 | self.frame = frame; 54 | } 55 | 56 | - (void)setCenterX:(CGFloat)centerX 57 | { 58 | CGPoint center = self.center; 59 | center.x = centerX; 60 | self.center = center; 61 | } 62 | 63 | - (CGFloat)centerX 64 | { 65 | return self.center.x; 66 | } 67 | - (void)setCenterY:(CGFloat)centerY 68 | { 69 | CGPoint center = self.center; 70 | center.y = centerY; 71 | self.center = center; 72 | } 73 | 74 | - (CGFloat)centerY 75 | { 76 | return self.center.y; 77 | } 78 | 79 | - (CGFloat)height 80 | { 81 | return self.frame.size.height; 82 | } 83 | 84 | - (void)setSize:(CGSize)size 85 | { 86 | CGRect frame = self.frame; 87 | frame.size = size; 88 | self.frame = frame; 89 | } 90 | 91 | - (CGSize)size 92 | { 93 | return self.frame.size; 94 | } 95 | 96 | - (void)setOrigion:(CGPoint)origion { 97 | CGRect frame = self.frame; 98 | frame.origin = origion; 99 | self.frame = frame; 100 | } 101 | 102 | - (CGPoint)origion { 103 | return self.frame.origin; 104 | } 105 | 106 | @end 107 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // BlocksKit 3 | // 4 | // The Objective-C block utilities you always wish you had. 5 | // 6 | // Copyright (c) 2011-2012, 2013-2014 Zachary Waldowski 7 | // Copyright (c) 2012-2013 Pandamonia LLC 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import 36 | #import 37 | #import 38 | #import 39 | #import 40 | #import 41 | #import 42 | #import 43 | #import 44 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UITextField+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+BlocksKit.h 3 | // BlocksKit 4 | // 5 | // Contributed by Samuel E. Giddins. 6 | // 7 | 8 | #import 9 | #import "BlocksKit.h" 10 | 11 | /** Block callbacks for UITextField. 12 | 13 | @warning UITextField is only available on a platform with UIKit. 14 | 15 | Created by [Samuel E. Giddins](https://github.com/segiddins) and 16 | contributed to BlocksKit. 17 | */ 18 | @interface UITextField (BlocksKit) 19 | 20 | /** 21 | * The block that fires before the receiver begins editing 22 | * 23 | * The return value indicates whether the receiver should begin editing 24 | */ 25 | @property (nonatomic, copy) BOOL(^bk_shouldBeginEditingBlock)(UITextField *); 26 | 27 | /** 28 | * The block that fires after the receiver begins editing 29 | */ 30 | @property (nonatomic, copy) void(^bk_didBeginEditingBlock)(UITextField *); 31 | 32 | /** 33 | * The block that fires before the receiver ends editing 34 | * 35 | * The return value indicates whether the receiver should end editing 36 | */ 37 | @property (nonatomic, copy) BOOL(^bk_shouldEndEditingBlock)(UITextField *); 38 | 39 | /** 40 | * The block that fires after the receiver ends editing 41 | */ 42 | @property (nonatomic, copy) void(^bk_didEndEditingBlock)(UITextField *); 43 | 44 | /** 45 | * The block that fires when the receiver's text will change 46 | * 47 | * The return value indicates whether the receiver should replace the characters in the given range with the replacement string 48 | */ 49 | @property (nonatomic, copy) BOOL(^bk_shouldChangeCharactersInRangeWithReplacementStringBlock)(UITextField *, NSRange, NSString *); 50 | 51 | /** 52 | * The block that fires when the receiver's clear button is pressed 53 | * 54 | * The return value indicates whether the receiver should clear its contents 55 | */ 56 | @property (nonatomic, copy) BOOL(^bk_shouldClearBlock)(UITextField *); 57 | 58 | /** 59 | * The block that fires when the keyboard's return button is pressed and the receiver is the first responder 60 | * 61 | * The return value indicates whether the receiver should return 62 | */ 63 | @property (nonatomic, copy) BOOL(^bk_shouldReturnBlock)(UITextField *); 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/UIImage+FMLClipRect.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+FMLClipRect.m 3 | // VideoClip 4 | // 5 | // Created by samo on 16/8/2. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import "UIImage+FMLClipRect.h" 10 | 11 | @implementation UIImage (FMLClipRect) 12 | 13 | - (void)fml_imageOrginalRect:(CGRect)orginalRect clipRect:(CGRect)clipRect completeBlock:(void (^)(UIImage *))imageBackBlock 14 | { 15 | CGSize orginalSize = orginalRect.size; 16 | UIGraphicsBeginImageContextWithOptions(orginalSize, NO, [UIScreen mainScreen].scale); 17 | 18 | UIBezierPath *path = [UIBezierPath bezierPathWithRect:clipRect]; 19 | [path addClip]; 20 | 21 | [self drawInRect:clipRect]; 22 | 23 | UIImage *resultImg = UIGraphicsGetImageFromCurrentImageContext(); 24 | 25 | UIGraphicsEndImageContext(); 26 | 27 | !imageBackBlock ? : imageBackBlock(resultImg); 28 | } 29 | 30 | + (UIImage *)fml_scaleImage:(UIImage *)image maxDataSize:(NSUInteger)dataSize 31 | { 32 | if (image) { 33 | NSData *imageData = UIImageJPEGRepresentation(image, 1.0); 34 | if (imageData.length > dataSize) { 35 | float scaleSize = (dataSize/1.0)/(imageData.length); 36 | scaleSize = 0.9 * sqrtf(scaleSize); 37 | return [self scaleImage:image toScale:scaleSize maxDataSize:dataSize]; 38 | } else { 39 | return image; 40 | } 41 | } else { 42 | return nil; 43 | } 44 | } 45 | 46 | + (UIImage *)scaleImage:(UIImage *)image toScale:(float)scaleSize maxDataSize:(NSUInteger)dataSize 47 | { 48 | UIGraphicsBeginImageContext(CGSizeMake(image.size.width * scaleSize - 1, image.size.height * scaleSize - 1)); 49 | [image drawInRect:CGRectMake(0, 0, image.size.width * scaleSize, image.size.height * scaleSize)]; 50 | UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext(); 51 | UIGraphicsEndImageContext(); 52 | 53 | NSData* imageData = UIImageJPEGRepresentation(scaledImage, 1.0); 54 | if (imageData.length > dataSize) { 55 | float scale = (dataSize / 1.0) / (imageData.length); 56 | scale = 0.9 * sqrtf(scale); 57 | return [self scaleImage:scaledImage toScale:scale maxDataSize:dataSize]; 58 | } 59 | return scaledImage; 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIBarButtonItem+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItem+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | #import "UIBarButtonItem+BlocksKit.h" 8 | 9 | static const void *BKBarButtonItemBlockKey = &BKBarButtonItemBlockKey; 10 | 11 | @interface UIBarButtonItem (BlocksKitPrivate) 12 | 13 | - (void)bk_handleAction:(UIBarButtonItem *)sender; 14 | 15 | @end 16 | 17 | @implementation UIBarButtonItem (BlocksKit) 18 | 19 | - (id)bk_initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem handler:(void (^)(id sender))action 20 | { 21 | self = [self initWithBarButtonSystemItem:systemItem target:self action:@selector(bk_handleAction:)]; 22 | if (!self) return nil; 23 | 24 | objc_setAssociatedObject(self, BKBarButtonItemBlockKey, action, OBJC_ASSOCIATION_COPY_NONATOMIC); 25 | 26 | return self; 27 | } 28 | 29 | - (id)bk_initWithImage:(UIImage *)image style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action 30 | { 31 | self = [self initWithImage:image style:style target:self action:@selector(bk_handleAction:)]; 32 | if (!self) return nil; 33 | 34 | objc_setAssociatedObject(self, BKBarButtonItemBlockKey, action, OBJC_ASSOCIATION_COPY_NONATOMIC); 35 | 36 | return self; 37 | } 38 | 39 | - (id)bk_initWithImage:(UIImage *)image landscapeImagePhone:(UIImage *)landscapeImagePhone style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action 40 | { 41 | self = [self initWithImage:image landscapeImagePhone:landscapeImagePhone style:style target:self action:@selector(bk_handleAction:)]; 42 | if (!self) return nil; 43 | 44 | objc_setAssociatedObject(self, BKBarButtonItemBlockKey, action, OBJC_ASSOCIATION_COPY_NONATOMIC); 45 | 46 | return self; 47 | } 48 | 49 | - (id)bk_initWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action 50 | { 51 | self = [self initWithTitle:title style:style target:self action:@selector(bk_handleAction:)]; 52 | if (!self) return nil; 53 | 54 | objc_setAssociatedObject(self, BKBarButtonItemBlockKey, action, OBJC_ASSOCIATION_COPY_NONATOMIC); 55 | 56 | return self; 57 | } 58 | 59 | - (void)bk_handleAction:(UIBarButtonItem *)sender 60 | { 61 | void (^block)(id) = objc_getAssociatedObject(self, BKBarButtonItemBlockKey); 62 | if (block) block(self); 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSObject+BKBlockExecution.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+BKBlockExecution.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSObject+BKBlockExecution.h" 7 | 8 | #define BKTimeDelay(t) dispatch_time(DISPATCH_TIME_NOW, (uint64_t)(NSEC_PER_SEC * t)) 9 | 10 | @implementation NSObject (BlocksKit) 11 | 12 | - (id)bk_performBlock:(void (^)(id obj))block afterDelay:(NSTimeInterval)delay 13 | { 14 | return [self bk_performBlock:block onQueue:dispatch_get_main_queue() afterDelay:delay]; 15 | } 16 | 17 | + (id)bk_performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay 18 | { 19 | return [NSObject bk_performBlock:block onQueue:dispatch_get_main_queue() afterDelay:delay]; 20 | } 21 | 22 | - (id)bk_performBlockInBackground:(void (^)(id obj))block afterDelay:(NSTimeInterval)delay 23 | { 24 | return [self bk_performBlock:block onQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0) afterDelay:delay]; 25 | } 26 | 27 | + (id)bk_performBlockInBackground:(void (^)(void))block afterDelay:(NSTimeInterval)delay 28 | { 29 | return [NSObject bk_performBlock:block onQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0) afterDelay:delay]; 30 | } 31 | 32 | - (id)bk_performBlock:(void (^)(id obj))block onQueue:(dispatch_queue_t)queue afterDelay:(NSTimeInterval)delay 33 | { 34 | NSParameterAssert(block != nil); 35 | 36 | __block BOOL cancelled = NO; 37 | 38 | void (^wrapper)(BOOL) = ^(BOOL cancel) { 39 | if (cancel) { 40 | cancelled = YES; 41 | return; 42 | } 43 | if (!cancelled) block(self); 44 | }; 45 | 46 | dispatch_after(BKTimeDelay(delay), queue, ^{ 47 | wrapper(NO); 48 | }); 49 | 50 | return [wrapper copy]; 51 | } 52 | 53 | + (id)bk_performBlock:(void (^)(void))block onQueue:(dispatch_queue_t)queue afterDelay:(NSTimeInterval)delay 54 | { 55 | NSParameterAssert(block != nil); 56 | 57 | __block BOOL cancelled = NO; 58 | 59 | void (^wrapper)(BOOL) = ^(BOOL cancel) { 60 | if (cancel) { 61 | cancelled = YES; 62 | return; 63 | } 64 | if (!cancelled) block(); 65 | }; 66 | 67 | dispatch_after(BKTimeDelay(delay), queue, ^{ wrapper(NO); }); 68 | 69 | return [wrapper copy]; 70 | } 71 | 72 | + (void)bk_cancelBlock:(id)block 73 | { 74 | NSParameterAssert(block != nil); 75 | void (^wrapper)(BOOL) = block; 76 | wrapper(YES); 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // VideoClip 4 | // 5 | // Created by Collion on 16/7/23. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "FMLChoiceVideoController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | 21 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 22 | 23 | FMLChoiceVideoController *vc = [FMLChoiceVideoController new]; 24 | self.window.rootViewController = vc; 25 | [self.window makeKeyAndVisible]; 26 | 27 | return YES; 28 | } 29 | 30 | - (void)applicationWillResignActive:(UIApplication *)application { 31 | // 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. 32 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 33 | } 34 | 35 | - (void)applicationDidEnterBackground:(UIApplication *)application { 36 | // 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. 37 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 38 | } 39 | 40 | - (void)applicationWillEnterForeground:(UIApplication *)application { 41 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 42 | } 43 | 44 | - (void)applicationDidBecomeActive:(UIApplication *)application { 45 | // 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. 46 | } 47 | 48 | - (void)applicationWillTerminate:(UIApplication *)application { 49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/README.md: -------------------------------------------------------------------------------- 1 | [BlocksKit](https://zwaldowski.github.io/BlocksKit) 2 | =================================================== 3 | 4 | Blocks in C and Objective-C are downright magical. They make coding easier and potentially quicker, not to mention faster on the front end with multithreading and Grand Central Dispatch. BlocksKit hopes to facilitate this kind of programming by removing some of the annoying - and, in some cases, impeding - limits on coding with blocks. 5 | 6 | BlocksKit is a framework for OS X Mountain Lion and newer and a static library for iOS 6 and newer. 7 | 8 | BlocksKit was created by [Zachary Waldowski](https://github.com/zwaldowski) and [Alexsander Akers](https://github.com/a2) and is maintained by Zachary Waldowski. 9 | 10 | Installation 11 | ============ 12 | 13 | BlocksKit can be added to a project using [CocoaPods](https://github.com/cocoapods/cocoapods). One may also use targets included in the project. 14 | 15 | ### Library 16 | 17 | * Download a release of BlocksKit. 18 | * Run "Archive" in XCode. 19 | * By default the static library will be compiled to `~/Library/Developer/Xcode/DerivedData`. 20 | * Move libBlocksKit.a and Headers to your project's folder, preferably a subfolder like "Vendor". 21 | * In "Build Phases", Drag libBlocksKit.a into your target's "Link Binary With Libraries" build phase. 22 | * In the build settings of your target or project, change "Other Linker Flags" to `-ObjC`. Make sure your app is linked with CoreGraphics, Foundation, MessageUI, and UIKit. 23 | * Change (or add) to "Header Search Paths" the relative path to BlocksKit's headers, like `$(SRCROOT)/Vendor/Headers`. 24 | * Insert `#import ` in your project's prefix header. 25 | 26 | ### Framework 27 | 28 | See the included `Configurations/MacBundleFramework.xcconfig` for more information. 29 | 30 | Documentation 31 | ============= 32 | 33 | An Xcode-compatible documentation set is available [from CocoaDocs](http://cocoadocs.org/docsets/BlocksKit/). 34 | 35 | License 36 | ======= 37 | 38 | BlocksKit is maintained under the MIT license. **The project itself is free for use in any and all projects.** You can use BlocksKit in any project, public or private, with or without attribution - though we prefer attribution! It helps us. 39 | 40 | Unsure about your rights? [Read more.](http://opensource.org/licenses/MIT) 41 | 42 | Individual credits for included code exist in the header files and documentation. We thank them for their contributions to the open source community. 43 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIView+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Convenience on-touch methods for UIView. 9 | 10 | Includes code by the following: 11 | 12 | - Kevin O'Neill. . 2011. BSD. 13 | - Jake Marsh. . 2011. 14 | - Zach Waldowski. . 2011. 15 | 16 | @warning UIView is only available on a platform with UIKit. 17 | */ 18 | @interface UIView (BlocksKit) 19 | 20 | /** Abstract creation of a block-backed UITapGestureRecognizer. 21 | 22 | This method allows for the recognition of any arbitrary number 23 | of fingers tapping any number of times on a view. An instance 24 | of UITapGesture recognizer is allocated for the block and added 25 | to the recieving view. 26 | 27 | @warning This method has an _additive_ effect. Do not call it multiple 28 | times to set-up or tear-down. The view will discard the gesture recognizer 29 | on release. 30 | 31 | @param numberOfTouches The number of fingers tapping that will trigger the block. 32 | @param numberOfTaps The number of taps required to trigger the block. 33 | @param block The handler for the UITapGestureRecognizer 34 | @see whenTapped: 35 | @see whenDoubleTapped: 36 | */ 37 | - (void)bk_whenTouches:(NSUInteger)numberOfTouches tapped:(NSUInteger)numberOfTaps handler:(void (^)(void))block; 38 | 39 | /** Adds a recognizer for one finger tapping once. 40 | 41 | @warning This method has an _additive_ effect. Do not call it multiple 42 | times to set-up or tear-down. The view will discard the gesture recognizer 43 | on release. 44 | 45 | @param block The handler for the tap recognizer 46 | @see whenDoubleTapped: 47 | @see whenTouches:tapped:handler: 48 | */ 49 | - (void)bk_whenTapped:(void (^)(void))block; 50 | 51 | /** Adds a recognizer for one finger tapping twice. 52 | 53 | @warning This method has an _additive_ effect. Do not call it multiple 54 | times to set-up or tear-down. The view will discard the gesture recognizer 55 | on release. 56 | 57 | @param block The handler for the tap recognizer 58 | @see whenTapped: 59 | @see whenTouches:tapped:handler: 60 | */ 61 | - (void)bk_whenDoubleTapped:(void (^)(void))block; 62 | 63 | /** A convenience wrapper that non-recursively loops through the subviews of a view. 64 | 65 | @param block A code block that interacts with a UIView sender. 66 | */ 67 | - (void)bk_eachSubview:(void (^)(UIView *subview))block; 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/MessageUI/MFMessageComposeViewController+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // MFMessageComposeViewController+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "A2DynamicDelegate.h" 7 | #import "MFMessageComposeViewController+BlocksKit.h" 8 | #import "NSObject+A2BlockDelegate.h" 9 | 10 | #pragma mark Custom delegate 11 | 12 | @interface A2DynamicMFMessageComposeViewControllerDelegate : A2DynamicDelegate 13 | 14 | @end 15 | 16 | @implementation A2DynamicMFMessageComposeViewControllerDelegate 17 | 18 | - (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result 19 | { 20 | id realDelegate = self.realDelegate; 21 | BOOL shouldDismiss = (realDelegate && [realDelegate respondsToSelector:@selector(messageComposeViewController:didFinishWithResult:)]); 22 | if (shouldDismiss) 23 | [realDelegate messageComposeViewController:controller didFinishWithResult:result]; 24 | 25 | void (^block)(MFMessageComposeViewController *, MessageComposeResult) = [self blockImplementationForMethod:_cmd]; 26 | if (shouldDismiss) { 27 | if (block) block(controller, result); 28 | } else { 29 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 30 | __weak typeof(controller) weakController = controller; 31 | [controller dismissViewControllerAnimated:YES completion:^{ 32 | typeof(&*weakController) strongController = weakController; 33 | if (block) block(strongController, result); 34 | }]; 35 | #else 36 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 37 | if ([controller respondsToSelector:@selector(dismissViewControllerAnimated:completion:)]) { 38 | __weak typeof(controller) weakController = controller; 39 | [controller dismissViewControllerAnimated:YES completion:^{ 40 | typeof(&*weakController) strongController = weakController; 41 | if (block) block(strongController, result); 42 | }]; 43 | } else { 44 | #endif 45 | [controller dismissModalViewControllerAnimated:YES]; 46 | if (block) block(controller, result); 47 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 48 | } 49 | #endif 50 | #endif 51 | } 52 | } 53 | 54 | @end 55 | 56 | #pragma mark - Category 57 | 58 | @implementation MFMessageComposeViewController (BlocksKit) 59 | 60 | @dynamic bk_completionBlock; 61 | 62 | + (void)load 63 | { 64 | @autoreleasepool { 65 | [self bk_registerDynamicDelegateNamed:@"messageComposeDelegate"]; 66 | [self bk_linkDelegateMethods:@{ @"bk_completionBlock": @"messageComposeViewController:didFinishWithResult:" }]; 67 | } 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/MessageUI/MFMailComposeViewController+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // MFMailComposeViewController+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "A2DynamicDelegate.h" 7 | #import "MFMailComposeViewController+BlocksKit.h" 8 | #import "NSObject+A2BlockDelegate.h" 9 | 10 | #pragma mark Custom delegate 11 | 12 | @interface A2DynamicMFMailComposeViewControllerDelegate : A2DynamicDelegate 13 | 14 | @end 15 | 16 | @implementation A2DynamicMFMailComposeViewControllerDelegate 17 | 18 | - (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error 19 | { 20 | id realDelegate = self.realDelegate; 21 | BOOL shouldDismiss = (realDelegate && [realDelegate respondsToSelector:@selector(mailComposeController:didFinishWithResult:error:)]); 22 | if (shouldDismiss) 23 | [realDelegate mailComposeController:controller didFinishWithResult:result error:error]; 24 | 25 | void (^block)(MFMailComposeViewController *, MFMailComposeResult, NSError *) = [self blockImplementationForMethod:_cmd]; 26 | if (shouldDismiss) { 27 | if (block) block(controller, result, error); 28 | } else { 29 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 30 | __weak typeof(controller) weakController = controller; 31 | [controller dismissViewControllerAnimated:YES completion:^{ 32 | typeof(&*weakController) strongController = weakController; 33 | if (block) block(strongController, result, error); 34 | }]; 35 | #else 36 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 37 | if ([controller respondsToSelector:@selector(dismissViewControllerAnimated:completion:)]) { 38 | __weak typeof(controller) weakController = controller; 39 | [controller dismissViewControllerAnimated:YES completion:^{ 40 | typeof(&*weakController) strongController = weakController; 41 | if (block) block(strongController, result, error); 42 | }]; 43 | } else { 44 | #endif 45 | [controller dismissModalViewControllerAnimated:YES]; 46 | if (block) block(controller, result, error); 47 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 48 | } 49 | #endif 50 | #endif 51 | } 52 | } 53 | 54 | @end 55 | 56 | #pragma mark Category 57 | 58 | @implementation MFMailComposeViewController (BlocksKit) 59 | 60 | @dynamic bk_completionBlock; 61 | 62 | + (void)load 63 | { 64 | @autoreleasepool { 65 | [self bk_registerDynamicDelegateNamed:@"mailComposeDelegate"]; 66 | [self bk_linkDelegateMethods:@{ @"bk_completionBlock": @"mailComposeController:didFinishWithResult:error:" }]; 67 | } 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/Pods-VideoClip/Pods-VideoClip-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## BlocksKit 5 | 6 | // 7 | // LICENSE 8 | // BlocksKit 9 | // 10 | 11 | Copyright (c) 2011-2014 Zachary Waldowski, Alexsander Akers, and the BlocksKit Contributors 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | 20 | ## Masonry 21 | 22 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 23 | 24 | Permission is hereby granted, free of charge, to any person obtaining a copy 25 | of this software and associated documentation files (the "Software"), to deal 26 | in the Software without restriction, including without limitation the rights 27 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 28 | copies of the Software, and to permit persons to whom the Software is 29 | furnished to do so, subject to the following conditions: 30 | 31 | The above copyright notice and this permission notice shall be included in 32 | all copies or substantial portions of the Software. 33 | 34 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 35 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 36 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 37 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 38 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 39 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 40 | THE SOFTWARE. 41 | Generated by CocoaPods - https://cocoapods.org 42 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSSet+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSSet+BlocksKit.h" 7 | 8 | @implementation NSSet (BlocksKit) 9 | 10 | - (void)bk_each:(void (^)(id obj))block 11 | { 12 | NSParameterAssert(block != nil); 13 | 14 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { 15 | block(obj); 16 | }]; 17 | } 18 | 19 | - (void)bk_apply:(void (^)(id obj))block 20 | { 21 | NSParameterAssert(block != nil); 22 | 23 | [self enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id obj, BOOL *stop) { 24 | block(obj); 25 | }]; 26 | } 27 | 28 | - (id)bk_match:(BOOL (^)(id obj))block 29 | { 30 | NSParameterAssert(block != nil); 31 | 32 | return [[self objectsPassingTest:^BOOL(id obj, BOOL *stop) { 33 | if (block(obj)) { 34 | *stop = YES; 35 | return YES; 36 | } 37 | 38 | return NO; 39 | }] anyObject]; 40 | } 41 | 42 | - (NSSet *)bk_select:(BOOL (^)(id obj))block 43 | { 44 | NSParameterAssert(block != nil); 45 | 46 | return [self objectsPassingTest:^BOOL(id obj, BOOL *stop) { 47 | return block(obj); 48 | }]; 49 | } 50 | 51 | - (NSSet *)bk_reject:(BOOL (^)(id obj))block 52 | { 53 | NSParameterAssert(block != nil); 54 | 55 | return [self objectsPassingTest:^BOOL(id obj, BOOL *stop) { 56 | return !block(obj); 57 | }]; 58 | } 59 | 60 | - (NSSet *)bk_map:(id (^)(id obj))block 61 | { 62 | NSParameterAssert(block != nil); 63 | 64 | NSMutableSet *result = [NSMutableSet setWithCapacity:self.count]; 65 | 66 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { 67 | id value = block(obj) ?:[NSNull null]; 68 | [result addObject:value]; 69 | }]; 70 | 71 | return result; 72 | } 73 | 74 | - (id)bk_reduce:(id)initial withBlock:(id (^)(id sum, id obj))block 75 | { 76 | NSParameterAssert(block != nil); 77 | 78 | __block id result = initial; 79 | 80 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { 81 | result = block(result, obj); 82 | }]; 83 | 84 | return result; 85 | } 86 | 87 | - (BOOL)bk_any:(BOOL (^)(id obj))block 88 | { 89 | return [self bk_match:block] != nil; 90 | } 91 | 92 | - (BOOL)bk_none:(BOOL (^)(id obj))block 93 | { 94 | return [self bk_match:block] == nil; 95 | } 96 | 97 | - (BOOL)bk_all:(BOOL (^)(id obj))block 98 | { 99 | NSParameterAssert(block != nil); 100 | 101 | __block BOOL result = YES; 102 | 103 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { 104 | if (!block(obj)) { 105 | result = NO; 106 | *stop = YES; 107 | } 108 | }]; 109 | 110 | return result; 111 | } 112 | 113 | @end 114 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSDictionary+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSDictionary+BlocksKit.h" 7 | 8 | @implementation NSDictionary (BlocksKit) 9 | 10 | - (void)bk_each:(void (^)(id key, id obj))block 11 | { 12 | NSParameterAssert(block != nil); 13 | 14 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 15 | block(key, obj); 16 | }]; 17 | } 18 | 19 | - (void)bk_apply:(void (^)(id key, id obj))block 20 | { 21 | NSParameterAssert(block != nil); 22 | 23 | [self enumerateKeysAndObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id key, id obj, BOOL *stop) { 24 | block(key, obj); 25 | }]; 26 | } 27 | 28 | - (id)bk_match:(BOOL (^)(id key, id obj))block 29 | { 30 | NSParameterAssert(block != nil); 31 | 32 | return self[[[self keysOfEntriesPassingTest:^(id key, id obj, BOOL *stop) { 33 | if (block(key, obj)) { 34 | *stop = YES; 35 | return YES; 36 | } 37 | 38 | return NO; 39 | }] anyObject]]; 40 | } 41 | 42 | - (NSDictionary *)bk_select:(BOOL (^)(id key, id obj))block 43 | { 44 | NSParameterAssert(block != nil); 45 | 46 | NSArray *keys = [[self keysOfEntriesPassingTest:^(id key, id obj, BOOL *stop) { 47 | return block(key, obj); 48 | }] allObjects]; 49 | 50 | NSArray *objects = [self objectsForKeys:keys notFoundMarker:[NSNull null]]; 51 | return [NSDictionary dictionaryWithObjects:objects forKeys:keys]; 52 | } 53 | 54 | - (NSDictionary *)bk_reject:(BOOL (^)(id key, id obj))block 55 | { 56 | NSParameterAssert(block != nil); 57 | return [self bk_select:^BOOL(id key, id obj) { 58 | return !block(key, obj); 59 | }]; 60 | } 61 | 62 | - (NSDictionary *)bk_map:(id (^)(id key, id obj))block 63 | { 64 | NSParameterAssert(block != nil); 65 | 66 | NSMutableDictionary *result = [NSMutableDictionary dictionaryWithCapacity:self.count]; 67 | 68 | [self bk_each:^(id key, id obj) { 69 | id value = block(key, obj) ?: [NSNull null]; 70 | result[key] = value; 71 | }]; 72 | 73 | return result; 74 | } 75 | 76 | - (BOOL)bk_any:(BOOL (^)(id key, id obj))block 77 | { 78 | return [self bk_match:block] != nil; 79 | } 80 | 81 | - (BOOL)bk_none:(BOOL (^)(id key, id obj))block 82 | { 83 | return [self bk_match:block] == nil; 84 | } 85 | 86 | - (BOOL)bk_all:(BOOL (^)(id key, id obj))block 87 | { 88 | NSParameterAssert(block != nil); 89 | 90 | __block BOOL result = YES; 91 | 92 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 93 | if (!block(key, obj)) { 94 | result = NO; 95 | *stop = YES; 96 | } 97 | }]; 98 | 99 | return result; 100 | } 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/AVAsset+FMLVideo.m: -------------------------------------------------------------------------------- 1 | // 2 | // AVAsset+FMLVideo.m 3 | // VideoClip 4 | // 5 | // Created by samo on 16/7/27. 6 | // Copyright © 2016年 Collion. All rights reserved. 7 | // 8 | 9 | #import "AVAsset+FMLVideo.h" 10 | #import 11 | #import 12 | 13 | @implementation AVAsset (FMLVideo) 14 | 15 | - (void)fml_getImagesCount:(NSUInteger)imageCount imageBackBlock:(void (^)(UIImage *))imageBackBlock 16 | { 17 | Float64 durationSeconds = [self fml_getSeconds]; 18 | 19 | // 获取视频的帧数 20 | float fps = [self fml_getFPS]; 21 | 22 | NSMutableArray *times = [NSMutableArray array]; 23 | Float64 totalFrames = durationSeconds * fps; //获得视频总帧数 24 | 25 | Float64 perFrames = totalFrames / imageCount; // 一共切imageCount张图 26 | Float64 frame = 0; 27 | 28 | CMTime timeFrame; 29 | while (frame < totalFrames) { 30 | timeFrame = CMTimeMake(frame, fps); //第i帧 帧率 31 | NSValue *timeValue = [NSValue valueWithCMTime:timeFrame]; 32 | [times addObject:timeValue]; 33 | 34 | frame += perFrames; 35 | } 36 | 37 | AVAssetImageGenerator *imgGenerator = [[AVAssetImageGenerator alloc] initWithAsset:self]; 38 | // 防止时间出现偏差 39 | imgGenerator.requestedTimeToleranceBefore = kCMTimeZero; 40 | imgGenerator.requestedTimeToleranceAfter = kCMTimeZero; 41 | imgGenerator.appliesPreferredTrackTransform = YES; // 截图的时候调整到正确的方向 42 | 43 | [imgGenerator generateCGImagesAsynchronouslyForTimes:times completionHandler:^(CMTime requestedTime, CGImageRef _Nullable image, CMTime actualTime, AVAssetImageGeneratorResult result, NSError * _Nullable error) { 44 | switch (result) { 45 | case AVAssetImageGeneratorCancelled: 46 | break; 47 | case AVAssetImageGeneratorFailed: 48 | break; 49 | case AVAssetImageGeneratorSucceeded: { 50 | UIImage *displayImage = [UIImage imageWithCGImage:image]; 51 | 52 | !imageBackBlock ? : imageBackBlock(displayImage); 53 | } 54 | break; 55 | } 56 | }]; 57 | } 58 | 59 | - (Float64)fml_getSeconds 60 | { 61 | CMTime cmtime = self.duration; //视频时间信息结构体 62 | return CMTimeGetSeconds(cmtime); //视频总秒数 63 | } 64 | 65 | - (float)fml_getFPS 66 | { 67 | float fps = [[self tracksWithMediaType:AVMediaTypeVideo].lastObject nominalFrameRate]; 68 | 69 | return fps; 70 | } 71 | 72 | @end 73 | 74 | 75 | 76 | /** 77 | CMTimeMake(time, timeScale) 78 | 79 | time指的就是時間(不是秒), 80 | 而時間要換算成秒就要看第二個參數timeScale了. 81 | timeScale指的是1秒需要由幾個frame構成(可以視為fps), 82 | 因此真正要表達的時間就會是 time / timeScale 才會是秒 83 | 84 | */ 85 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2DynamicDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+A2DynamicDelegate.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | #import 8 | 9 | /** The A2DynamicDelegate category to NSObject provides the primary interface 10 | by which dynamic delegates are generated for a given object. */ 11 | @interface NSObject (A2DynamicDelegate) 12 | 13 | /** Creates or gets a dynamic data source for the reciever. 14 | 15 | A2DynamicDelegate assumes a protocol name `FooBarDataSource` 16 | for instances of class `FooBar`. The object is given a strong 17 | attachment to the reciever, and is automatically deallocated 18 | when the reciever is released. 19 | 20 | If the user implements a `A2DynamicFooBarDataSource` subclass 21 | of A2DynamicDelegate, its implementation of any method 22 | will be used over the block. If the block needs to be used, 23 | it can be called from within the custom 24 | implementation using blockImplementationForMethod:. 25 | 26 | @see blockImplementationForMethod: 27 | @return A dynamic data source. 28 | */ 29 | - (id)bk_dynamicDataSource; 30 | 31 | /** Creates or gets a dynamic delegate for the reciever. 32 | 33 | A2DynamicDelegate assumes a protocol name `FooBarDelegate` 34 | for instances of class `FooBar`. The object is given a strong 35 | attachment to the reciever, and is automatically deallocated 36 | when the reciever is released. 37 | 38 | If the user implements a `A2DynamicFooBarDelegate` subclass 39 | of A2DynamicDelegate, its implementation of any method 40 | will be used over the block. If the block needs to be used, 41 | it can be called from within the custom 42 | implementation using blockImplementationForMethod:. 43 | 44 | @see blockImplementationForMethod: 45 | @return A dynamic delegate. 46 | */ 47 | - (id)bk_dynamicDelegate; 48 | 49 | /** Creates or gets a dynamic protocol implementation for 50 | the reciever. The designated initializer. 51 | 52 | The object is given a strong attachment to the reciever, 53 | and is automatically deallocated when the reciever is released. 54 | 55 | If the user implements a subclass of A2DynamicDelegate prepended 56 | with `A2Dynamic`, such as `A2DynamicFooProvider`, its 57 | implementation of any method will be used over the block. 58 | If the block needs to be used, it can be called from within the 59 | custom implementation using blockImplementationForMethod:. 60 | 61 | @param protocol A custom protocol. 62 | @return A dynamic protocol implementation. 63 | @see blockImplementationForMethod: 64 | */ 65 | - (id)bk_dynamicDelegateForProtocol:(Protocol *)protocol; 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLScaledImageViewCell.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 | -------------------------------------------------------------------------------- /VideoClip/VideoClip/FMLVideoChoiceCell.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 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSIndexSet+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSIndexSet+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSIndexSet+BlocksKit.h" 7 | 8 | @implementation NSIndexSet (BlocksKit) 9 | 10 | - (void)bk_each:(void (^)(NSUInteger index))block { 11 | NSParameterAssert(block != nil); 12 | 13 | [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { 14 | block(idx); 15 | }]; 16 | } 17 | 18 | - (void)bk_apply:(void (^)(NSUInteger index))block { 19 | NSParameterAssert(block != nil); 20 | 21 | [self enumerateIndexesWithOptions:NSEnumerationConcurrent usingBlock:^(NSUInteger idx, BOOL *stop) { 22 | block(idx); 23 | }]; 24 | } 25 | 26 | - (NSUInteger)bk_match:(BOOL (^)(NSUInteger index))block { 27 | NSParameterAssert(block != nil); 28 | 29 | return [self indexPassingTest:^BOOL(NSUInteger idx, BOOL *stop) { 30 | return block(idx); 31 | }]; 32 | } 33 | 34 | - (NSIndexSet *)bk_select:(BOOL (^)(NSUInteger index))block { 35 | NSParameterAssert(block != nil); 36 | 37 | NSIndexSet *list = [self indexesPassingTest:^BOOL(NSUInteger idx, BOOL *stop) { 38 | return block(idx); 39 | }]; 40 | 41 | if (!list.count) return nil; 42 | return list; 43 | } 44 | 45 | - (NSIndexSet *)bk_reject:(BOOL (^)(NSUInteger index))block { 46 | NSParameterAssert(block != nil); 47 | return [self bk_select:^BOOL(NSUInteger idx) { 48 | return !block(idx); 49 | }]; 50 | } 51 | 52 | - (NSIndexSet *)bk_map:(NSUInteger (^)(NSUInteger index))block { 53 | NSParameterAssert(block != nil); 54 | 55 | NSMutableIndexSet *list = [NSMutableIndexSet indexSet]; 56 | 57 | [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { 58 | [list addIndex:block(idx)]; 59 | }]; 60 | 61 | if (!list.count) return nil; 62 | return list; 63 | } 64 | 65 | - (NSArray *)bk_mapIndex:(id (^)(NSUInteger index))block { 66 | NSParameterAssert(block != nil); 67 | 68 | NSMutableArray *result = [NSMutableArray arrayWithCapacity:self.count]; 69 | 70 | [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { 71 | id value = block(idx) ?: [NSNull null]; 72 | [result addObject:value]; 73 | }]; 74 | 75 | return result; 76 | } 77 | 78 | - (BOOL)bk_any:(BOOL (^)(NSUInteger index))block { 79 | return [self bk_match:block] != NSNotFound; 80 | } 81 | 82 | - (BOOL)bk_none:(BOOL (^)(NSUInteger index))block { 83 | return [self bk_match:block] == NSNotFound; 84 | } 85 | 86 | - (BOOL)bk_all:(BOOL (^)(NSUInteger index))block { 87 | NSParameterAssert(block != nil); 88 | 89 | __block BOOL result = YES; 90 | 91 | [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { 92 | if (!block(idx)) { 93 | result = NO; 94 | *stop = YES; 95 | } 96 | }]; 97 | 98 | return result; 99 | } 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIWebView+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebView+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "A2DynamicDelegate.h" 7 | #import "NSObject+A2BlockDelegate.h" 8 | #import "UIWebView+BlocksKit.h" 9 | 10 | #pragma mark Custom delegate 11 | 12 | @interface A2DynamicUIWebViewDelegate : A2DynamicDelegate 13 | @end 14 | 15 | @implementation A2DynamicUIWebViewDelegate 16 | 17 | - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { 18 | BOOL ret = YES; 19 | 20 | id realDelegate = self.realDelegate; 21 | if (realDelegate && [realDelegate respondsToSelector:@selector(webView:shouldStartLoadWithRequest:navigationType:)]) 22 | ret = [realDelegate webView:webView shouldStartLoadWithRequest:request navigationType:navigationType]; 23 | 24 | BOOL (^block)(UIWebView *, NSURLRequest *, UIWebViewNavigationType) = [self blockImplementationForMethod:_cmd]; 25 | if (block) 26 | ret &= block(webView, request, navigationType); 27 | 28 | return ret; 29 | } 30 | 31 | - (void)webViewDidStartLoad:(UIWebView *)webView { 32 | id realDelegate = self.realDelegate; 33 | if (realDelegate && [realDelegate respondsToSelector:@selector(webViewDidStartLoad:)]) 34 | [realDelegate webViewDidStartLoad:webView]; 35 | 36 | void (^block)(UIWebView *) = [self blockImplementationForMethod:_cmd]; 37 | if (block) block(webView); 38 | } 39 | 40 | - (void)webViewDidFinishLoad:(UIWebView *)webView { 41 | id realDelegate = self.realDelegate; 42 | if (realDelegate && [realDelegate respondsToSelector:@selector(webViewDidFinishLoad:)]) 43 | [realDelegate webViewDidFinishLoad:webView]; 44 | 45 | void (^block)(UIWebView *) = [self blockImplementationForMethod:_cmd]; 46 | if (block) block(webView); 47 | } 48 | 49 | - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { 50 | id realDelegate = self.realDelegate; 51 | if (realDelegate && [realDelegate respondsToSelector:@selector(webView:didFailLoadWithError:)]) 52 | [realDelegate webView:webView didFailLoadWithError:error]; 53 | 54 | void (^block)(UIWebView *, NSError *) = [self blockImplementationForMethod:_cmd]; 55 | if (block) block(webView, error); 56 | } 57 | 58 | @end 59 | 60 | #pragma mark Category 61 | 62 | @implementation UIWebView (BlocksKit) 63 | 64 | @dynamic bk_shouldStartLoadBlock, bk_didStartLoadBlock, bk_didFinishLoadBlock, bk_didFinishWithErrorBlock; 65 | 66 | + (void)load 67 | { 68 | @autoreleasepool { 69 | [self bk_registerDynamicDelegate]; 70 | [self bk_linkDelegateMethods:@{ 71 | @"bk_shouldStartLoadBlock": @"webView:shouldStartLoadWithRequest:navigationType:", 72 | @"bk_didStartLoadBlock": @"webViewDidStartLoad:", 73 | @"bk_didFinishLoadBlock": @"webViewDidFinishLoad:", 74 | @"bk_didFinishWithErrorBlock": @"webView:didFailLoadWithError:" 75 | }]; 76 | } 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /VideoClip/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 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIBarButtonItem+BlocksKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItem+BlocksKit.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /** Block event initialization for UIBarButtonItem. 9 | 10 | This set of extensions has near-drop-in replacements 11 | for the standard set of UIBarButton item initializations, 12 | using a block handler instead of a target/selector. 13 | 14 | Includes code by the following: 15 | 16 | - [Kevin O'Neill](https://github.com/kevinoneill) 17 | - [Zach Waldowski](https://github.com/zwaldowski) 18 | 19 | @warning UIBarButtonItem is only available on a platform with UIKit. 20 | */ 21 | @interface UIBarButtonItem (BlocksKit) 22 | 23 | /** Creates and returns a configured item containing the specified system item. 24 | 25 | @return Newly initialized item with the specified properties. 26 | @param systemItem The system item to use as the item representation. One of the constants defined in UIBarButtonSystemItem. 27 | @param action The block that gets fired on the button press. 28 | */ 29 | - (id)bk_initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem handler:(void (^)(id sender))action NS_REPLACES_RECEIVER; 30 | 31 | /** Creates and returns a configured item using the specified image and style. 32 | 33 | @return Newly initialized item with the specified properties. 34 | @param image The item’s image. If nil an image is not displayed. 35 | If this image is too large to fit on the bar, it is scaled to fit 36 | The size of a toolbar and navigation bar image is 20 x 20 points. 37 | @param style The style of the item. One of the constants defined in UIBarButtonItemStyle. 38 | @param action The block that gets fired on the button press. 39 | */ 40 | - (id)bk_initWithImage:(UIImage *)image style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action NS_REPLACES_RECEIVER; 41 | 42 | /** Creates and returns a configured item using the specified image and style. 43 | 44 | @return Newly initialized item with the specified properties. 45 | @param image The item’s image. If nil an image is not displayed. 46 | @param landscapeImagePhone The image to be used for the item in landscape bars in the UIUserInterfaceIdiomPhone idiom. 47 | @param style The style of the item. One of the constants defined in UIBarButtonItemStyle. 48 | @param action The block that gets fired on the button press. 49 | */ 50 | - (id)bk_initWithImage:(UIImage *)image landscapeImagePhone:(UIImage *)landscapeImagePhone style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action NS_REPLACES_RECEIVER NS_AVAILABLE_IOS(5_0); 51 | 52 | /** Creates and returns a configured item using the specified text and style. 53 | 54 | @return Newly initialized item with the specified properties. 55 | @param title The text displayed on the button item. 56 | @param style The style of the item. One of the constants defined in UIBarButtonItemStyle. 57 | @param action The block that gets fired on the button press. 58 | */ 59 | - (id)bk_initWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action NS_REPLACES_RECEIVER; 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2DynamicDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+A2DynamicDelegate.m 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | #import "NSObject+A2DynamicDelegate.h" 8 | 9 | extern Protocol *a2_dataSourceProtocol(Class cls); 10 | extern Protocol *a2_delegateProtocol(Class cls); 11 | 12 | static Class a2_dynamicDelegateClass(Class cls, NSString *suffix) 13 | { 14 | while (cls) { 15 | NSString *className = [NSString stringWithFormat:@"A2Dynamic%@%@", NSStringFromClass(cls), suffix]; 16 | Class ddClass = NSClassFromString(className); 17 | if (ddClass) return ddClass; 18 | 19 | cls = class_getSuperclass(cls); 20 | } 21 | 22 | return [A2DynamicDelegate class]; 23 | } 24 | 25 | static dispatch_queue_t a2_backgroundQueue(void) 26 | { 27 | static dispatch_once_t onceToken; 28 | static dispatch_queue_t backgroundQueue = nil; 29 | dispatch_once(&onceToken, ^{ 30 | backgroundQueue = dispatch_queue_create("BlocksKit.DynamicDelegate.Queue", DISPATCH_QUEUE_SERIAL); 31 | }); 32 | return backgroundQueue; 33 | } 34 | 35 | @implementation NSObject (A2DynamicDelegate) 36 | 37 | - (id)bk_dynamicDataSource 38 | { 39 | Protocol *protocol = a2_dataSourceProtocol([self class]); 40 | Class class = a2_dynamicDelegateClass([self class], @"DataSource"); 41 | return [self bk_dynamicDelegateWithClass:class forProtocol:protocol]; 42 | } 43 | - (id)bk_dynamicDelegate 44 | { 45 | Protocol *protocol = a2_delegateProtocol([self class]); 46 | Class class = a2_dynamicDelegateClass([self class], @"Delegate"); 47 | return [self bk_dynamicDelegateWithClass:class forProtocol:protocol]; 48 | } 49 | - (id)bk_dynamicDelegateForProtocol:(Protocol *)protocol 50 | { 51 | Class class = [A2DynamicDelegate class]; 52 | NSString *protocolName = NSStringFromProtocol(protocol); 53 | if ([protocolName hasSuffix:@"Delegate"]) { 54 | class = a2_dynamicDelegateClass([self class], @"Delegate"); 55 | } else if ([protocolName hasSuffix:@"DataSource"]) { 56 | class = a2_dynamicDelegateClass([self class], @"DataSource"); 57 | } 58 | 59 | return [self bk_dynamicDelegateWithClass:class forProtocol:protocol]; 60 | } 61 | - (id)bk_dynamicDelegateWithClass:(Class)cls forProtocol:(Protocol *)protocol 62 | { 63 | /** 64 | * Storing the dynamic delegate as an associated object of the delegating 65 | * object not only allows us to later retrieve the delegate, but it also 66 | * creates a strong relationship to the delegate. Since delegates are weak 67 | * references on the part of the delegating object, a dynamic delegate 68 | * would be deallocated immediately after its declaring scope ends. 69 | * Therefore, this strong relationship is required to ensure that the 70 | * delegate's lifetime is at least as long as that of the delegating object. 71 | **/ 72 | 73 | __block A2DynamicDelegate *dynamicDelegate; 74 | 75 | dispatch_sync(a2_backgroundQueue(), ^{ 76 | dynamicDelegate = objc_getAssociatedObject(self, (__bridge const void *)protocol); 77 | 78 | if (!dynamicDelegate) 79 | { 80 | dynamicDelegate = [[cls alloc] initWithProtocol:protocol]; 81 | objc_setAssociatedObject(self, (__bridge const void *)protocol, dynamicDelegate, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 82 | } 83 | }); 84 | 85 | return dynamicDelegate; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/BKMacros.h: -------------------------------------------------------------------------------- 1 | // 2 | // BKMacros.h 3 | // BlocksKit 4 | // 5 | // Includes code by Michael Ash. . 6 | // 7 | 8 | #import "NSArray+BlocksKit.h" 9 | #import "NSSet+BlocksKit.h" 10 | #import "NSDictionary+BlocksKit.h" 11 | #import "NSIndexSet+BlocksKit.h" 12 | 13 | #ifndef __BLOCKSKIT_MACROS__ 14 | #define __BLOCKSKIT_MACROS__ 15 | 16 | #define __BK_EACH_WRAPPER(...) (^{ __block CFMutableDictionaryRef BK_eachTable = nil; \ 17 | (void)BK_eachTable; \ 18 | __typeof__(__VA_ARGS__) BK_retval = __VA_ARGS__; \ 19 | if(BK_eachTable) \ 20 | CFRelease(BK_eachTable); \ 21 | return BK_retval; \ 22 | }()) 23 | 24 | #define __BK_EACH_WRAPPER_VOID(...) (^{ __block CFMutableDictionaryRef BK_eachTable = nil; \ 25 | (void)BK_eachTable; \ 26 | __VA_ARGS__; \ 27 | if(BK_eachTable) \ 28 | CFRelease(BK_eachTable); \ 29 | }()) 30 | 31 | #define BK_EACH(collection, ...) __BK_EACH_WRAPPER_VOID([collection bk_each:^(id obj) { __VA_ARGS__ }]) 32 | #define BK_MAP(collection, ...) __BK_EACH_WRAPPER([collection bk_map:^id(id obj) { return (__VA_ARGS__); }]) 33 | #define BK_SELECT(collection, ...) __BK_EACH_WRAPPER([collection bk_select: ^BOOL (id obj) { return (__VA_ARGS__) != 0; }]) 34 | #define BK_REJECT(collection, ...) __BK_EACH_WRAPPER([collection bk_select: ^BOOL (id obj) { return (__VA_ARGS__) == 0; }]) 35 | #define BK_MATCH(collection, ...) __BK_EACH_WRAPPER([collection bk_match: ^BOOL (id obj) { return (__VA_ARGS__) != 0; }]) 36 | #define BK_REDUCE(collection, initial, ...) __BK_EACH_WRAPPER([collection bk_reduce: (initial) withBlock: ^id (id a, id b) { return (__VA_ARGS__); }]) 37 | 38 | // BK_APPLY is not wrapped, because we don't guarantee that the order matches the current collection during parallel execution. 39 | #define BK_APPLY(collection, ...) [collection bk_apply:^(id obj) { __VA_ARGS__ }] 40 | 41 | static inline id BKNextHelper(NSArray *array, CFMutableDictionaryRef *eachTablePtr) { 42 | 43 | if (!*eachTablePtr) { 44 | CFDictionaryKeyCallBacks keycb = { 45 | 0, 46 | kCFTypeDictionaryKeyCallBacks.retain, 47 | kCFTypeDictionaryKeyCallBacks.release, 48 | kCFTypeDictionaryKeyCallBacks.copyDescription, 49 | NULL, 50 | NULL 51 | }; 52 | *eachTablePtr = CFDictionaryCreateMutable(NULL, 0, &keycb, &kCFTypeDictionaryValueCallBacks); 53 | } 54 | 55 | NSEnumerator *enumerator = (__bridge id)CFDictionaryGetValue(*eachTablePtr, (__bridge CFArrayRef)array); 56 | if (!enumerator) { 57 | enumerator = [array objectEnumerator]; 58 | CFDictionarySetValue(*eachTablePtr, (__bridge CFArrayRef)array, (__bridge void *)enumerator); 59 | } 60 | return [enumerator nextObject]; 61 | } 62 | 63 | #define BK_NEXT(array) BKNextHelper(array, &BK_eachTable) 64 | 65 | #ifndef EACH 66 | #define EACH BK_EACH 67 | #endif 68 | 69 | #ifndef APPLY 70 | #define APPLY BK_APPLY 71 | #endif 72 | 73 | #ifndef MAP 74 | #define MAP BK_MAP 75 | #endif 76 | 77 | #ifndef SELECT 78 | #define SELECT BK_SELECT 79 | #endif 80 | 81 | #ifndef REJECT 82 | #define REJECT BK_REJECT 83 | #endif 84 | 85 | #ifndef MATCH 86 | #define MATCH BK_MATCH 87 | #endif 88 | 89 | #ifndef REDUCE 90 | #define REDUCE BK_REDUCE 91 | #endif 92 | 93 | #ifndef NEXT 94 | #define NEXT BK_NEXT 95 | #endif 96 | 97 | #endif -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIControl+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | #import "UIControl+BlocksKit.h" 8 | 9 | static const void *BKControlHandlersKey = &BKControlHandlersKey; 10 | 11 | #pragma mark Private 12 | 13 | @interface BKControlWrapper : NSObject 14 | 15 | - (id)initWithHandler:(void (^)(id sender))handler forControlEvents:(UIControlEvents)controlEvents; 16 | 17 | @property (nonatomic) UIControlEvents controlEvents; 18 | @property (nonatomic, copy) void (^handler)(id sender); 19 | 20 | @end 21 | 22 | @implementation BKControlWrapper 23 | 24 | - (id)initWithHandler:(void (^)(id sender))handler forControlEvents:(UIControlEvents)controlEvents 25 | { 26 | self = [super init]; 27 | if (!self) return nil; 28 | 29 | self.handler = handler; 30 | self.controlEvents = controlEvents; 31 | 32 | return self; 33 | } 34 | 35 | - (id)copyWithZone:(NSZone *)zone 36 | { 37 | return [[BKControlWrapper alloc] initWithHandler:self.handler forControlEvents:self.controlEvents]; 38 | } 39 | 40 | - (void)invoke:(id)sender 41 | { 42 | self.handler(sender); 43 | } 44 | 45 | @end 46 | 47 | #pragma mark Category 48 | 49 | @implementation UIControl (BlocksKit) 50 | 51 | - (void)bk_addEventHandler:(void (^)(id sender))handler forControlEvents:(UIControlEvents)controlEvents 52 | { 53 | NSParameterAssert(handler); 54 | 55 | NSMutableDictionary *events = objc_getAssociatedObject(self, BKControlHandlersKey); 56 | if (!events) { 57 | events = [NSMutableDictionary dictionary]; 58 | objc_setAssociatedObject(self, BKControlHandlersKey, events, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 59 | } 60 | 61 | NSNumber *key = @(controlEvents); 62 | NSMutableSet *handlers = events[key]; 63 | if (!handlers) { 64 | handlers = [NSMutableSet set]; 65 | events[key] = handlers; 66 | } 67 | 68 | BKControlWrapper *target = [[BKControlWrapper alloc] initWithHandler:handler forControlEvents:controlEvents]; 69 | [handlers addObject:target]; 70 | [self addTarget:target action:@selector(invoke:) forControlEvents:controlEvents]; 71 | } 72 | 73 | - (void)bk_removeEventHandlersForControlEvents:(UIControlEvents)controlEvents 74 | { 75 | NSMutableDictionary *events = objc_getAssociatedObject(self, BKControlHandlersKey); 76 | if (!events) { 77 | events = [NSMutableDictionary dictionary]; 78 | objc_setAssociatedObject(self, BKControlHandlersKey, events, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 79 | } 80 | 81 | NSNumber *key = @(controlEvents); 82 | NSSet *handlers = events[key]; 83 | 84 | if (!handlers) 85 | return; 86 | 87 | [handlers enumerateObjectsUsingBlock:^(id sender, BOOL *stop) { 88 | [self removeTarget:sender action:NULL forControlEvents:controlEvents]; 89 | }]; 90 | 91 | [events removeObjectForKey:key]; 92 | } 93 | 94 | - (BOOL)bk_hasEventHandlersForControlEvents:(UIControlEvents)controlEvents 95 | { 96 | NSMutableDictionary *events = objc_getAssociatedObject(self, BKControlHandlersKey); 97 | if (!events) { 98 | events = [NSMutableDictionary dictionary]; 99 | objc_setAssociatedObject(self, BKControlHandlersKey, events, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 100 | } 101 | 102 | NSNumber *key = @(controlEvents); 103 | NSSet *handlers = events[key]; 104 | 105 | if (!handlers) 106 | return NO; 107 | 108 | return !!handlers.count; 109 | } 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSOrderedSet+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSOrderedSet+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSOrderedSet+BlocksKit.h" 7 | 8 | @implementation NSOrderedSet (BlocksKit) 9 | 10 | - (void)bk_each:(void (^)(id obj))block 11 | { 12 | NSParameterAssert(block != nil); 13 | 14 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 15 | block(obj); 16 | }]; 17 | } 18 | 19 | - (void)bk_apply:(void (^)(id obj))block 20 | { 21 | NSParameterAssert(block != nil); 22 | 23 | [self enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 24 | block(obj); 25 | }]; 26 | } 27 | 28 | - (id)bk_match:(BOOL (^)(id obj))block 29 | { 30 | NSParameterAssert(block != nil); 31 | 32 | NSUInteger index = [self indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { 33 | return block(obj); 34 | }]; 35 | 36 | if (index == NSNotFound) return nil; 37 | return self[index]; 38 | } 39 | 40 | - (NSOrderedSet *)bk_select:(BOOL (^)(id obj))block 41 | { 42 | NSParameterAssert(block != nil); 43 | 44 | NSArray *objects = [self objectsAtIndexes:[self indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { 45 | return block(obj); 46 | }]]; 47 | 48 | if (!objects.count) return [[self class] orderedSet]; 49 | return [[self class] orderedSetWithArray:objects]; 50 | } 51 | 52 | - (NSOrderedSet *)bk_reject:(BOOL (^)(id obj))block 53 | { 54 | NSParameterAssert(block != nil); 55 | return [self bk_select:^BOOL(id obj) { 56 | return !block(obj); 57 | }]; 58 | } 59 | 60 | - (NSOrderedSet *)bk_map:(id (^)(id obj))block 61 | { 62 | NSParameterAssert(block != nil); 63 | 64 | NSMutableOrderedSet *result = [NSMutableOrderedSet orderedSetWithCapacity:self.count]; 65 | 66 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 67 | id value = block(obj) ?: [NSNull null]; 68 | [result addObject:value]; 69 | }]; 70 | 71 | return result; 72 | } 73 | 74 | - (id)bk_reduce:(id)initial withBlock:(id (^)(id sum, id obj))block 75 | { 76 | NSParameterAssert(block != nil); 77 | 78 | __block id result = initial; 79 | 80 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 81 | result = block(result, obj); 82 | }]; 83 | 84 | return result; 85 | } 86 | 87 | - (BOOL)bk_any:(BOOL (^)(id obj))block 88 | { 89 | return [self bk_match:block] != nil; 90 | } 91 | 92 | - (BOOL)bk_none:(BOOL (^)(id obj))block 93 | { 94 | return [self bk_match:block] == nil; 95 | } 96 | 97 | - (BOOL)bk_all:(BOOL (^)(id obj))block 98 | { 99 | NSParameterAssert(block != nil); 100 | 101 | __block BOOL result = YES; 102 | 103 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 104 | if (!block(obj)) { 105 | result = NO; 106 | *stop = YES; 107 | } 108 | }]; 109 | 110 | return result; 111 | } 112 | 113 | - (BOOL)bk_corresponds:(NSOrderedSet *)list withBlock:(BOOL (^)(id obj1, id obj2))block 114 | { 115 | NSParameterAssert(block != nil); 116 | 117 | __block BOOL result = NO; 118 | 119 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 120 | if (idx < list.count) { 121 | id obj2 = list[idx]; 122 | result = block(obj, obj2); 123 | } else { 124 | result = NO; 125 | } 126 | *stop = !result; 127 | }]; 128 | 129 | return result; 130 | } 131 | 132 | @end 133 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSObject+BKAssociatedObjects.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+BKAssociatedObjects.m 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | #import "NSObject+BKAssociatedObjects.h" 8 | 9 | #pragma mark - Weak support 10 | 11 | @interface _BKWeakAssociatedObject : NSObject 12 | 13 | @property (nonatomic, weak) id value; 14 | 15 | @end 16 | 17 | @implementation _BKWeakAssociatedObject 18 | 19 | @end 20 | 21 | @implementation NSObject (BKAssociatedObjects) 22 | 23 | #pragma mark - Instance Methods 24 | 25 | - (void)bk_associateValue:(id)value withKey:(const void *)key 26 | { 27 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 28 | } 29 | 30 | - (void)bk_atomicallyAssociateValue:(id)value withKey:(const void *)key 31 | { 32 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_RETAIN); 33 | } 34 | 35 | - (void)bk_associateCopyOfValue:(id)value withKey:(const void *)key 36 | { 37 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_COPY_NONATOMIC); 38 | } 39 | 40 | - (void)bk_atomicallyAssociateCopyOfValue:(id)value withKey:(const void *)key 41 | { 42 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_COPY); 43 | } 44 | 45 | - (void)bk_weaklyAssociateValue:(__autoreleasing id)value withKey:(const void *)key 46 | { 47 | _BKWeakAssociatedObject *assoc = objc_getAssociatedObject(self, key); 48 | if (!assoc) { 49 | assoc = [_BKWeakAssociatedObject new]; 50 | [self bk_associateValue:assoc withKey:key]; 51 | } 52 | assoc.value = value; 53 | } 54 | 55 | - (id)bk_associatedValueForKey:(const void *)key 56 | { 57 | id value = objc_getAssociatedObject(self, key); 58 | if (value && [value isKindOfClass:[_BKWeakAssociatedObject class]]) { 59 | return [(_BKWeakAssociatedObject *)value value]; 60 | } 61 | return value; 62 | } 63 | 64 | - (void)bk_removeAllAssociatedObjects 65 | { 66 | objc_removeAssociatedObjects(self); 67 | } 68 | 69 | #pragma mark - Class Methods 70 | 71 | + (void)bk_associateValue:(id)value withKey:(const void *)key 72 | { 73 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 74 | } 75 | 76 | + (void)bk_atomicallyAssociateValue:(id)value withKey:(const void *)key 77 | { 78 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_RETAIN); 79 | } 80 | 81 | + (void)bk_associateCopyOfValue:(id)value withKey:(const void *)key 82 | { 83 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_COPY_NONATOMIC); 84 | } 85 | 86 | + (void)bk_atomicallyAssociateCopyOfValue:(id)value withKey:(const void *)key 87 | { 88 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_COPY); 89 | } 90 | 91 | + (void)bk_weaklyAssociateValue:(__autoreleasing id)value withKey:(const void *)key 92 | { 93 | _BKWeakAssociatedObject *assoc = objc_getAssociatedObject(self, key); 94 | if (!assoc) { 95 | assoc = [_BKWeakAssociatedObject new]; 96 | [self bk_associateValue:assoc withKey:key]; 97 | } 98 | assoc.value = value; 99 | } 100 | 101 | + (id)bk_associatedValueForKey:(const void *)key 102 | { 103 | id value = objc_getAssociatedObject(self, key); 104 | if (value && [value isKindOfClass:[_BKWeakAssociatedObject class]]) { 105 | return [(_BKWeakAssociatedObject *)value value]; 106 | } 107 | return value; 108 | } 109 | 110 | + (void)bk_removeAllAssociatedObjects 111 | { 112 | objc_removeAssociatedObjects(self); 113 | } 114 | 115 | @end 116 | -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/Pods-VideoClip/Pods-VideoClip-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 | // 18 | // LICENSE 19 | // BlocksKit 20 | // 21 | 22 | Copyright (c) 2011-2014 Zachary Waldowski, Alexsander Akers, and the BlocksKit Contributors 23 | 24 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 27 | 28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | Title 31 | BlocksKit 32 | Type 33 | PSGroupSpecifier 34 | 35 | 36 | FooterText 37 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 38 | 39 | Permission is hereby granted, free of charge, to any person obtaining a copy 40 | of this software and associated documentation files (the "Software"), to deal 41 | in the Software without restriction, including without limitation the rights 42 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 43 | copies of the Software, and to permit persons to whom the Software is 44 | furnished to do so, subject to the following conditions: 45 | 46 | The above copyright notice and this permission notice shall be included in 47 | all copies or substantial portions of the Software. 48 | 49 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 50 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 51 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 52 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 53 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 54 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 55 | THE SOFTWARE. 56 | Title 57 | Masonry 58 | Type 59 | PSGroupSpecifier 60 | 61 | 62 | FooterText 63 | Generated by CocoaPods - https://cocoapods.org 64 | Title 65 | 66 | Type 67 | PSGroupSpecifier 68 | 69 | 70 | StringsTable 71 | Acknowledgements 72 | Title 73 | Acknowledgements 74 | 75 | 76 | -------------------------------------------------------------------------------- /VideoClip/Pods/Target Support Files/Pods-VideoClip/Pods-VideoClip-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 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/UIKit/UIGestureRecognizer+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIGestureRecognizer+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | #import "UIGestureRecognizer+BlocksKit.h" 8 | 9 | static const void *BKGestureRecognizerBlockKey = &BKGestureRecognizerBlockKey; 10 | static const void *BKGestureRecognizerDelayKey = &BKGestureRecognizerDelayKey; 11 | static const void *BKGestureRecognizerShouldHandleActionKey = &BKGestureRecognizerShouldHandleActionKey; 12 | 13 | @interface UIGestureRecognizer (BlocksKitInternal) 14 | 15 | @property (nonatomic, setter = bk_setShouldHandleAction:) BOOL bk_shouldHandleAction; 16 | 17 | - (void)bk_handleAction:(UIGestureRecognizer *)recognizer; 18 | 19 | @end 20 | 21 | @implementation UIGestureRecognizer (BlocksKit) 22 | 23 | + (id)bk_recognizerWithHandler:(void (^)(UIGestureRecognizer *sender, UIGestureRecognizerState state, CGPoint location))block delay:(NSTimeInterval)delay 24 | { 25 | return [[[self class] alloc] bk_initWithHandler:block delay:delay]; 26 | } 27 | 28 | - (id)bk_initWithHandler:(void (^)(UIGestureRecognizer *sender, UIGestureRecognizerState state, CGPoint location))block delay:(NSTimeInterval)delay 29 | { 30 | self = [self initWithTarget:self action:@selector(bk_handleAction:)]; 31 | if (!self) return nil; 32 | 33 | self.bk_handler = block; 34 | self.bk_handlerDelay = delay; 35 | 36 | return self; 37 | } 38 | 39 | + (id)bk_recognizerWithHandler:(void (^)(UIGestureRecognizer *sender, UIGestureRecognizerState state, CGPoint location))block 40 | { 41 | return [self bk_recognizerWithHandler:block delay:0.0]; 42 | } 43 | 44 | - (id)bk_initWithHandler:(void (^)(UIGestureRecognizer *sender, UIGestureRecognizerState state, CGPoint location))block 45 | { 46 | return (self = [self bk_initWithHandler:block delay:0.0]); 47 | } 48 | 49 | - (void)bk_handleAction:(UIGestureRecognizer *)recognizer 50 | { 51 | void (^handler)(UIGestureRecognizer *sender, UIGestureRecognizerState state, CGPoint location) = recognizer.bk_handler; 52 | if (!handler) return; 53 | 54 | NSTimeInterval delay = self.bk_handlerDelay; 55 | CGPoint location = [self locationInView:self.view]; 56 | void (^block)(void) = ^{ 57 | if (!self.bk_shouldHandleAction) return; 58 | handler(self, self.state, location); 59 | }; 60 | 61 | self.bk_shouldHandleAction = YES; 62 | 63 | if (!delay) { 64 | block(); 65 | return; 66 | } 67 | 68 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)); 69 | dispatch_after(popTime, dispatch_get_main_queue(), block); 70 | } 71 | 72 | - (void)bk_setHandler:(void (^)(UIGestureRecognizer *sender, UIGestureRecognizerState state, CGPoint location))handler 73 | { 74 | objc_setAssociatedObject(self, BKGestureRecognizerBlockKey, handler, OBJC_ASSOCIATION_COPY_NONATOMIC); 75 | } 76 | 77 | - (void (^)(UIGestureRecognizer *sender, UIGestureRecognizerState state, CGPoint location))bk_handler 78 | { 79 | return objc_getAssociatedObject(self, BKGestureRecognizerBlockKey); 80 | } 81 | 82 | - (void)bk_setHandlerDelay:(NSTimeInterval)delay 83 | { 84 | NSNumber *delayValue = delay ? @(delay) : nil; 85 | objc_setAssociatedObject(self, BKGestureRecognizerDelayKey, delayValue, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 86 | } 87 | 88 | - (NSTimeInterval)bk_handlerDelay 89 | { 90 | return [objc_getAssociatedObject(self, BKGestureRecognizerDelayKey) doubleValue]; 91 | } 92 | 93 | - (void)bk_setShouldHandleAction:(BOOL)flag 94 | { 95 | objc_setAssociatedObject(self, BKGestureRecognizerShouldHandleActionKey, @(flag), OBJC_ASSOCIATION_COPY_NONATOMIC); 96 | } 97 | 98 | - (BOOL)bk_shouldHandleAction 99 | { 100 | return [objc_getAssociatedObject(self, BKGestureRecognizerShouldHandleActionKey) boolValue]; 101 | } 102 | 103 | - (void)bk_cancel 104 | { 105 | self.bk_shouldHandleAction = NO; 106 | } 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/Core/NSArray+BlocksKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+BlocksKit.m 3 | // BlocksKit 4 | // 5 | 6 | #import "NSArray+BlocksKit.h" 7 | 8 | @implementation NSArray (BlocksKit) 9 | 10 | - (void)bk_each:(void (^)(id obj))block 11 | { 12 | NSParameterAssert(block != nil); 13 | 14 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 15 | block(obj); 16 | }]; 17 | } 18 | 19 | - (void)bk_apply:(void (^)(id obj))block 20 | { 21 | NSParameterAssert(block != nil); 22 | 23 | [self enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 24 | block(obj); 25 | }]; 26 | } 27 | 28 | - (id)bk_match:(BOOL (^)(id obj))block 29 | { 30 | NSParameterAssert(block != nil); 31 | 32 | NSUInteger index = [self indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { 33 | return block(obj); 34 | }]; 35 | 36 | if (index == NSNotFound) 37 | return nil; 38 | 39 | return self[index]; 40 | } 41 | 42 | - (NSArray *)bk_select:(BOOL (^)(id obj))block 43 | { 44 | NSParameterAssert(block != nil); 45 | return [self objectsAtIndexes:[self indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { 46 | return block(obj); 47 | }]]; 48 | } 49 | 50 | - (NSArray *)bk_reject:(BOOL (^)(id obj))block 51 | { 52 | NSParameterAssert(block != nil); 53 | return [self bk_select:^BOOL(id obj) { 54 | return !block(obj); 55 | }]; 56 | } 57 | 58 | - (NSArray *)bk_map:(id (^)(id obj))block 59 | { 60 | NSParameterAssert(block != nil); 61 | 62 | NSMutableArray *result = [NSMutableArray arrayWithCapacity:self.count]; 63 | 64 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 65 | id value = block(obj) ?: [NSNull null]; 66 | [result addObject:value]; 67 | }]; 68 | 69 | return result; 70 | } 71 | 72 | - (id)bk_reduce:(id)initial withBlock:(id (^)(id sum, id obj))block 73 | { 74 | NSParameterAssert(block != nil); 75 | 76 | __block id result = initial; 77 | 78 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 79 | result = block(result, obj); 80 | }]; 81 | 82 | return result; 83 | } 84 | 85 | - (NSInteger)bk_reduceInteger:(NSInteger)initial withBlock:(NSInteger (^)(NSInteger, id))block 86 | { 87 | NSParameterAssert(block != nil); 88 | 89 | __block NSInteger result = initial; 90 | 91 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 92 | result = block(result, obj); 93 | }]; 94 | 95 | return result; 96 | } 97 | 98 | - (CGFloat)bk_reduceFloat:(CGFloat)inital withBlock:(CGFloat (^)(CGFloat, id))block 99 | { 100 | NSParameterAssert(block != nil); 101 | 102 | __block CGFloat result = inital; 103 | 104 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 105 | result = block(result, obj); 106 | }]; 107 | 108 | return result; 109 | } 110 | 111 | - (BOOL)bk_any:(BOOL (^)(id obj))block 112 | { 113 | return [self bk_match:block] != nil; 114 | } 115 | 116 | - (BOOL)bk_none:(BOOL (^)(id obj))block 117 | { 118 | return [self bk_match:block] == nil; 119 | } 120 | 121 | - (BOOL)bk_all:(BOOL (^)(id obj))block 122 | { 123 | NSParameterAssert(block != nil); 124 | 125 | __block BOOL result = YES; 126 | 127 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 128 | if (!block(obj)) { 129 | result = NO; 130 | *stop = YES; 131 | } 132 | }]; 133 | 134 | return result; 135 | } 136 | 137 | - (BOOL)bk_corresponds:(NSArray *)list withBlock:(BOOL (^)(id obj1, id obj2))block 138 | { 139 | NSParameterAssert(block != nil); 140 | 141 | __block BOOL result = NO; 142 | 143 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 144 | if (idx < list.count) { 145 | id obj2 = list[idx]; 146 | result = block(obj, obj2); 147 | } else { 148 | result = NO; 149 | } 150 | *stop = !result; 151 | }]; 152 | 153 | return result; 154 | } 155 | 156 | @end 157 | -------------------------------------------------------------------------------- /VideoClip/Pods/BlocksKit/BlocksKit/DynamicDelegate/A2BlockInvocation.h: -------------------------------------------------------------------------------- 1 | // 2 | // A2BlockInvocation.h 3 | // BlocksKit 4 | // 5 | 6 | #import 7 | 8 | /// If a block invocation is instiated with an invalid method signature, 9 | /// an `NSInvalidArgumentException` is thrown containing this key in the 10 | /// user info. 11 | extern NSString *const A2IncompatibleMethodSignatureKey; 12 | 13 | /** An `A2BlockInvocation` is an Objective-C block call rendered static, that 14 | is, it is an action turned into an object. `A2BlockInvocation` objects are used 15 | to store and forward closure invocations between objects, primarily by the 16 | `A2DynamicDelegate` system. 17 | 18 | A block invocation object can be repeatedly dispatched with multiple sets of 19 | arguments with the same flexibility as NSInvocation. This design makes 20 | `A2BlockInvocation` extremely useful, because blocks can be used to capture 21 | scope and a block invocation can be used to save it for later. 22 | 23 | Like `NSInvocation`, `A2BlockInvocation` does not support invocations of 24 | methods with variadic arguments or union arguments. 25 | */ 26 | @interface A2BlockInvocation : NSObject 27 | 28 | /** Inspects the given block literal and returns a compatible method signature. 29 | 30 | The returned method signature is suitable for use in the Foundation forwarding 31 | system to link a method call to a block invocation. 32 | 33 | @param block An Objective-C block literal 34 | @return A method signature matching the declared prototype for the block 35 | */ 36 | + (NSMethodSignature *)methodSignatureForBlock:(id)block; 37 | 38 | /** @name Creating A2BlockInvocation Objects */ 39 | 40 | /** Returns a block invocation object able to construct calls to a given block. 41 | 42 | This method synthesizes a compatible method signature for the given block. 43 | 44 | @param block A block literal 45 | @return An initialized block invocation object 46 | @see methodSignatureForBlock 47 | */ 48 | - (instancetype)initWithBlock:(id)block; 49 | 50 | /** Returns a block invocation object able to construct calls to a given block 51 | using a given Objective-C method signature. 52 | 53 | The method signature given must be compatible with the signature of the block; 54 | that is, equal to the block signature but with a `SEL` (`':'`) as the second 55 | parameter. Passing in an incompatible method signature will raise an exception. 56 | 57 | An example method returning a string for an integer argument would have the 58 | following properties: 59 | - Block type signature of `NSString *(^)(int)` 60 | - Block function definition of `NSString *(*)(id, int)` 61 | - Block signature of `"@@?i"` 62 | - Method signature of `"@:i"` or `"@i"` 63 | 64 | @param block An Objective-C block literal 65 | @param methodSignature An method signature matching the block 66 | @return An initialized block invocation object 67 | */ 68 | - (instancetype)initWithBlock:(id)block methodSignature:(NSMethodSignature *)methodSignature; 69 | 70 | /** @name Getting the Block and Method Signatures */ 71 | 72 | /// The receiver's method signature, reflecting the block with a selector. 73 | /// Appropriate for use in `-methodSignatureForSelector:`. 74 | @property (nonatomic, strong, readonly) NSMethodSignature *methodSignature; 75 | 76 | /// Returns the receiver's block. 77 | @property (nonatomic, copy, readonly) id block; 78 | 79 | /** Calls the receiver's block with the arguments from the given invocation, 80 | providing a buffer containing the block's return value upon return. 81 | 82 | @param inv An instance of NSInvocation with values for its arguments set. 83 | @param returnValue On return, the block's return value, or `nil` for a void 84 | return type. 85 | @param NO if the buffer copies necessary for invocation failed, YES otherwise. 86 | @see invokeWithInvocation:returnValue: 87 | */ 88 | - (BOOL)invokeWithInvocation:(NSInvocation *)inv returnValue:(out NSValue **)returnValue; 89 | 90 | /** Calls the receiver's block with the arguments from the given invocation 91 | and sets the return value on the given invocation. 92 | 93 | @param inv An instance of NSInvocation with values for its arguments set. 94 | @see invokeWithInvocation:returnValue: 95 | */ 96 | - (void)invokeWithInvocation:(NSInvocation *)inv; 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /VideoClip/Pods/Masonry/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+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 "View+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand view additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface MAS_VIEW (MASShorthandAdditions) 18 | 19 | @property (nonatomic, strong, readonly) MASViewAttribute *left; 20 | @property (nonatomic, strong, readonly) MASViewAttribute *top; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *right; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *bottom; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *leading; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *trailing; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *width; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *height; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *centerX; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *centerY; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *baseline; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr); 31 | 32 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 33 | 34 | @property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline; 35 | @property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline; 36 | 37 | #endif 38 | 39 | #if TARGET_OS_IPHONE || TARGET_OS_TV 40 | 41 | @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; 42 | @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; 43 | @property (nonatomic, strong, readonly) MASViewAttribute *topMargin; 44 | @property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins; 49 | 50 | #endif 51 | 52 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 53 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 54 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 55 | 56 | @end 57 | 58 | #define MAS_ATTR_FORWARD(attr) \ 59 | - (MASViewAttribute *)attr { \ 60 | return [self mas_##attr]; \ 61 | } 62 | 63 | @implementation MAS_VIEW (MASShorthandAdditions) 64 | 65 | MAS_ATTR_FORWARD(top); 66 | MAS_ATTR_FORWARD(left); 67 | MAS_ATTR_FORWARD(bottom); 68 | MAS_ATTR_FORWARD(right); 69 | MAS_ATTR_FORWARD(leading); 70 | MAS_ATTR_FORWARD(trailing); 71 | MAS_ATTR_FORWARD(width); 72 | MAS_ATTR_FORWARD(height); 73 | MAS_ATTR_FORWARD(centerX); 74 | MAS_ATTR_FORWARD(centerY); 75 | MAS_ATTR_FORWARD(baseline); 76 | 77 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 78 | 79 | MAS_ATTR_FORWARD(firstBaseline); 80 | MAS_ATTR_FORWARD(lastBaseline); 81 | 82 | #endif 83 | 84 | #if TARGET_OS_IPHONE || TARGET_OS_TV 85 | 86 | MAS_ATTR_FORWARD(leftMargin); 87 | MAS_ATTR_FORWARD(rightMargin); 88 | MAS_ATTR_FORWARD(topMargin); 89 | MAS_ATTR_FORWARD(bottomMargin); 90 | MAS_ATTR_FORWARD(leadingMargin); 91 | MAS_ATTR_FORWARD(trailingMargin); 92 | MAS_ATTR_FORWARD(centerXWithinMargins); 93 | MAS_ATTR_FORWARD(centerYWithinMargins); 94 | 95 | #endif 96 | 97 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { 98 | return [self mas_attribute]; 99 | } 100 | 101 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 102 | return [self mas_makeConstraints:block]; 103 | } 104 | 105 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 106 | return [self mas_updateConstraints:block]; 107 | } 108 | 109 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 110 | return [self mas_remakeConstraints:block]; 111 | } 112 | 113 | @end 114 | 115 | #endif 116 | --------------------------------------------------------------------------------