├── ImageAndVideoAndRecord.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── lidanyang.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── lidanyang.xcuserdatad
│ └── xcschemes
│ ├── ImageAndVideoAndRecord.xcscheme
│ └── xcschememanagement.plist
├── ImageAndVideoAndRecord.xcworkspace
├── contents.xcworkspacedata
├── xcshareddata
│ └── IDEWorkspaceChecks.plist
└── xcuserdata
│ └── lidanyang.xcuserdatad
│ ├── UserInterfaceState.xcuserstate
│ └── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
├── ImageAndVideoAndRecord
├── AppDelegate.h
├── AppDelegate.m
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── camera.imageset
│ │ ├── Contents.json
│ │ ├── camera@2x.png
│ │ └── camera@3x.png
│ ├── close.imageset
│ │ ├── Contents.json
│ │ ├── close@2x.png
│ │ └── close@3x.png
│ ├── delete28.imageset
│ │ ├── Contents.json
│ │ ├── delete28@2x.png
│ │ └── delete28@3x.png
│ ├── flash_d.imageset
│ │ ├── Contents.json
│ │ ├── flash_d@2x.png
│ │ └── flash_d@3x.png
│ ├── flash_s.imageset
│ │ ├── Contents.json
│ │ ├── flash_s@2x.png
│ │ └── flash_s@3x.png
│ ├── plus.imageset
│ │ ├── Contents.json
│ │ ├── plus@2x.png
│ │ └── plus@3x.png
│ ├── second_img_d.imageset
│ │ ├── Contents.json
│ │ ├── second_img_d@2x.png
│ │ └── second_img_d@3x.png
│ ├── second_img_s.imageset
│ │ ├── Contents.json
│ │ ├── second_img_s@2x.png
│ │ └── second_img_s@3x.png
│ ├── second_sounding_d.imageset
│ │ ├── Contents.json
│ │ ├── second_sounding_d@2x.png
│ │ └── second_sounding_d@3x.png
│ ├── second_sounding_s.imageset
│ │ ├── Contents.json
│ │ ├── second_sounding_s@2x.png
│ │ └── second_sounding_s@3x.png
│ ├── second_video_d.imageset
│ │ ├── Contents.json
│ │ ├── second_video_d@2x.png
│ │ └── second_video_d@3x.png
│ ├── second_video_s.imageset
│ │ ├── Contents.json
│ │ ├── second_video_s@2x.png
│ │ └── second_video_s@3x.png
│ ├── sound 1.imageset
│ │ ├── Contents.json
│ │ └── sound 1.png
│ ├── sound 2.imageset
│ │ ├── Contents.json
│ │ └── sound 2.png
│ ├── sound 3.imageset
│ │ ├── Contents.json
│ │ └── sound.png
│ └── sound.imageset
│ │ ├── Contents.json
│ │ └── sound.png
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── ImageCollection
│ ├── CircleCellModel.h
│ ├── CircleCellModel.m
│ ├── CircleCollectionView.h
│ ├── CircleCollectionView.m
│ ├── CircleCollectionViewCell.h
│ └── CircleCollectionViewCell.m
├── Info.plist
├── KZSmallVideoRecorder
│ ├── KZSmallVideoRecorder
│ │ ├── KZVideoConfig.h
│ │ ├── KZVideoConfig.m
│ │ ├── KZVideoListViewController.h
│ │ ├── KZVideoListViewController.m
│ │ ├── KZVideoPlayer.h
│ │ ├── KZVideoPlayer.m
│ │ ├── KZVideoSupport.h
│ │ ├── KZVideoSupport.m
│ │ ├── KZVideoViewController.h
│ │ └── KZVideoViewController.m
│ ├── LICENSE
│ └── README.md
├── LGSound
│ ├── LGAudioKit.h
│ ├── LGMessageModel.h
│ ├── LGMessageModel.m
│ ├── LGSoundPlayer
│ │ ├── LGAudioPlayer.h
│ │ └── LGAudioPlayer.m
│ ├── LGSoundRecorder
│ │ ├── LGSoundRecorder.h
│ │ └── LGSoundRecorder.m
│ ├── Resource
│ │ ├── toast_cancelsend@2x.png
│ │ ├── toast_microphone@2x.png
│ │ ├── toast_timeshort@2x.png
│ │ ├── toast_vol_1@2x.png
│ │ ├── toast_vol_2@2x.png
│ │ ├── toast_vol_3@2x.png
│ │ ├── toast_vol_4@2x.png
│ │ ├── toast_vol_5@2x.png
│ │ ├── toast_vol_6@2x.png
│ │ └── toast_vol_7@2x.png
│ ├── Vendor
│ │ └── AMR
│ │ │ ├── amrFileCodec.h
│ │ │ ├── amrFileCodec.m
│ │ │ ├── include
│ │ │ ├── opencore-amrnb
│ │ │ │ ├── interf_dec.h
│ │ │ │ └── interf_enc.h
│ │ │ └── opencore-amrwb
│ │ │ │ ├── dec_if.h
│ │ │ │ └── if_rom.h
│ │ │ └── lib
│ │ │ ├── libopencore-amrnb.a
│ │ │ └── libopencore-amrwb.a
│ └── lame
│ │ ├── lame.h
│ │ └── libmp3lame.a
├── MBProgress+
│ ├── MBProgressHUD+MJ.h
│ └── MBProgressHUD+MJ.m
├── PlaceholderTextView
│ ├── PlaceholderTextView.h
│ └── PlaceholderTextView.m
├── ShowView
│ ├── showVideoView.h
│ └── showVideoView.m
├── UIView+
│ ├── UIView+Size.h
│ └── UIView+Size.m
├── ViewController.h
├── ViewController.m
├── ZZPhotoRE
│ ├── Public
│ │ ├── Other
│ │ │ ├── UIImageHandle.h
│ │ │ ├── UIImageHandle.m
│ │ │ ├── ZZAlumAnimation.h
│ │ │ └── ZZAlumAnimation.m
│ │ ├── Resources
│ │ │ ├── back_button_normal.png
│ │ │ ├── camera_focus_pic.png
│ │ │ ├── change_camera_pic.png
│ │ │ ├── determiner_s@2x.png
│ │ │ ├── determiner_s@3x.png
│ │ │ ├── flash_close_pic.png
│ │ │ ├── flash_open_pic.png
│ │ │ ├── no_data.png
│ │ │ ├── photo_add.png
│ │ │ ├── remove_btn_pic.png
│ │ │ ├── select_no.png
│ │ │ ├── select_yes.png
│ │ │ ├── take_photo_pic.png
│ │ │ ├── take_photo_pic@2x.png
│ │ │ ├── trash_btn_pic.png
│ │ │ └── zz_alumb_rightCell.png
│ │ └── ZZResourceConfig.h
│ ├── ZZBrowser
│ │ ├── ZZBrowserPickerCell.h
│ │ ├── ZZBrowserPickerCell.m
│ │ ├── ZZBrowserPickerViewController.h
│ │ ├── ZZBrowserPickerViewController.m
│ │ ├── ZZPageControl.h
│ │ └── ZZPageControl.m
│ ├── ZZCamera
│ │ ├── Controller
│ │ │ ├── ZZCameraBrowerViewController.h
│ │ │ ├── ZZCameraBrowerViewController.m
│ │ │ ├── ZZCameraController.h
│ │ │ ├── ZZCameraController.m
│ │ │ ├── ZZCameraPickerViewController.h
│ │ │ └── ZZCameraPickerViewController.m
│ │ ├── Model
│ │ │ ├── ZZCamera.h
│ │ │ └── ZZCamera.m
│ │ └── View
│ │ │ ├── ZZCameraFocusView.h
│ │ │ ├── ZZCameraFocusView.m
│ │ │ ├── ZZCameraPickerCell.h
│ │ │ └── ZZCameraPickerCell.m
│ ├── ZZPhoto
│ │ ├── Controller
│ │ │ ├── ZZPhotoBrowerViewController.h
│ │ │ ├── ZZPhotoBrowerViewController.m
│ │ │ ├── ZZPhotoController.h
│ │ │ ├── ZZPhotoController.m
│ │ │ ├── ZZPhotoListViewController.h
│ │ │ ├── ZZPhotoListViewController.m
│ │ │ ├── ZZPhotoPickerViewController.h
│ │ │ └── ZZPhotoPickerViewController.m
│ │ ├── Model
│ │ │ ├── ZZPhoto.h
│ │ │ ├── ZZPhoto.m
│ │ │ ├── ZZPhotoDatas.h
│ │ │ ├── ZZPhotoDatas.m
│ │ │ ├── ZZPhotoListModel.h
│ │ │ └── ZZPhotoListModel.m
│ │ └── View
│ │ │ ├── ZZPhotoAlert.h
│ │ │ ├── ZZPhotoAlert.m
│ │ │ ├── ZZPhotoHud.h
│ │ │ ├── ZZPhotoHud.m
│ │ │ ├── ZZPhotoListCell.h
│ │ │ ├── ZZPhotoListCell.m
│ │ │ ├── ZZPhotoPickerCell.h
│ │ │ └── ZZPhotoPickerCell.m
│ └── ZZPhotoKit.h
└── main.m
├── ImageAndVideoAndRecordTests
├── ImageAndVideoAndRecordTests.m
└── Info.plist
├── ImageAndVideoAndRecordUITests
├── ImageAndVideoAndRecordUITests.m
└── Info.plist
├── ImageFolder
├── ImageGif.gif
└── WechatIMG63.jpg
├── Podfile
├── Podfile.lock
├── Pods
├── Headers
│ ├── Private
│ │ ├── MBProgressHUD
│ │ │ └── MBProgressHUD.h
│ │ ├── Masonry
│ │ │ ├── MASCompositeConstraint.h
│ │ │ ├── MASConstraint+Private.h
│ │ │ ├── MASConstraint.h
│ │ │ ├── MASConstraintMaker.h
│ │ │ ├── MASLayoutConstraint.h
│ │ │ ├── MASUtilities.h
│ │ │ ├── MASViewAttribute.h
│ │ │ ├── MASViewConstraint.h
│ │ │ ├── Masonry.h
│ │ │ ├── NSArray+MASAdditions.h
│ │ │ ├── NSArray+MASShorthandAdditions.h
│ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ │ ├── View+MASAdditions.h
│ │ │ ├── View+MASShorthandAdditions.h
│ │ │ └── ViewController+MASAdditions.h
│ │ └── SDWebImage
│ │ │ ├── NSData+ImageContentType.h
│ │ │ ├── SDImageCache.h
│ │ │ ├── SDWebImageCompat.h
│ │ │ ├── SDWebImageDecoder.h
│ │ │ ├── SDWebImageDownloader.h
│ │ │ ├── SDWebImageDownloaderOperation.h
│ │ │ ├── SDWebImageManager.h
│ │ │ ├── SDWebImageOperation.h
│ │ │ ├── SDWebImagePrefetcher.h
│ │ │ ├── UIButton+WebCache.h
│ │ │ ├── UIImage+GIF.h
│ │ │ ├── UIImage+MultiFormat.h
│ │ │ ├── UIImageView+HighlightedWebCache.h
│ │ │ ├── UIImageView+WebCache.h
│ │ │ └── UIView+WebCacheOperation.h
│ └── Public
│ │ ├── MBProgressHUD
│ │ └── MBProgressHUD.h
│ │ ├── Masonry
│ │ ├── MASCompositeConstraint.h
│ │ ├── MASConstraint+Private.h
│ │ ├── MASConstraint.h
│ │ ├── MASConstraintMaker.h
│ │ ├── MASLayoutConstraint.h
│ │ ├── MASUtilities.h
│ │ ├── MASViewAttribute.h
│ │ ├── MASViewConstraint.h
│ │ ├── Masonry.h
│ │ ├── NSArray+MASAdditions.h
│ │ ├── NSArray+MASShorthandAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ ├── View+MASAdditions.h
│ │ ├── View+MASShorthandAdditions.h
│ │ └── ViewController+MASAdditions.h
│ │ └── SDWebImage
│ │ ├── NSData+ImageContentType.h
│ │ ├── SDImageCache.h
│ │ ├── SDWebImageCompat.h
│ │ ├── SDWebImageDecoder.h
│ │ ├── SDWebImageDownloader.h
│ │ ├── SDWebImageDownloaderOperation.h
│ │ ├── SDWebImageManager.h
│ │ ├── SDWebImageOperation.h
│ │ ├── SDWebImagePrefetcher.h
│ │ ├── UIButton+WebCache.h
│ │ ├── UIImage+GIF.h
│ │ ├── UIImage+MultiFormat.h
│ │ ├── UIImageView+HighlightedWebCache.h
│ │ ├── UIImageView+WebCache.h
│ │ └── UIView+WebCacheOperation.h
├── MBProgressHUD
│ ├── LICENSE
│ ├── MBProgressHUD.h
│ ├── MBProgressHUD.m
│ └── README.mdown
├── Manifest.lock
├── Masonry
│ ├── LICENSE
│ ├── Masonry
│ │ ├── MASCompositeConstraint.h
│ │ ├── MASCompositeConstraint.m
│ │ ├── MASConstraint+Private.h
│ │ ├── MASConstraint.h
│ │ ├── MASConstraint.m
│ │ ├── MASConstraintMaker.h
│ │ ├── MASConstraintMaker.m
│ │ ├── MASLayoutConstraint.h
│ │ ├── MASLayoutConstraint.m
│ │ ├── MASUtilities.h
│ │ ├── MASViewAttribute.h
│ │ ├── MASViewAttribute.m
│ │ ├── MASViewConstraint.h
│ │ ├── MASViewConstraint.m
│ │ ├── Masonry.h
│ │ ├── NSArray+MASAdditions.h
│ │ ├── NSArray+MASAdditions.m
│ │ ├── NSArray+MASShorthandAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.m
│ │ ├── View+MASAdditions.h
│ │ ├── View+MASAdditions.m
│ │ ├── View+MASShorthandAdditions.h
│ │ ├── ViewController+MASAdditions.h
│ │ └── ViewController+MASAdditions.m
│ └── README.md
├── Pods.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── lidanyang.xcuserdatad
│ │ └── xcschemes
│ │ ├── MBProgressHUD.xcscheme
│ │ ├── Masonry.xcscheme
│ │ ├── Pods-ImageAndVideoAndRecord.xcscheme
│ │ ├── SDWebImage.xcscheme
│ │ └── xcschememanagement.plist
├── SDWebImage
│ ├── LICENSE
│ ├── README.md
│ └── SDWebImage
│ │ ├── NSData+ImageContentType.h
│ │ ├── NSData+ImageContentType.m
│ │ ├── SDImageCache.h
│ │ ├── SDImageCache.m
│ │ ├── SDWebImageCompat.h
│ │ ├── SDWebImageCompat.m
│ │ ├── SDWebImageDecoder.h
│ │ ├── SDWebImageDecoder.m
│ │ ├── SDWebImageDownloader.h
│ │ ├── SDWebImageDownloader.m
│ │ ├── SDWebImageDownloaderOperation.h
│ │ ├── SDWebImageDownloaderOperation.m
│ │ ├── SDWebImageManager.h
│ │ ├── SDWebImageManager.m
│ │ ├── SDWebImageOperation.h
│ │ ├── SDWebImagePrefetcher.h
│ │ ├── SDWebImagePrefetcher.m
│ │ ├── UIButton+WebCache.h
│ │ ├── UIButton+WebCache.m
│ │ ├── UIImage+GIF.h
│ │ ├── UIImage+GIF.m
│ │ ├── UIImage+MultiFormat.h
│ │ ├── UIImage+MultiFormat.m
│ │ ├── UIImageView+HighlightedWebCache.h
│ │ ├── UIImageView+HighlightedWebCache.m
│ │ ├── UIImageView+WebCache.h
│ │ ├── UIImageView+WebCache.m
│ │ ├── UIView+WebCacheOperation.h
│ │ └── UIView+WebCacheOperation.m
└── Target Support Files
│ ├── MBProgressHUD
│ ├── MBProgressHUD-dummy.m
│ ├── MBProgressHUD-prefix.pch
│ └── MBProgressHUD.xcconfig
│ ├── Masonry
│ ├── Masonry-dummy.m
│ ├── Masonry-prefix.pch
│ └── Masonry.xcconfig
│ ├── Pods-ImageAndVideoAndRecord
│ ├── Pods-ImageAndVideoAndRecord-acknowledgements.markdown
│ ├── Pods-ImageAndVideoAndRecord-acknowledgements.plist
│ ├── Pods-ImageAndVideoAndRecord-dummy.m
│ ├── Pods-ImageAndVideoAndRecord-frameworks.sh
│ ├── Pods-ImageAndVideoAndRecord-resources.sh
│ ├── Pods-ImageAndVideoAndRecord.debug.xcconfig
│ └── Pods-ImageAndVideoAndRecord.release.xcconfig
│ └── SDWebImage
│ ├── SDWebImage-dummy.m
│ ├── SDWebImage-prefix.pch
│ └── SDWebImage.xcconfig
└── README.md
/ImageAndVideoAndRecord.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord.xcodeproj/project.xcworkspace/xcuserdata/lidanyang.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord.xcodeproj/project.xcworkspace/xcuserdata/lidanyang.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord.xcodeproj/xcuserdata/lidanyang.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ImageAndVideoAndRecord.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8829A4F71E1CEA2B0023362D
16 |
17 | primary
18 |
19 |
20 | 8829A5101E1CEA2B0023362D
21 |
22 | primary
23 |
24 |
25 | 8829A51B1E1CEA2B0023362D
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord.xcworkspace/xcuserdata/lidanyang.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord.xcworkspace/xcuserdata/lidanyang.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord.xcworkspace/xcuserdata/lidanyang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ImageAndVideoAndRecord
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 李丹阳. 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 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // ImageAndVideoAndRecord
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "ViewController.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 |
19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20 |
21 | self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
22 | self.window.backgroundColor = [UIColor whiteColor];
23 | [self.window makeKeyAndVisible];
24 |
25 | ViewController* vc1 = [[ViewController alloc]init];
26 | UINavigationController* nav = [[UINavigationController alloc]initWithRootViewController:vc1];
27 |
28 | self.window.rootViewController = nav;
29 |
30 |
31 | // Override point for customization after application launch.
32 | return YES;
33 | }
34 |
35 |
36 | - (void)applicationWillResignActive:(UIApplication *)application {
37 | // 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.
38 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
39 | }
40 |
41 |
42 | - (void)applicationDidEnterBackground:(UIApplication *)application {
43 | // 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.
44 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
45 | }
46 |
47 |
48 | - (void)applicationWillEnterForeground:(UIApplication *)application {
49 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
50 | }
51 |
52 |
53 | - (void)applicationDidBecomeActive:(UIApplication *)application {
54 | // 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.
55 | }
56 |
57 |
58 | - (void)applicationWillTerminate:(UIApplication *)application {
59 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
60 | }
61 |
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | }
43 | ],
44 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/camera.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "camera@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "camera@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/camera.imageset/camera@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/camera.imageset/camera@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/camera.imageset/camera@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/camera.imageset/camera@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/close.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "close@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "close@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/close.imageset/close@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/close.imageset/close@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/close.imageset/close@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/close.imageset/close@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/delete28.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "delete28@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "delete28@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/delete28.imageset/delete28@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/delete28.imageset/delete28@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/delete28.imageset/delete28@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/delete28.imageset/delete28@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/flash_d.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "flash_d@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "flash_d@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/flash_d.imageset/flash_d@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/flash_d.imageset/flash_d@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/flash_d.imageset/flash_d@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/flash_d.imageset/flash_d@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/flash_s.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "flash_s@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "flash_s@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/flash_s.imageset/flash_s@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/flash_s.imageset/flash_s@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/flash_s.imageset/flash_s@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/flash_s.imageset/flash_s@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/plus.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "plus@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "plus@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/plus.imageset/plus@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/plus.imageset/plus@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/plus.imageset/plus@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/plus.imageset/plus@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_img_d.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "second_img_d@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "second_img_d@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_img_d.imageset/second_img_d@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_img_d.imageset/second_img_d@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_img_d.imageset/second_img_d@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_img_d.imageset/second_img_d@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_img_s.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "second_img_s@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "second_img_s@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_img_s.imageset/second_img_s@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_img_s.imageset/second_img_s@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_img_s.imageset/second_img_s@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_img_s.imageset/second_img_s@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_sounding_d.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "second_sounding_d@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "second_sounding_d@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_sounding_d.imageset/second_sounding_d@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_sounding_d.imageset/second_sounding_d@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_sounding_d.imageset/second_sounding_d@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_sounding_d.imageset/second_sounding_d@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_sounding_s.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "second_sounding_s@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "second_sounding_s@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_sounding_s.imageset/second_sounding_s@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_sounding_s.imageset/second_sounding_s@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_sounding_s.imageset/second_sounding_s@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_sounding_s.imageset/second_sounding_s@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_video_d.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "second_video_d@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "second_video_d@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_video_d.imageset/second_video_d@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_video_d.imageset/second_video_d@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_video_d.imageset/second_video_d@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_video_d.imageset/second_video_d@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_video_s.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "second_video_s@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "second_video_s@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_video_s.imageset/second_video_s@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_video_s.imageset/second_video_s@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/second_video_s.imageset/second_video_s@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/second_video_s.imageset/second_video_s@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/sound 1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "sound 1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/sound 1.imageset/sound 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/sound 1.imageset/sound 1.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/sound 2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "sound 2.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/sound 2.imageset/sound 2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/sound 2.imageset/sound 2.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/sound 3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "sound.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/sound 3.imageset/sound.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/sound 3.imageset/sound.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/sound.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "sound.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Assets.xcassets/sound.imageset/sound.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/Assets.xcassets/sound.imageset/sound.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/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 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/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 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ImageCollection/CircleCellModel.h:
--------------------------------------------------------------------------------
1 |
2 | //
3 | // CircleCellModel.h
4 | // 小莱
5 | //
6 | // Created by 林颖 on 16/6/13.
7 | // Copyright © 2016年 李丹阳. All rights reserved.
8 | //
9 |
10 | #import
11 | #import
12 | typedef enum : NSUInteger{
13 | CirModelStateNormal = 0,
14 | CirModelStateAdd = 1,
15 | CirModelStateVideo = 2,
16 | }cirModelState;
17 |
18 |
19 | @interface CircleCellModel : NSObject
20 |
21 | @property (nonatomic, strong) UIImage *photoImage;
22 | @property (nonatomic,)cirModelState state;
23 |
24 | @property (nonatomic, assign) NSInteger tag;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ImageCollection/CircleCellModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // CircleCellModel.m
3 | // 小莱
4 | //
5 | // Created by 林颖 on 16/6/13.
6 | // Copyright © 2016年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import "CircleCellModel.h"
10 |
11 | @implementation CircleCellModel
12 |
13 | -(instancetype)init{
14 | self = [super init];
15 | if (self) {
16 | self.state = CirModelStateNormal;
17 | }
18 | return self;
19 | }
20 | @end
21 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ImageCollection/CircleCollectionView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CircleCollectionView.h
3 | // 小莱
4 | //
5 | // Created by 林颖 on 16/5/9.
6 | // Copyright © 2016年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "CircleCellModel.h"
11 | #import "CircleCollectionViewCell.h"
12 |
13 | @protocol CirCollectionViewDelegate
14 |
15 | @required
16 |
17 | @optional
18 |
19 | -(void)addDataSourceItem;
20 |
21 |
22 | @end
23 |
24 |
25 | @interface CircleCollectionView : UICollectionView
26 |
27 | @property(strong,nonatomic) NSMutableArray *photoArray;
28 | @property(strong,nonatomic) NSMutableArray *modelArray;
29 |
30 |
31 | -(void)addItemsWithModels:(NSArray <__kindof CircleCellModel *> *)models;
32 | @end
33 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ImageCollection/CircleCollectionViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CircleCollectionViewCell.h
3 | // 小莱
4 | //
5 | // Created by 林颖 on 16/6/13.
6 | // Copyright © 2016年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "CircleCellModel.h"
11 |
12 | typedef enum : NSUInteger {
13 | CirDeleteBtnStateNormal = 0,
14 | CirDeleteBtnStateEditing = 1,
15 | } CirDeleteState;
16 |
17 | @class CircleCollectionViewCell;
18 | @protocol CirCollectionViewCellDelegate
19 |
20 | -(NSInteger)deleteCurrentItem:(CircleCollectionViewCell *)item;
21 | @end
22 |
23 | @interface CircleCollectionViewCell : UICollectionViewCell{
24 | UIImageView *photo;
25 | UIButton *deleteBtn;
26 | UIImageView *deleteImageView;
27 | UIButton *addBtn;
28 | UIButton *videoBtn;
29 | }
30 |
31 | @property (nonatomic, assign) id delegate;
32 |
33 | @property (nonatomic)CirDeleteState deleteState;
34 | @property (nonatomic,strong)CircleCellModel *model;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ImageCollection/CircleCollectionViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CircleCollectionViewCell.m
3 | // 小莱
4 | //
5 | // Created by 林颖 on 16/6/13.
6 | // Copyright © 2016年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import "CircleCollectionViewCell.h"
10 | #import "UIView+Size.h"
11 |
12 |
13 | @implementation CircleCollectionViewCell
14 | -(instancetype)initWithFrame:(CGRect)frame{
15 | self = [super initWithFrame:frame];
16 | if (self) {
17 |
18 | photo = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 70, 52)];
19 | photo.layer.masksToBounds = YES;
20 | photo.contentMode = UIViewContentModeScaleAspectFill;
21 | photo.userInteractionEnabled = YES;
22 | photo.layer.cornerRadius = 2.5;
23 | [self addSubview:photo];
24 |
25 | deleteBtn = [[UIButton alloc]initWithFrame:CGRectMake(70-14-5, 0, 20, 20)];
26 | deleteBtn.hidden = YES;
27 | [deleteBtn addTarget:[self getParentviewController] action:@selector(deleteCircleCollectionPhoto:) forControlEvents:UIControlEventTouchUpInside];
28 | [self addSubview:deleteBtn];
29 |
30 | deleteImageView = [[UIImageView alloc]initWithFrame:CGRectMake(70-14-2, 2, 14, 14)];
31 | deleteImageView.image =[UIImage imageNamed:@"delete28"];
32 | deleteImageView.hidden = YES;
33 | [self addSubview:deleteImageView];
34 |
35 | addBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 70, 52)];
36 | addBtn.hidden = YES;
37 | [self addSubview:addBtn];
38 | [addBtn addTarget:[self getParentviewController] action:@selector(addImageButtonAction:) forControlEvents:UIControlEventTouchUpInside];
39 |
40 | videoBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 70, 52)];
41 |
42 | videoBtn.hidden = YES;
43 | [self addSubview:videoBtn];
44 |
45 | [videoBtn addTarget:[self getParentviewController] action:@selector(addVideoButtonAction:) forControlEvents:UIControlEventTouchUpInside];
46 | }
47 |
48 | return self;
49 | }
50 |
51 |
52 | -(void)setModel:(CircleCellModel *)model{
53 | _model = model;
54 | photo.image = model.photoImage;
55 | if (model.state == CirModelStateAdd) {
56 |
57 | addBtn.hidden = NO;
58 | videoBtn.hidden = YES;
59 | [deleteBtn removeFromSuperview];
60 | [deleteImageView removeFromSuperview];
61 |
62 | }else if(model.state == CirModelStateVideo){
63 |
64 | addBtn.hidden = YES;
65 | videoBtn.hidden = NO;
66 | [deleteBtn removeFromSuperview];
67 | [deleteImageView removeFromSuperview];
68 |
69 | }else{
70 |
71 | addBtn.hidden = YES;
72 | videoBtn.hidden = YES;
73 | [deleteBtn removeFromSuperview];
74 | [self addSubview:deleteBtn];
75 | [self addSubview:deleteImageView];
76 |
77 | }
78 | }
79 |
80 | -(void)setDeleteState:(CirDeleteState)deleteState{
81 | _deleteState = deleteState;
82 | if (_deleteState == CirModelStateNormal) {
83 | deleteBtn.hidden = YES;
84 | deleteImageView.hidden = YES;
85 | }else if (_deleteState == CirDeleteBtnStateEditing){
86 | deleteBtn.hidden = NO;
87 | deleteImageView.hidden = NO;
88 | }
89 | }
90 |
91 |
92 | @end
93 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | NSCameraUsageDescription
24 | App需要您的同意,才能访问相机
25 | NSContactsUsageDescription
26 | iOS10以后 App需要您的同意,才能访问通讯录
27 | NSMicrophoneUsageDescription
28 | App需要您的同意,才能访问麦克风
29 | NSPhotoLibraryUsageDescription
30 | App需要您的同意,才能访问相册
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | UIMainStoryboardFile
34 | Main
35 | UIRequiredDeviceCapabilities
36 |
37 | armv7
38 |
39 | UISupportedInterfaceOrientations
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationLandscapeLeft
43 | UIInterfaceOrientationLandscapeRight
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/KZSmallVideoRecorder/KZSmallVideoRecorder/KZVideoConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // KZVideoConfig.h
3 | // KZWeChatSmallVideo_OC
4 | //
5 | // Created by HouKangzhu on 16/7/19.
6 | // Copyright © 2016年 侯康柱. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define kzSCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
12 | #define kzSCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
13 |
14 |
15 | #define kzThemeBlackColor [UIColor blackColor]
16 | #define kzThemeTineColor [UIColor greenColor]
17 |
18 | #define kzThemeWaringColor [UIColor redColor]
19 | #define kzThemeWhiteColor [UIColor whiteColor]
20 | #define kzThemeGraryColor [UIColor grayColor]
21 |
22 | // 视频保存路径
23 | #define kzVideoDicName @"kzSmailVideo"
24 |
25 | // 视频录制 时长
26 | #define kzRecordTime 10.0
27 |
28 | // 视频的长宽按比例
29 | #define kzVideo_w_h (4.0/3)
30 |
31 | // 视频默认 宽的分辨率 高 = kzVideoWidthPX / kzVideo_w_h
32 | #define kzVideoWidthPX 200.0
33 |
34 | //控制条高度 小屏幕时
35 | #define kzControViewHeight 120.0
36 | // 是否保存到手机相册
37 | //#define saveToLibrary (0)
38 |
39 |
40 | extern void kz_dispatch_after(float time, dispatch_block_t block);
41 |
42 | typedef NS_ENUM(NSUInteger, KZVideoViewShowType) {
43 | KZVideoViewShowTypeSmall, // 小屏幕 ...聊天界面的
44 | KZVideoViewShowTypeSingle, // 全屏 ... 朋友圈界面的
45 | };
46 |
47 | @interface KZVideoConfig : NSObject
48 | // 录像 的 View 大小
49 | + (CGRect)viewFrameWithType:(KZVideoViewShowType)type;
50 |
51 | //视频View的尺寸
52 | + (CGSize)videoViewDefaultSize;
53 |
54 | // 默认视频分辨率
55 | + (CGSize)defualtVideoSize;
56 | // 渐变色
57 | + (NSArray *)gradualColors;
58 |
59 | // 模糊View
60 | + (void)motionBlurView:(UIView *)superView;
61 |
62 |
63 | + (void)showHinInfo:(NSString *)text inView:(UIView *)superView frame:(CGRect)frame timeLong:(NSTimeInterval)time;
64 |
65 | @end
66 |
67 | /*!
68 | * 视频对象 Model类
69 | */
70 | @interface KZVideoModel : NSObject
71 | /// 完整视频 本地路径
72 | @property (nonatomic, copy) NSString *videoAbsolutePath;
73 | /// 缩略图 路径
74 | @property (nonatomic, copy) NSString *thumAbsolutePath;
75 | // 录制时间
76 | @property (nonatomic, assign) NSDate *recordTime;
77 |
78 | @end
79 |
80 | @interface KZVideoUtil : NSObject
81 |
82 | /*!
83 | * 有视频的存在
84 | */
85 | + (BOOL)existVideo;
86 |
87 | /*!
88 | * 时间倒序 后的视频列表
89 | */
90 | + (NSArray *)getSortVideoList;
91 |
92 | /*!
93 | * 保存缩略图
94 | *
95 | * @param videoUrl 视频路径
96 | * @param second 第几秒的缩略图
97 | */
98 | + (void)saveThumImageWithVideoURL:(NSURL *)videoUrl second:(int64_t)second;
99 |
100 | /*!
101 | * 产生新的对象
102 | */
103 | + (KZVideoModel *)createNewVideo;
104 |
105 | /*!
106 | * 删除视频
107 | */
108 | + (void)deleteVideo:(NSString *)videoPath;
109 |
110 | @end
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/KZSmallVideoRecorder/KZSmallVideoRecorder/KZVideoListViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // KZVideoListViewController.h
3 | // KZWeChatSmallVideo_OC
4 | //
5 | // Created by HouKangzhu on 16/7/21.
6 | // Copyright © 2016年 侯康柱. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "KZVideoConfig.h"
11 | @class KZVideoModel;
12 | /*!
13 | * 视频列表
14 | */
15 | @interface KZVideoListViewController : NSObject
16 |
17 | @property (nonatomic, strong, readonly) UIView *actionView;
18 |
19 | @property (nonatomic, copy) void(^selectBlock)(KZVideoModel *);
20 |
21 | @property (nonatomic, copy) void(^didCloseBlock)(void);
22 |
23 | - (void)showAnimationWithType:(KZVideoViewShowType)showType;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/KZSmallVideoRecorder/KZSmallVideoRecorder/KZVideoPlayer.h:
--------------------------------------------------------------------------------
1 | //
2 | // KZVideoPlayer.h
3 | // KZWeChatSmallVideo_OC
4 | //
5 | // Created by HouKangzhu on 16/7/21.
6 | // Copyright © 2016年 侯康柱. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface KZVideoPlayer : UIView
12 |
13 | - (instancetype)initWithFrame:(CGRect)frame videoUrl:(NSURL *)videoUrl;
14 |
15 | @property (nonatomic, strong, readonly) NSURL *videoUrl;
16 |
17 | @property (nonatomic,assign) BOOL autoReplay; // 默认 YES
18 |
19 | - (void)play;
20 |
21 | - (void)stop;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/KZSmallVideoRecorder/KZSmallVideoRecorder/KZVideoPlayer.m:
--------------------------------------------------------------------------------
1 | //
2 | // KZVideoPlayer.m
3 | // KZWeChatSmallVideo_OC
4 | //
5 | // Created by HouKangzhu on 16/7/21.
6 | // Copyright © 2016年 侯康柱. All rights reserved.
7 | //
8 |
9 | #import "KZVideoPlayer.h"
10 | #import
11 |
12 | @implementation KZVideoPlayer {
13 | AVPlayer *_player;
14 |
15 | UIView *_ctrlView;
16 | CALayer *_playStatus;
17 |
18 | BOOL _isPlaying;
19 | }
20 |
21 | - (instancetype)initWithFrame:(CGRect)frame videoUrl:(NSURL *)videoUrl{
22 | if (self = [super initWithFrame:frame]) {
23 | _autoReplay = YES;
24 | _videoUrl = videoUrl;
25 | [self setupSubViews];
26 | }
27 | return self;
28 | }
29 |
30 | - (void)play {
31 | if (_isPlaying) {
32 | return;
33 | }
34 | [self tapAction];
35 | }
36 |
37 | - (void)stop {
38 | if (_isPlaying) {
39 | [self tapAction];
40 | }
41 | }
42 |
43 |
44 | - (void)setupSubViews {
45 | AVPlayerItem *playerItem = [[AVPlayerItem alloc] initWithURL:_videoUrl];
46 | _player = [AVPlayer playerWithPlayerItem:playerItem];
47 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playEnd) name:AVPlayerItemDidPlayToEndTimeNotification object:nil];
48 |
49 | AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:_player];
50 | playerLayer.frame = self.bounds;
51 | playerLayer.videoGravity = AVLayerVideoGravityResize;
52 | [self.layer addSublayer:playerLayer];
53 |
54 | _ctrlView = [[UIView alloc] initWithFrame:self.bounds];
55 | _ctrlView.backgroundColor = [UIColor clearColor];
56 | [self addSubview:_ctrlView];
57 |
58 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction)];
59 | [_ctrlView addGestureRecognizer:tap];
60 | [self setupStatusView];
61 | [self tapAction];
62 | }
63 |
64 | - (void)setupStatusView {
65 | CGPoint selfCent = CGPointMake(self.bounds.size.width/2+10, self.bounds.size.height/2);
66 | CGFloat width = 40;
67 |
68 | CGMutablePathRef path = CGPathCreateMutable();
69 | CGPathMoveToPoint(path, nil, selfCent.x - width/2, selfCent.y - width/2);
70 | CGPathAddLineToPoint(path, nil, selfCent.x - width/2, selfCent.y + width/2);
71 | CGPathAddLineToPoint(path, nil, selfCent.x + width/2 - 4, selfCent.y);
72 | CGPathAddLineToPoint(path, nil, selfCent.x - width/2, selfCent.y - width/2);
73 |
74 | CGColorRef color = [UIColor colorWithRed: 1.0 green: 1.0 blue: 1.0 alpha: 0.5].CGColor;
75 |
76 | CAShapeLayer *trackLayer = [CAShapeLayer layer];
77 | trackLayer.frame = self.bounds;
78 | trackLayer.strokeColor = [UIColor clearColor].CGColor;
79 | trackLayer.fillColor = color;
80 | trackLayer.opacity = 1.0;
81 | trackLayer.lineCap = kCALineCapRound;
82 | trackLayer.lineWidth = 1.0;
83 | trackLayer.path = path;
84 | [_ctrlView.layer addSublayer:trackLayer];
85 | _playStatus = trackLayer;
86 |
87 | CGPathRelease(path);
88 | }
89 |
90 | - (void)tapAction {
91 | if (_isPlaying) {
92 | [_player pause];
93 | }
94 | else {
95 | [_player play];
96 | }
97 | _isPlaying = !_isPlaying;
98 | _playStatus.hidden = !_playStatus.hidden;
99 | }
100 |
101 | - (void)playEnd {
102 |
103 | if (!_autoReplay) {
104 | return;
105 | }
106 | [_player seekToTime:kCMTimeZero completionHandler:^(BOOL finished) {
107 | [_player play];
108 | }];
109 | }
110 |
111 | - (void)removeFromSuperview {
112 | [_player.currentItem cancelPendingSeeks];
113 | [_player.currentItem.asset cancelLoading];
114 | [[NSNotificationCenter defaultCenter] removeObserver:self ];
115 | [super removeFromSuperview];
116 | }
117 |
118 | - (void)dealloc {
119 | // NSLog(@"player dalloc");
120 | }
121 | @end
122 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/KZSmallVideoRecorder/KZSmallVideoRecorder/KZVideoSupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // KZVideoSupport.h
3 | // KZWeChatSmallVideo_OC
4 | //
5 | // Created by HouKangzhu on 16/7/19.
6 | // Copyright © 2016年 侯康柱. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "KZVideoConfig.h"
11 | @class KZVideoModel;
12 |
13 | //************* 录视频 顶部 状态 条 ****************
14 | @interface KZStatusBar : UIView
15 |
16 | - (instancetype)initWithFrame:(CGRect)frame style:(KZVideoViewShowType)style;
17 |
18 | //取消录制
19 | - (void)addCancelTarget:(id)target selector:(SEL)selector;
20 |
21 | //更改前后摄像头
22 | - (void)addChangeCameraSegmentedControlClick:(id)target selector:(SEL)selector;
23 |
24 | //更改闪光灯
25 | - (void)addFlashTarget:(id)target selector:(SEL)selector;
26 |
27 | @property (nonatomic, assign) BOOL isRecoding;
28 |
29 | @end
30 |
31 |
32 | //************* 关闭的下箭头按钮 ****************
33 | @interface KZCloseBtn : UIButton
34 |
35 | @property (nonatomic,strong) NSArray *gradientColors; //CGColorRef
36 |
37 |
38 | @end
39 |
40 | //************* 点击录制的按钮 ****************
41 | @interface KZRecordBtn : UIView
42 |
43 | - (instancetype)initWithFrame:(CGRect)frame style:(KZVideoViewShowType)style;
44 |
45 | @end
46 |
47 |
48 | //************* 聚焦的方框 ****************
49 | @interface KZFocusView : UIView
50 |
51 | - (void)focusing;
52 |
53 | @end
54 |
55 | //************* 眼睛 ****************
56 | @interface KZEyeView : UIView
57 |
58 | @end
59 |
60 | //************* 录视频下部的控制条 ****************
61 | typedef NS_ENUM(NSUInteger, KZRecordCancelReason) {
62 | KZRecordCancelReasonDefault,
63 | KZRecordCancelReasonTimeShort,
64 | KZRecordCancelReasonUnknown,
65 | };
66 |
67 | @class KZControllerBar;
68 | @protocol KZControllerBarDelegate
69 |
70 | @optional
71 |
72 | - (void)ctrollVideoDidStart:(KZControllerBar *)controllerBar;
73 |
74 | - (void)ctrollVideoDidEnd:(KZControllerBar *)controllerBar;
75 |
76 | - (void)ctrollVideoDidCancel:(KZControllerBar *)controllerBar reason:(KZRecordCancelReason)reason;
77 |
78 | - (void)ctrollVideoWillCancel:(KZControllerBar *)controllerBar;
79 |
80 | - (void)ctrollVideoDidRecordSEC:(KZControllerBar *)controllerBar;
81 |
82 | - (void)ctrollVideoDidClose:(KZControllerBar *)controllerBar;
83 |
84 | - (void)ctrollVideoOpenVideoList:(KZControllerBar *)controllerBar;
85 |
86 | @end
87 | //************* 录视频下部的控制条 ****************
88 | @interface KZControllerBar : UIView
89 |
90 | @property (nonatomic, assign) id delegate;
91 |
92 | - (void)setupSubViewsWithStyle:(KZVideoViewShowType)style;
93 |
94 | @end
95 |
96 | //************************* Video List 控件 **************************
97 |
98 | //************* 删除视频的圆形叉叉 ****************
99 | @interface KZCircleCloseBtn : UIButton
100 |
101 | @end
102 |
103 | //************* 视频列表 ****************
104 | @interface KZVideoListCell:UICollectionViewCell
105 |
106 | @property (nonatomic, strong) KZVideoModel *videoModel;
107 |
108 | @property (nonatomic, strong) void(^deleteVideoBlock)(KZVideoModel *);
109 |
110 | - (void)setEdit:(BOOL)canEdit;
111 |
112 | @end
113 |
114 | //************* 视频列表的添加 ****************
115 | @interface KZAddNewVideoCell : UICollectionViewCell
116 |
117 | @end
118 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/KZSmallVideoRecorder/KZSmallVideoRecorder/KZVideoViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // KZVideoViewController.h
3 | // KZWeChatSmallVideo_OC
4 | //
5 | // Created by HouKangzhu on 16/7/18.
6 | // Copyright © 2016年 侯康柱. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "KZVideoConfig.h"
11 | @protocol KZVideoViewControllerDelegate;
12 |
13 | // 主类 更多自定义..修改KZVideoConfig.h里面的define
14 | @interface KZVideoViewController : NSObject
15 |
16 | @property (nonatomic, strong, readonly) UIView *view;
17 |
18 | @property (nonatomic, strong, readonly) UIView *actionView;
19 |
20 | //保存到相册
21 | @property (nonatomic, assign) BOOL savePhotoAlbum;
22 |
23 | @property (nonatomic, assign) id delegate;
24 |
25 | - (void)startAnimationWithType:(KZVideoViewShowType)showType;
26 |
27 | //- (void)endAniamtion;
28 |
29 | @end
30 |
31 | @protocol KZVideoViewControllerDelegate
32 |
33 | @required
34 | - (void)videoViewController:(KZVideoViewController *)videoController didRecordVideo:(KZVideoModel *)videoModel;
35 |
36 | @optional
37 | - (void)videoViewControllerDidCancel:(KZVideoViewController *)videoController;
38 |
39 | @end
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/KZSmallVideoRecorder/LICENSE:
--------------------------------------------------------------------------------
1 | LICENSE
2 | Created by HouKangzhu on 16/7/26.
3 | Copyright © 2016年 侯康柱. All rights reserved.
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/KZSmallVideoRecorder/README.md:
--------------------------------------------------------------------------------
1 | # KZWeChatSmallVideo-OC
2 | **仿微信小视频的录制 Objective-C 版**
3 |
4 | 高仿微信小视频录制, (微信6.3版本)
5 |
6 | 有两种风格 聊天界面和朋友圈界面
7 |
8 | 效果图1
9 |
10 | 
11 |
12 | 效果图2
13 |
14 | 
15 |
16 | **cocoapod 地址:**
17 |
18 | ```
19 | pod 'KZSmallVideoRecorder', '~> 1.0.4'
20 | ```
21 |
22 | **导入**
23 |
24 | ```
25 | #import "KZVideoViewController.h"
26 | ```
27 |
28 | **调用方法**
29 |
30 | ```
31 | KZVideoViewController *videoVC = [[KZVideoViewController alloc] init];
32 | videoVC.delegate = self;
33 | [videoVC startAnimationWithType:KZVideoViewShowTypeSmall];
34 | ```
35 |
36 | **显示风格**
37 |
38 | ```
39 | KZVideoViewShowTypeSmall, // 小屏幕 ...聊天界面的
40 | KZVideoViewShowTypeSingle, // 全屏 ... 朋友圈界面的
41 | ```
42 | **实现代理方法**
43 |
44 | ```
45 | - (void)videoViewController:(KZVideoViewController *)videoController didRecordVideo:(KZVideoModel *)videoModel;
46 | ```
47 |
48 | 视频model属性
49 |
50 | ```
51 | @interface KZVideoModel : NSObject
52 | @property (nonatomic, copy) NSString *videoAbsolutePath; // 完整视频 本地路径
53 | @property (nonatomic, copy) NSString *thumAbsolutePath; // 缩略图 路径
54 | @property (nonatomic, assign) NSDate *recordTime; // 录制时间
55 | @end
56 | ```
57 | 压缩视频, 录制分辨率可配置
58 |
59 | 在 (宽 : 高=320px) = 4:3 情况下 录制视频 10秒大小 2M左右
60 |
61 | 全部按钮图片等使用 CALayer 或者Context 绘制
62 |
63 | ####修改视频分辨率,保存路径等直接改KZVideoConfig.h文件的定义
64 |
65 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/LGAudioKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // LGAudioKit.h
3 | // 下载地址:https://github.com/gang544043963/LGAudioKit
4 | //
5 | // Created by ligang on 16/8/20.
6 | // Copyright © 2016年 LG. All rights reserved.
7 | //
8 |
9 | #ifndef LGAudioKit_h
10 | #define LGAudioKit_h
11 |
12 | #import "LGSoundRecorder.h"
13 | #import "LGAudioPlayer.h"
14 |
15 | #endif /* LGAudioKit_h */
16 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/LGMessageModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // LGMessageModel.h
3 | // 下载地址:https://github.com/gang544043963/LGAudioKit
4 | //
5 | // Created by ligang on 16/8/20.
6 | // Copyright © 2016年 LG. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface LGMessageModel : NSObject
12 |
13 | @property (nonatomic, copy) NSString *soundFilePath;
14 | @property (nonatomic, assign) NSTimeInterval seconds;
15 | @property (nonatomic, copy) NSString *mp3FilePath;
16 | @end
17 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/LGMessageModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // LGMessageModel.m
3 | // 下载地址:https://github.com/gang544043963/LGAudioKit
4 | //
5 | // Created by ligang on 16/8/20.
6 | // Copyright © 2016年 LG. All rights reserved.
7 | //
8 |
9 | #import "LGMessageModel.h"
10 |
11 | @implementation LGMessageModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/LGSoundPlayer/LGAudioPlayer.h:
--------------------------------------------------------------------------------
1 | //
2 | // LGAudioPlayer.h
3 | // 下载地址:https://github.com/gang544043963/LGAudioKit
4 | //
5 | // Created by ligang on 16/8/20.
6 | // Copyright © 2016年 LG. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 |
14 | typedef NS_ENUM(NSUInteger, LGAudioPlayerState){
15 | LGAudioPlayerStateNormal = 0,/**< 未播放状态 */
16 | LGAudioPlayerStatePlaying = 2,/**< 正在播放 */
17 | LGAudioPlayerStateCancel = 3,/**< 播放被取消 */
18 | };
19 |
20 | @protocol LGAudioPlayerDelegate
21 |
22 | - (void)audioPlayerStateDidChanged:(LGAudioPlayerState)audioPlayerState forIndex:(NSUInteger)index;
23 |
24 | @end
25 |
26 | @interface LGAudioPlayer : NSObject
27 |
28 | @property (nonatomic, copy) NSString *URLString;
29 | @property (nonatomic, assign) NSUInteger index;
30 | @property (nonatomic, weak) iddelegate;
31 | @property (nonatomic, strong) AVAudioPlayer *audioPlayer;
32 | @property (nonatomic, strong) UIButton* playerButton;
33 |
34 | + (instancetype)sharePlayer;
35 |
36 | - (void)playAudioWithURLString:(NSString *)URLString atIndex:(NSUInteger)index withParentButton:(UIButton*)playerButton;
37 |
38 | - (void)stopAudioPlayer;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/LGSoundRecorder/LGSoundRecorder.h:
--------------------------------------------------------------------------------
1 | //
2 | // LGSoundRecorder.h
3 | // 下载地址:https://github.com/gang544043963/LGAudioKit
4 | //
5 | // Created by ligang on 16/8/20.
6 | // Copyright © 2016年 LG. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | @protocol LGSoundRecorderDelegate
14 |
15 | - (void)showSoundRecordFailed;
16 | - (void)didStopSoundRecord;
17 |
18 | @end
19 |
20 | @interface LGSoundRecorder : NSObject
21 |
22 | @property (nonatomic, copy) NSString *soundFilePath;
23 | @property (nonatomic, weak) iddelegate;
24 |
25 | + (LGSoundRecorder *)shareInstance;
26 | /**
27 | * 开始录音
28 | *
29 | * @param view 展现录音指示框的父视图
30 | * @param path 音频文件保存路径
31 | */
32 | - (void)startSoundRecord:(UIView *)view recordPath:(NSString *)path;
33 | /**
34 | * 录音结束
35 | */
36 | - (void)stopSoundRecord:(UIView *)view;
37 | /**
38 | * 更新录音显示状态,手指向上滑动后 提示松开取消录音
39 | */
40 | - (void)soundRecordFailed:(UIView *)view;
41 | /**
42 | * 更新录音状态,手指重新滑动到范围内,提示向上取消录音
43 | */
44 | - (void)readyCancelSound;
45 | /**
46 | * 更新录音状态,手指重新滑动到范围内,提示向上取消录音
47 | */
48 | - (void)resetNormalRecord;
49 | /**
50 | * 录音时间过短
51 | */
52 | - (void)showShotTimeSign:(UIView *)view ;
53 | /**
54 | * 最后10秒,显示你还可以说X秒
55 | *
56 | * @param countDown X秒
57 | */
58 | - (void)showCountdown:(int)countDown;
59 |
60 | - (NSTimeInterval)soundRecordTime;
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Resource/toast_cancelsend@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Resource/toast_cancelsend@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Resource/toast_microphone@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Resource/toast_microphone@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Resource/toast_timeshort@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Resource/toast_timeshort@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_1@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_2@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_3@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_3@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_4@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_4@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_5@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_6@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_6@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_7@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Resource/toast_vol_7@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Vendor/AMR/amrFileCodec.h:
--------------------------------------------------------------------------------
1 | //
2 | // amrFileCodec.h
3 | // amrDemoForiOS
4 | //
5 | // Created by Tang Xiaoping on 9/27/11.
6 | // Copyright 2011 test. All rights reserved.
7 | //
8 | #ifndef amrFileCodec_h
9 | #define amrFileCodec_h
10 | #include
11 | #include
12 | #include
13 | #include "interf_dec.h"
14 | #include "interf_enc.h"
15 | #import
16 |
17 | #define AMR_MAGIC_NUMBER "#!AMR\n"
18 |
19 | #define PCM_FRAME_SIZE 160 // 8khz 8000*0.02=160
20 | #define MAX_AMR_FRAME_SIZE 32
21 | #define AMR_FRAME_COUNT_PER_SECOND 50
22 |
23 | typedef struct
24 | {
25 | char chChunkID[4];
26 | int nChunkSize;
27 | }XCHUNKHEADER;
28 |
29 | typedef struct
30 | {
31 | short nFormatTag;
32 | short nChannels;
33 | int nSamplesPerSec;
34 | int nAvgBytesPerSec;
35 | short nBlockAlign;
36 | short nBitsPerSample;
37 | }WAVEFORMAT;
38 |
39 | typedef struct
40 | {
41 | short nFormatTag;
42 | short nChannels;
43 | int nSamplesPerSec;
44 | int nAvgBytesPerSec;
45 | short nBlockAlign;
46 | short nBitsPerSample;
47 | short nExSize;
48 | }WAVEFORMATX;
49 |
50 | typedef struct
51 | {
52 | char chRiffID[4];
53 | int nRiffSize;
54 | char chRiffFormat[4];
55 | }RIFFHEADER;
56 |
57 | typedef struct
58 | {
59 | char chFmtID[4];
60 | int nFmtSize;
61 | WAVEFORMAT wf;
62 | }FMTBLOCK;
63 |
64 | // WAVE音频采样频率是8khz
65 | // 音频样本单元数 = 8000*0.02 = 160 (由采样频率决定)
66 | // 声道数 1 : 160
67 | // 2 : 160*2 = 320
68 | // bps决定样本(sample)大小
69 | // bps = 8 --> 8位 unsigned char
70 | // 16 --> 16位 unsigned short
71 | int EncodeWAVEFileToAMRFile(const char* pchWAVEFilename, const char* pchAMRFileName, int nChannels, int nBitsPerSample);
72 |
73 |
74 | // 将AMR文件解码成WAVE文件
75 | int DecodeAMRFileToWAVEFile(const char* pchAMRFileName, const char* pchWAVEFilename);
76 |
77 |
78 | NSData* DecodeAMRToWAVE(NSData* data);
79 | NSData* EncodeWAVEToAMR(NSData* data, int nChannels, int nBitsPerSample);
80 |
81 | #endif
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Vendor/AMR/include/opencore-amrnb/interf_dec.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 2009 Martin Storsjo
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifndef OPENCORE_AMRNB_INTERF_DEC_H
20 | #define OPENCORE_AMRNB_INTERF_DEC_H
21 |
22 | #ifdef __cplusplus
23 | extern "C" {
24 | #endif
25 |
26 | void* Decoder_Interface_init(void);
27 | void Decoder_Interface_exit(void* state);
28 | void Decoder_Interface_Decode(void* state, const unsigned char* in, short* out, int bfi);
29 |
30 | #ifdef __cplusplus
31 | }
32 | #endif
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Vendor/AMR/include/opencore-amrnb/interf_enc.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 2009 Martin Storsjo
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifndef OPENCORE_AMRNB_INTERF_ENC_H
20 | #define OPENCORE_AMRNB_INTERF_ENC_H
21 |
22 | #ifdef __cplusplus
23 | extern "C" {
24 | #endif
25 |
26 | #ifndef AMRNB_WRAPPER_INTERNAL
27 | /* Copied from enc/src/gsmamr_enc.h */
28 | enum Mode {
29 | MR475 = 0,/* 4.75 kbps */
30 | MR515, /* 5.15 kbps */
31 | MR59, /* 5.90 kbps */
32 | MR67, /* 6.70 kbps */
33 | MR74, /* 7.40 kbps */
34 | MR795, /* 7.95 kbps */
35 | MR102, /* 10.2 kbps */
36 | MR122, /* 12.2 kbps */
37 | MRDTX, /* DTX */
38 | N_MODES /* Not Used */
39 | };
40 | #endif
41 |
42 | void* Encoder_Interface_init(int dtx);
43 | void Encoder_Interface_exit(void* state);
44 | int Encoder_Interface_Encode(void* state, enum Mode mode, const short* speech, unsigned char* out, int forceSpeech);
45 |
46 | #ifdef __cplusplus
47 | }
48 | #endif
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Vendor/AMR/include/opencore-amrwb/dec_if.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 2009 Martin Storsjo
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifndef OPENCORE_AMRWB_DEC_IF_H
20 | #define OPENCORE_AMRWB_DEC_IF_H
21 |
22 | #ifdef __cplusplus
23 | extern "C" {
24 | #endif
25 |
26 | #define _good_frame 0
27 |
28 | void* D_IF_init(void);
29 | void D_IF_decode(void* state, const unsigned char* bits, short* synth, int bfi);
30 | void D_IF_exit(void* state);
31 |
32 | #ifdef __cplusplus
33 | }
34 | #endif
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Vendor/AMR/include/opencore-amrwb/if_rom.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 2009 Martin Storsjo
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifndef OPENCORE_AMRWB_IF_ROM_H
20 | #define OPENCORE_AMRWB_IF_ROM_H
21 |
22 | #ifdef __cplusplus
23 | extern "C" {
24 | #endif
25 |
26 | #include
27 | typedef int16_t Word16;
28 |
29 | #ifdef __cplusplus
30 | }
31 | #endif
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Vendor/AMR/lib/libopencore-amrnb.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Vendor/AMR/lib/libopencore-amrnb.a
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/Vendor/AMR/lib/libopencore-amrwb.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/Vendor/AMR/lib/libopencore-amrwb.a
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/LGSound/lame/libmp3lame.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/LGSound/lame/libmp3lame.a
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/MBProgress+/MBProgressHUD+MJ.h:
--------------------------------------------------------------------------------
1 | //
2 | // MBProgressHUD+MJ.h
3 | // ImageAndVideoAndRecord
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MBProgressHUD (MJ)
12 |
13 |
14 | + (void)showSuccess:(NSString *)success toView:(UIView *)view;
15 | + (void)showError:(NSString *)error toView:(UIView *)view;
16 |
17 | + (MBProgressHUD *)showMessage:(NSString *)message toView:(UIView *)view;
18 |
19 |
20 | + (void)showSuccess:(NSString *)success;
21 | + (void)showError:(NSString *)error;
22 |
23 | + (MBProgressHUD *)showMessage:(NSString *)message;
24 |
25 | + (void)showProcessHud:(NSString *)msg toView:(UIView *)view;
26 |
27 | + (void)hideHUDForView:(UIView *)view;
28 | + (void)hideHUD;
29 |
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/MBProgress+/MBProgressHUD+MJ.m:
--------------------------------------------------------------------------------
1 | //
2 | // MBProgressHUD+MJ.m
3 | // ImageAndVideoAndRecord
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import "MBProgressHUD+MJ.h"
10 |
11 | @implementation MBProgressHUD (MJ)
12 |
13 |
14 |
15 | #pragma mark 显示信息
16 | + (void)show:(NSString *)text icon:(NSString *)icon view:(UIView *)view
17 | {
18 | if (view == nil) view = [[UIApplication sharedApplication].windows lastObject];
19 | // 快速显示一个提示信息
20 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
21 | hud.labelText = text;
22 | // 设置图片
23 | hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:[NSString stringWithFormat:@"MBProgressHUD.bundle/%@", icon]]];
24 | // 再设置模式
25 | hud.mode = MBProgressHUDModeCustomView;
26 |
27 | // 隐藏时候从父控件中移除
28 | hud.removeFromSuperViewOnHide = YES;
29 |
30 | // 1秒之后再消失
31 | [hud hide:YES afterDelay:0.7];
32 | }
33 |
34 | #pragma mark 显示错误信息
35 | + (void)showError:(NSString *)error toView:(UIView *)view{
36 | [self show:error icon:@"error.png" view:view];
37 | }
38 |
39 | + (void)showSuccess:(NSString *)success toView:(UIView *)view
40 | {
41 | [self show:success icon:@"success.png" view:view];
42 | }
43 |
44 | #pragma mark 显示一些信息
45 | + (MBProgressHUD *)showMessage:(NSString *)message toView:(UIView *)view {
46 | if (view == nil) view = [[UIApplication sharedApplication].windows lastObject];
47 | // 快速显示一个提示信息
48 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
49 | hud.labelText = message;
50 | // 隐藏时候从父控件中移除
51 | hud.removeFromSuperViewOnHide = YES;
52 | // YES代表需要蒙版效果
53 | hud.dimBackground = YES;
54 | return hud;
55 | }
56 |
57 | + (void)showSuccess:(NSString *)success
58 | {
59 | [self showSuccess:success toView:nil];
60 | }
61 |
62 | + (void)showError:(NSString *)error
63 | {
64 | [self showError:error toView:nil];
65 | }
66 |
67 | + (MBProgressHUD *)showMessage:(NSString *)message
68 | {
69 | return [self showMessage:message toView:nil];
70 | }
71 |
72 | + (void)hideHUDForView:(UIView *)view
73 | {
74 | [self hideHUDForView:view animated:YES];
75 | }
76 |
77 | + (void)hideHUD
78 | {
79 | [self hideHUDForView:nil];
80 | }
81 |
82 |
83 | + (void)showProcessHud:(NSString *)msg toView:(UIView *)view{
84 |
85 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:view];
86 | [view addSubview:hud];
87 | hud.removeFromSuperViewOnHide = YES;
88 | hud.mode = MBProgressHUDModeIndeterminate;
89 | hud.labelText = msg;
90 | [hud show:NO];
91 | }
92 |
93 |
94 |
95 | @end
96 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/PlaceholderTextView/PlaceholderTextView.h:
--------------------------------------------------------------------------------
1 | //
2 | // PlaceholderTextView.h
3 | // 全民社区
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 YCompany. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface PlaceholderTextView : UITextView
12 |
13 | @property (nonatomic, strong) UILabel * placeHolderLabel;
14 |
15 | @property (nonatomic, copy) NSString * placeholder;
16 |
17 | @property (nonatomic, strong) UIColor * placeholderColor;
18 |
19 | @property (nonatomic, copy) NSString* content;
20 |
21 | - (void)textChanged:(NSNotification * )notification;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/PlaceholderTextView/PlaceholderTextView.m:
--------------------------------------------------------------------------------
1 | //
2 | // PlaceholderTextView.m
3 | // 全民社区
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 YCompany. All rights reserved.
7 | //
8 |
9 | #import "PlaceholderTextView.h"
10 |
11 | @implementation PlaceholderTextView
12 |
13 |
14 |
15 | -(instancetype)initWithFrame:(CGRect)frame{
16 |
17 | if (self = [super initWithFrame:frame]) {
18 |
19 | [self setPlaceholder:@""];
20 |
21 | [self setPlaceholderColor:[UIColor lightGrayColor]];
22 |
23 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textChanged:) name:UITextViewTextDidChangeNotification object:nil];
24 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textChangedFinished:) name:UITextViewTextDidEndEditingNotification object:nil];
25 |
26 | }
27 |
28 | return self;
29 | }
30 |
31 | -(void)setPlaceholder:(NSString *)placeholder{
32 |
33 | if (_placeholder != placeholder) {
34 |
35 | _placeholder = placeholder;
36 |
37 | [self.placeHolderLabel removeFromSuperview];
38 |
39 | self.placeHolderLabel = nil;
40 |
41 | [self setNeedsDisplay];
42 |
43 |
44 | }
45 |
46 | }
47 |
48 | - (void)textChanged:(NSNotification *)notification{
49 |
50 | if ([[self placeholder] length] == 0) {
51 | return;
52 | }
53 |
54 | if ([[self text] length] == 0) {
55 | [[self viewWithTag:999] setAlpha:1.0];
56 | }
57 |
58 | else{
59 |
60 | [[self viewWithTag:999] setAlpha:0];
61 | }
62 |
63 | }
64 |
65 | - (void)textChangedFinished:(NSNotification*)notification{
66 |
67 | // self.text = [notification.object objectForKey:@"text"];
68 |
69 | NSLog(@"%@",notification.object);
70 |
71 | NSLog(@"%@",self.text);
72 |
73 | }
74 |
75 |
76 | -(void)drawRect:(CGRect)rect{
77 |
78 | [super drawRect:rect];
79 |
80 | if ([[self placeholder] length] > 0) {
81 | if (_placeHolderLabel == nil) {
82 | _placeHolderLabel = [[UILabel alloc]initWithFrame:CGRectMake(8, 8, self.bounds.size.width - 16, 0)];
83 | _placeHolderLabel.lineBreakMode = NSLineBreakByWordWrapping;
84 | _placeHolderLabel.numberOfLines = 0;
85 | _placeHolderLabel.font = self.font;
86 | _placeHolderLabel.backgroundColor = [UIColor clearColor];
87 | _placeHolderLabel.textColor = self.placeholderColor;
88 | _placeHolderLabel.alpha = 0;
89 | _placeHolderLabel.tag = 999;
90 | [self addSubview:_placeHolderLabel];
91 | }
92 | _placeHolderLabel.text = self.placeholder;
93 | [_placeHolderLabel sizeToFit];
94 | [self sendSubviewToBack:_placeHolderLabel];
95 | }
96 |
97 | if ([[self text] length] == 0 && [[self placeholder] length] >0) {
98 | [[self viewWithTag:999] setAlpha:1.0];
99 | }
100 |
101 | }
102 |
103 |
104 | /*
105 | // Only override drawRect: if you perform custom drawing.
106 | // An empty implementation adversely affects performance during animation.
107 | - (void)drawRect:(CGRect)rect {
108 | // Drawing code
109 | }
110 | */
111 |
112 | @end
113 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ShowView/showVideoView.h:
--------------------------------------------------------------------------------
1 | //
2 | // showVideoView.h
3 | // BaseFramework
4 | //
5 | // Created by 李丹阳 on 2016/11/22.
6 | // Copyright © 2016年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "KZVideoViewController.h"
12 | #import "KZVideoPlayer.h"
13 | #import "KZVideoConfig.h"
14 | #import "LGMessageModel.h"
15 |
16 |
17 | @interface showVideoView : UIView
18 |
19 |
20 | @property (nonatomic,strong)NSMutableArray* imgeArray;
21 |
22 | @property (nonatomic,strong)KZVideoModel* videoModel;
23 |
24 | @property (nonatomic,strong)KZVideoPlayer *player;
25 |
26 | @property (nonatomic,strong)LGMessageModel *messageModel;
27 |
28 | @property (nonatomic, assign) BOOL isVideo;
29 | @property (nonatomic, assign) BOOL isPhoto;
30 | @property (nonatomic, assign) BOOL isRecord;
31 |
32 | @property (nonatomic, strong) UIButton* addImageButton;
33 | @property (nonatomic, strong) UIButton* addVideoButton;
34 | @property (nonatomic, strong) UIButton* addRecordButton;
35 |
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/UIView+/UIView+Size.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Size.h
3 | // ImageAndVideoAndRecord
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (Size)
12 |
13 | CGPoint CGRectGetCenter(CGRect rect);
14 | CGRect CGRectMoveToCenter(CGRect rect, CGPoint center);
15 |
16 | @property CGPoint origin;
17 | @property CGSize size;
18 |
19 | @property (readonly) CGPoint bottomLeft;
20 | @property (readonly) CGPoint bottomRight;
21 | @property (readonly) CGPoint topRight;
22 |
23 | @property CGFloat height;
24 | @property CGFloat width;
25 |
26 | @property CGFloat top;
27 | @property CGFloat left;
28 |
29 | @property CGFloat bottom;
30 | @property CGFloat right;
31 |
32 | - (void) moveBy: (CGPoint) delta;
33 | - (void) scaleBy: (CGFloat) scaleFactor;
34 | - (void) fitInSize: (CGSize) aSize;
35 |
36 | //获得视图的父控制器
37 | - (UIViewController *)getParentviewController;
38 | //设置push后的界面的leftItem只是箭头,且title为白色
39 | - (void)setPushToViewLeftItemNil;
40 | - (void)setTabBarPushToViewLeftItemNil;
41 |
42 | //把颜色转为图片
43 | + (UIImage *)createImageWithColor: (UIColor *) color;
44 |
45 | + (UIImage *)createImageWithColor: (UIColor *) color size:(CGSize)size;
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // ImageAndVideoAndRecord
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Other/UIImageHandle.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImageHandle.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 16/1/4.
6 | // Copyright © 2016年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | @interface UIImageHandle : NSObject
12 |
13 | /**
14 | * 等比例缩放图片
15 | *
16 | * @param image 原始图片
17 | * @param multiple 等比缩放倍数
18 | *
19 | * @return 缩放之后的图片
20 | */
21 | +(UIImage*)scaleImage:(UIImage *)image multiple:(CGFloat) multiple;
22 |
23 | /**
24 | * 图片压缩
25 | *
26 | * @param image 原始图片
27 | *
28 | * @return 压缩后的如偏
29 | */
30 | +(UIImage *)compressImage:(UIImage *)artWork;
31 |
32 | /**
33 | * 裁剪图片
34 | *
35 | * @param image 原始图片
36 | * @param rect 参见矩形区域
37 | *
38 | * @return 裁剪之后的图片
39 | */
40 | +(UIImage *)cutRectangleImage:(UIImage *)image rect:(CGRect)rect;
41 |
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Other/UIImageHandle.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImageHandle.m
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 16/1/4.
6 | // Copyright © 2016年 zzl. All rights reserved.
7 | //
8 |
9 | #import "UIImageHandle.h"
10 |
11 | @implementation UIImageHandle
12 |
13 | +(UIImage*)scaleImage:(UIImage *)image multiple:(CGFloat) multiple
14 | {
15 | CGSize size = CGSizeMake(image.size.width * multiple, image.size.height * multiple);
16 |
17 | UIGraphicsBeginImageContext(size);
18 |
19 | [image drawInRect:CGRectMake(0,0,size.width,size.height)];
20 |
21 | UIImage*newImage=UIGraphicsGetImageFromCurrentImageContext();
22 |
23 | UIGraphicsEndImageContext();
24 |
25 | return newImage;
26 | }
27 |
28 |
29 | +(UIImage *)compressImage:(UIImage *)artWork
30 | {
31 |
32 | NSData *data2 = UIImageJPEGRepresentation(artWork, 0.7);
33 | UIImage *image = [UIImage imageWithData:data2];
34 |
35 | return image;
36 | }
37 |
38 | +(UIImage*)cutRectangleImage:(UIImage *)image rect:(CGRect)rect
39 | {
40 | CGImageRef subImageRef = CGImageCreateWithImageInRect(image.CGImage, rect);
41 |
42 | CGRect cutBounds = CGRectMake(0, 0, CGImageGetWidth(subImageRef), CGImageGetHeight(subImageRef));
43 |
44 | UIGraphicsBeginImageContext(cutBounds.size);
45 |
46 | CGContextRef context = UIGraphicsGetCurrentContext();
47 |
48 | CGContextDrawImage(context, cutBounds, subImageRef);
49 |
50 | UIImage* cutImage = [UIImage imageWithCGImage:subImageRef];
51 |
52 | UIGraphicsEndImageContext();
53 |
54 | return cutImage;
55 | }
56 |
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Other/ZZAlumAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZAlumAnimation.h
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/19.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | @interface ZZAlumAnimation : NSObject
12 |
13 | +(ZZAlumAnimation *)sharedAnimation;
14 |
15 | -(void) roundAnimation:(UILabel *)label;
16 |
17 | -(void) selectAnimation:(UIButton *)button;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Other/ZZAlumAnimation.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZAlumAnimation.m
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/19.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import "ZZAlumAnimation.h"
10 |
11 | @implementation ZZAlumAnimation
12 |
13 | +(ZZAlumAnimation *)sharedAnimation
14 | {
15 | static ZZAlumAnimation *animation = nil;
16 | if (animation == nil) {
17 | animation = [[ZZAlumAnimation alloc]init];
18 | }
19 | return animation;
20 | }
21 |
22 | -(void)roundAnimation:(UILabel *)label
23 | {
24 | CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
25 | animation.duration = 0.7;
26 |
27 | NSMutableArray *values = [NSMutableArray array];
28 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
29 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.2, 1.2, 1.0)]];
30 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 1.0)]];
31 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
32 | animation.values = values;
33 | [label.layer addAnimation:animation forKey:nil];
34 | }
35 |
36 | -(void)selectAnimation:(UIButton *)button
37 | {
38 | CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
39 | animation.duration = 0.5;
40 |
41 | NSMutableArray *values = [NSMutableArray array];
42 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
43 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.2, 1.2, 1.0)]];
44 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 1.0)]];
45 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
46 | animation.values = values;
47 | [button.layer addAnimation:animation forKey:nil];
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/back_button_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/back_button_normal.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/camera_focus_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/camera_focus_pic.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/change_camera_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/change_camera_pic.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/determiner_s@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/determiner_s@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/determiner_s@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/determiner_s@3x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/flash_close_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/flash_close_pic.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/flash_open_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/flash_open_pic.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/no_data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/no_data.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/photo_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/photo_add.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/remove_btn_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/remove_btn_pic.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/select_no.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/select_no.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/select_yes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/select_yes.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/take_photo_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/take_photo_pic.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/take_photo_pic@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/take_photo_pic@2x.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/trash_btn_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/trash_btn_pic.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/zz_alumb_rightCell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageAndVideoAndRecord/ZZPhotoRE/Public/Resources/zz_alumb_rightCell.png
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/Public/ZZResourceConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZResourceConfig.h
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/19.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #ifndef ZZResourceConfig_h
10 | #define ZZResourceConfig_h
11 | /////配置文件/////
12 |
13 |
14 | /*
15 | 公共文件
16 | */
17 | #import
18 | #import
19 | #import
20 | #import
21 | #import "UIImageView+WebCache.h"
22 |
23 | #import
24 | #import
25 | #import
26 | #import
27 |
28 |
29 | /*
30 | 控制器
31 | */
32 | #define ZZ_VW (self.view.frame.size.width)
33 | #define ZZ_VH (self.view.frame.size.height)
34 |
35 | #define ZZ_SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
36 | #define ZZ_SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)
37 |
38 | /*
39 | 颜色
40 | */
41 | #define ZZ_RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]
42 | #define ZZ_RGB(r,g,b) ZZ_RGBA(r,g,b,1.0f)
43 |
44 | /*
45 | 图片
46 | */
47 |
48 | // 相册列表页面右边箭头图片
49 | #define PhotoListRightBtn [UIImage imageNamed:@"zz_alumb_rightCell.png"]
50 | // 相册列表页面,当没有数据时使用图片
51 | #define NOPhoto_Data_Pic [UIImage imageNamed:@"no_data.png"]
52 | // 图片选中状态图片
53 | #define Pic_Btn_Selected [UIImage imageNamed:@"determiner_s"]
54 | // 图片未选中状态图片
55 | #define Pic_btn_UnSelected [UIImage imageNamed:@"determiner"]
56 | // 拍照图片
57 | #define TakePhoto_Btn_Pic [UIImage imageNamed:@"take_photo_pic.png"]
58 | // 闪光灯按钮图片
59 | #define Flash_Open_Btn_Pic [UIImage imageNamed:@"flash_open_pic.png"]
60 | #define Flash_close_Btn_Pic [UIImage imageNamed:@"flash_close_pic.png"]
61 | // 切换前置后置摄像头按钮
62 | #define Change_Btn_Pic [UIImage imageNamed:@"change_camera_pic.png"]
63 | // 删除图片按钮
64 | #define Remove_Btn_Pic [UIImage imageNamed:@"remove_btn_pic.png"]
65 |
66 | /*
67 | 文字
68 | */
69 | // 相册详细页面底部Footer显示文字
70 | #define Total_Photo_Num @"%ld 张照片"
71 | #define Total_Video_Num @"%ld 个视频"
72 | #define Alert_Max_Selected @"最多只能选择%ld张图片"
73 | #define Alert_Max_TakePhoto @"最多连拍张数为%ld张图片"
74 |
75 |
76 | #endif /* ZZResourceConfig_h */
77 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZBrowser/ZZBrowserPickerCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZBrowserPickerCell.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/23.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | @interface ZZBrowserPickerCell : UICollectionViewCell
12 |
13 | @property (nonatomic, strong) UIImageView *pics;
14 |
15 | -(void)loadPHAssetItemForPics:(PHAsset *)assetItem;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZBrowser/ZZBrowserPickerCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZBrowserPickerCell.m
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/23.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import "ZZBrowserPickerCell.h"
10 | #import "UIImageHandle.h"
11 | @implementation ZZBrowserPickerCell
12 |
13 | -(instancetype)initWithFrame:(CGRect)frame
14 | {
15 | self = [super initWithFrame:frame];
16 | if (self) {
17 |
18 | _pics = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
19 | _pics.contentMode = UIViewContentModeScaleAspectFill;
20 | [self.contentView addSubview:_pics];
21 | }
22 | return self;
23 | }
24 |
25 | -(void)loadPHAssetItemForPics:(PHAsset *)assetItem
26 | {
27 | PHAsset *phAsset = (PHAsset *)assetItem;
28 |
29 | CGFloat photoWidth = [UIScreen mainScreen].bounds.size.width;
30 |
31 | CGFloat aspectRatio = phAsset.pixelWidth / (CGFloat)phAsset.pixelHeight;
32 | CGFloat multiple = [UIScreen mainScreen].scale;
33 | CGFloat pixelWidth = photoWidth * multiple;
34 | CGFloat pixelHeight = pixelWidth / aspectRatio;
35 |
36 | [[PHImageManager defaultManager] requestImageForAsset:phAsset targetSize:CGSizeMake(pixelWidth, pixelHeight) contentMode:PHImageContentModeAspectFit options:nil resultHandler:^(UIImage * _Nullable result, NSDictionary * _Nullable info) {
37 |
38 |
39 | BOOL downloadFinined = ![[info objectForKey:PHImageCancelledKey] boolValue] && ![info objectForKey:PHImageErrorKey] && ![[info objectForKey:PHImageResultIsDegradedKey] boolValue];
40 |
41 | //设置BOOL判断,确定返回高清照片
42 | if (downloadFinined) {
43 |
44 | self.pics.image = result;
45 |
46 | }
47 |
48 | }];
49 | }
50 | @end
51 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZBrowser/ZZBrowserPickerViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZBrowserPickerViewController.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/23.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 | #import "ZZResourceConfig.h"
12 |
13 | typedef NS_ENUM(NSInteger, ShowAnimation){
14 | ShowAnimationOfPush,
15 | ShowAnimationOfPresent
16 |
17 | };
18 | @class ZZBrowserPickerViewController;
19 |
20 | @protocol ZZBrowserPickerDelegate
21 |
22 | @required
23 | -(NSInteger)zzbrowserPickerPhotoNum:(ZZBrowserPickerViewController *)controller;
24 | -(NSArray *)zzbrowserPickerPhotoContent:(ZZBrowserPickerViewController *)controller;
25 |
26 | @optional
27 | -(void)zzbrowerPickerPhotoRemove:(NSInteger) indexPath;
28 |
29 | @end
30 |
31 | @interface ZZBrowserPickerViewController : UIViewController
32 |
33 | @property (assign, nonatomic) id delegate;
34 |
35 | //是否开启动画效果
36 | @property (assign, nonatomic) BOOL isOpenAnimation;
37 |
38 | @property (assign, nonatomic) NSInteger showAnimation;
39 | //滚动到指定位置(滚动到那张图片,通过下面属性)
40 | @property (strong, nonatomic) NSIndexPath *indexPath;
41 |
42 | -(void)reloadData;
43 |
44 | -(void)showIn:(UIViewController *)controller animation:(ShowAnimation)animation;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZBrowser/ZZPageControl.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPageControl.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/31.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ZZPageControl : UIView
12 |
13 | @property (assign,nonatomic) NSInteger currentPage;
14 | @property (strong,nonatomic) UILabel *pageControl;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZBrowser/ZZPageControl.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPageControl.m
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/31.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import "ZZPageControl.h"
10 |
11 | @implementation ZZPageControl
12 |
13 | -(instancetype)initWithFrame:(CGRect)frame
14 | {
15 | self = [super initWithFrame:frame];
16 | if (self) {
17 |
18 | _pageControl = [[UILabel alloc]initWithFrame:CGRectMake(5, 3, self.frame.size.width - 10, self.frame.size.height - 6)];
19 | _pageControl.backgroundColor = [UIColor clearColor];
20 | _pageControl.textAlignment = NSTextAlignmentCenter;
21 | [self addSubview:_pageControl];
22 | }
23 | return self;
24 | }
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZCamera/Controller/ZZCameraBrowerViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZCameraBrowerViewController.h
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/27.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class ZZCameraBrowerViewController;
12 |
13 | @protocol ZZCameraBrowerDataSource
14 |
15 | @required
16 | -(NSInteger)zzbrowserPickerPhotoNum:(ZZCameraBrowerViewController *)controller;
17 | -(NSArray *)zzbrowserPickerPhotoContent:(ZZCameraBrowerViewController *)controller;
18 |
19 | @end
20 |
21 | @interface ZZCameraBrowerViewController : UIViewController
22 |
23 | @property (assign, nonatomic) id delegate;
24 |
25 | //滚动到指定位置(滚动到那张图片,通过下面属性)
26 | @property (strong, nonatomic) NSIndexPath *indexPath;
27 |
28 | -(void)reloadData;
29 |
30 | -(void)showIn:(UIViewController *)controller;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZCamera/Controller/ZZCameraController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZCameraController.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/18.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 |
12 | typedef void(^ZZCameraResult)(id responseObject);
13 |
14 | @interface ZZCameraController : NSObject
15 |
16 | /*
17 | * 设置是否将拍完过后的照片直接保存到相册
18 | */
19 | @property (assign, nonatomic) BOOL isSaveLocal;
20 |
21 | /*
22 | * 设置最多连拍张数
23 | */
24 | @property (assign, nonatomic) NSInteger takePhotoOfMax;
25 |
26 |
27 | /*
28 | * 设置相机页面主题颜色,默认为黑色
29 | */
30 | @property (strong, nonatomic) UIColor *LLDthemeColor;
31 |
32 | -(void)showIn:(UIViewController *)controller result:(ZZCameraResult)result;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZCamera/Controller/ZZCameraController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZCameraController.m
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/18.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import "ZZCameraController.h"
10 | #import "ZZCameraPickerViewController.h"
11 | @interface ZZCameraController()
12 |
13 | @property (strong,nonatomic) ZZCameraPickerViewController *cameraPickerController;
14 |
15 | @end
16 |
17 | @implementation ZZCameraController
18 |
19 | -(ZZCameraPickerViewController *)cameraPickerController
20 | {
21 | if (!_cameraPickerController) {
22 | _cameraPickerController = [[ZZCameraPickerViewController alloc]init];
23 | }
24 | return _cameraPickerController;
25 | }
26 |
27 | -(void)showIn:(UIViewController *)controller result:(ZZCameraResult)result
28 | {
29 | self.cameraPickerController.CameraResult = result;
30 | //设置连拍最大张数
31 | self.cameraPickerController.takePhotoOfMax = self.takePhotoOfMax;
32 | //设置返回图片类型
33 | self.cameraPickerController.isSavelocal = self.isSaveLocal;
34 | self.cameraPickerController.LLDthemeColor = self.LLDthemeColor;
35 | [controller presentViewController:self.cameraPickerController animated:YES completion:nil];
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZCamera/Controller/ZZCameraPickerViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZCameraPickerViewController.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/18.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 |
12 | @interface ZZCameraPickerViewController : UIViewController
13 |
14 | @property (assign, nonatomic) BOOL isSavelocal;
15 |
16 | @property (assign, nonatomic) NSInteger takePhotoOfMax;
17 |
18 | @property (strong, nonatomic) UIColor *LLDthemeColor;
19 |
20 | @property (strong, nonatomic) void (^CameraResult)(id responseObject);
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZCamera/Model/ZZCamera.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZCamera.h
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/25.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ZZCamera : NSObject
12 |
13 | /**
14 | 照片
15 | */
16 | @property (nonatomic, strong) UIImage *image;
17 |
18 | /**
19 | 照片保存到相册中的时间
20 | */
21 | @property (nonatomic, copy) NSDate *createDate;
22 |
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZCamera/Model/ZZCamera.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZCamera.m
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/25.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import "ZZCamera.h"
10 |
11 | @implementation ZZCamera
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZCamera/View/ZZCameraFocusView.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZCameraFocusView.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/21.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class ZZCameraFocusView;
12 |
13 | @protocol ZZCameraFocusDelegate
14 |
15 | @optional
16 | -(void) cameraFocusOptions:(ZZCameraFocusView *)cameraFocu;
17 |
18 | @end
19 |
20 | @interface ZZCameraFocusView : UIView
21 |
22 | @property(strong,nonatomic) id delegate;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZCamera/View/ZZCameraFocusView.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZCameraFocusView.m
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/21.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import "ZZCameraFocusView.h"
10 |
11 | @interface ZZCameraFocusView()
12 |
13 | @property (strong, nonatomic) UIImageView *focus;
14 | @property (strong, nonatomic) NSTimer *timer;
15 |
16 | @end
17 |
18 | @implementation ZZCameraFocusView
19 |
20 | -(instancetype)initWithFrame:(CGRect)frame
21 | {
22 | self = [super initWithFrame:frame];
23 | if (self) {
24 | self.backgroundColor = [UIColor clearColor];
25 |
26 | _focus = [[UIImageView alloc]init];
27 | _focus.image = [UIImage imageNamed:@"camera_focus_pic.png"];
28 | }
29 | return self;
30 | }
31 |
32 | -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
33 | {
34 | UITouch *touch = [touches anyObject];
35 | CGPoint point = [touch locationInView:touch.view];
36 | _focus.frame = CGRectMake(0, 0, 80, 80);
37 | _focus.center = point;
38 | [self addSubview:_focus];
39 |
40 | [self shakeToShow:_focus];
41 |
42 | _timer = [NSTimer scheduledTimerWithTimeInterval:3.0f target:self selector:@selector(hideFocusView) userInfo:nil repeats:YES];
43 | if ([self.delegate respondsToSelector:@selector(cameraFocusOptions:)]) {
44 | [self.delegate cameraFocusOptions:self];
45 | }
46 | }
47 |
48 | - (void) shakeToShow:(UIView*)aView{
49 | CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
50 | animation.duration = 0.5;
51 |
52 | NSMutableArray *values = [NSMutableArray array];
53 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
54 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.2, 1.2, 1.0)]];
55 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 1.0)]];
56 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
57 | animation.values = values;
58 | [aView.layer addAnimation:animation forKey:nil];
59 | }
60 |
61 | -(void) hideFocusView
62 | {
63 | [_focus removeFromSuperview];
64 | [_timer invalidate];
65 | }
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZCamera/View/ZZCameraPickerCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZCameraPickerCell.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/18.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | @interface ZZCameraPickerCell : UICollectionViewCell
12 |
13 | @property(strong,nonatomic) UIImageView *pics;
14 | @property(strong,nonatomic) UIButton *removeBtn;
15 |
16 | -(void)loadPhotoDatas:(UIImage *)image;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZCamera/View/ZZCameraPickerCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZCameraPickerCell.m
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/18.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import "ZZCameraPickerCell.h"
10 |
11 |
12 |
13 | @implementation ZZCameraPickerCell
14 |
15 | -(instancetype)initWithFrame:(CGRect)frame
16 | {
17 | self = [super initWithFrame:frame];
18 | if (self) {
19 |
20 |
21 | _pics = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, (ZZ_SCREEN_WIDTH - 60) / 5, (ZZ_SCREEN_WIDTH - 60) / 5)];
22 |
23 | _pics.contentMode = UIViewContentModeScaleAspectFill;
24 |
25 | [self.contentView addSubview:_pics];
26 |
27 |
28 | _removeBtn = [[UIButton alloc]initWithFrame:CGRectMake((ZZ_SCREEN_WIDTH - 60) / 5 -20, 0, 20, 20)];
29 | [_removeBtn setImage:Remove_Btn_Pic forState:UIControlStateNormal];
30 |
31 | [self.contentView addSubview:_removeBtn];
32 |
33 | }
34 | return self;
35 |
36 | }
37 |
38 | //载入数据
39 | -(void)loadPhotoDatas:(UIImage *)image
40 | {
41 | _pics.image = image;
42 |
43 | }
44 | @end
45 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/Controller/ZZPhotoBrowerViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoBrowerViewController.h
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/27.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 |
12 | @class ZZPhotoBrowerViewController;
13 |
14 | @protocol ZZPhotoBrowerDataSource
15 |
16 | @required
17 | -(NSInteger)zzbrowserPickerPhotoNum:(ZZPhotoBrowerViewController *)controller;
18 | -(NSArray *)zzbrowserPickerPhotoContent:(ZZPhotoBrowerViewController *)controller;
19 |
20 | @end
21 |
22 |
23 | @interface ZZPhotoBrowerViewController : UIViewController
24 |
25 | @property (assign, nonatomic) id delegate;
26 |
27 |
28 | -(void)reloadData;
29 |
30 | -(void)showIn:(UIViewController *)controller;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/Controller/ZZPhotoController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoController.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/16.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | /*
12 | * 设置Block
13 | */
14 | typedef void (^ZZPhotoResult)(id responseObject);
15 |
16 |
17 | @interface ZZPhotoController : NSObject
18 |
19 | /*
20 | * 设置圆点颜色
21 | */
22 | @property(strong,nonatomic) UIColor *roundColor;
23 | /*
24 | * 选择照片的最多张数
25 | */
26 | @property(assign,nonatomic) NSInteger selectPhotoOfMax;
27 |
28 | /*
29 | * 设置回调方法
30 | */
31 | -(void)showIn:(UIViewController *)controller result:(ZZPhotoResult)result;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/Controller/ZZPhotoListViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoListViewController.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/17.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | @interface ZZPhotoListViewController : UIViewController
12 |
13 | @property(assign,nonatomic) NSInteger selectNum;
14 |
15 | @property(strong,nonatomic) void (^photoResult)(id responseObject);
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/Controller/ZZPhotoPickerViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoPickerViewController.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/7/7.
6 | // Copyright (c) 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 |
12 |
13 | @interface ZZPhotoPickerViewController : UIViewController
14 |
15 |
16 | @property(strong,nonatomic) void (^PhotoResult)(id responseObject);
17 |
18 | @property (assign,nonatomic) NSInteger selectNum;
19 | @property (assign,nonatomic) BOOL isAlubSeclect;
20 | @property (strong,nonatomic) PHFetchResult *fetch;
21 | @property (strong,nonatomic) UIColor *roundColor;
22 |
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/Model/ZZPhoto.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhoto.h
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/25.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | @interface ZZPhoto : NSObject
12 |
13 | /**
14 | 资源
15 | */
16 | @property (nonatomic, strong) PHAsset *asset;
17 | /**
18 | 原尺寸图片
19 | */
20 | @property (nonatomic, strong) UIImage *originImage;
21 | /**
22 | 照片在手机中的路径
23 | */
24 | @property (nonatomic, strong) NSURL *imageUrl;
25 | /**
26 | 照片保存到相册中的时间
27 | */
28 | @property (nonatomic, copy) NSDate *createDate;
29 | /**
30 | 判断该图片是否选中
31 | */
32 | @property (nonatomic, assign) BOOL isSelect;
33 |
34 | +(UIImage *) fetchThumbImageWithAsset:(PHAsset *)asset;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/Model/ZZPhoto.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhoto.m
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/25.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import "ZZPhoto.h"
10 |
11 | @implementation ZZPhoto
12 |
13 | +(UIImage *) fetchThumbImageWithAsset:(PHAsset *)asset
14 | {
15 | __block UIImage *thumbImage;
16 | [[PHImageManager defaultManager] requestImageForAsset:asset targetSize:CGSizeMake(200, 200) contentMode:PHImageContentModeAspectFit options:nil resultHandler:^(UIImage *result, NSDictionary *info){
17 | BOOL downloadFinined = ![[info objectForKey:PHImageCancelledKey] boolValue] && ![info objectForKey:PHImageErrorKey] && ![[info objectForKey:PHImageResultIsDegradedKey] boolValue];
18 |
19 | //设置BOOL判断,确定返回高清照片
20 | if (downloadFinined) {
21 |
22 | thumbImage = result;
23 | }
24 |
25 | }];
26 |
27 | return thumbImage;
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/Model/ZZPhotoDatas.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoDatas.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/17.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | @interface ZZPhotoDatas : NSObject
12 |
13 |
14 | /*
15 | * 获取全部相册
16 | */
17 | -(NSMutableArray *) GetPhotoListDatas;
18 | /*
19 | * 获取某一个相册的结果集
20 | */
21 | -(PHFetchResult *) GetFetchResult:(PHAssetCollection *)collection;
22 | /*
23 | * 获取图片实体,并把图片结果存放到数组中,返回值数组
24 | */
25 | -(NSMutableArray *) GetPhotoAssets:(PHFetchResult *)fetchResult;
26 | /*
27 | * 只获取相机胶卷结果集
28 | */
29 | -(PHFetchResult *) GetCameraRollFetchResul;
30 |
31 | /*
32 | * 回调方法使用数组
33 | */
34 | -(void) GetImageObject:(id)asset complection:(void (^)(UIImage *,NSURL *))complection;
35 |
36 | /*
37 | * 检测是否为iCloud资源
38 | */
39 | -(BOOL) CheckIsiCloudAsset:(PHAsset *)asset;
40 | @end
41 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/Model/ZZPhotoListModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoListModel.h
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/19.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | @interface ZZPhotoListModel : NSObject
12 |
13 | @property (assign, nonatomic) NSInteger count;
14 | @property (strong, nonatomic) PHAsset *lastObject;
15 | @property (strong, nonatomic) NSString *title;
16 | @property (strong, nonatomic) PHAssetCollection *assetCollection;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/Model/ZZPhotoListModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoListModel.m
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/5/19.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import "ZZPhotoListModel.h"
10 |
11 | @implementation ZZPhotoListModel
12 |
13 |
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/View/ZZPhotoAlert.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoAlert.h
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/8/28.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ZZPhotoAlert : UIView
12 |
13 | +(ZZPhotoAlert *) sharedAlert;
14 |
15 | -(void) showPhotoAlert;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/View/ZZPhotoAlert.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoAlert.m
3 | // ZZPhotoKit
4 | //
5 | // Created by 袁亮 on 16/8/28.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import "ZZPhotoAlert.h"
10 | #import "ZZResourceConfig.h"
11 | @implementation ZZPhotoAlert
12 |
13 | +(ZZPhotoAlert *)sharedAlert
14 | {
15 | static ZZPhotoAlert *photoAlert = nil;
16 | static dispatch_once_t onceToken;
17 | dispatch_once(&onceToken, ^{
18 | photoAlert = [[ZZPhotoAlert alloc]init];
19 | });
20 | return photoAlert;
21 | }
22 |
23 | -(instancetype)initWithFrame:(CGRect)frame
24 | {
25 | self = [super initWithFrame:frame];
26 | if (self) {
27 |
28 | self.frame = CGRectMake(0, 0, ZZ_SCREEN_WIDTH, ZZ_SCREEN_HEIGHT);
29 |
30 |
31 |
32 | }
33 | return self;
34 | }
35 |
36 | -(void) showPhotoAlert
37 | {
38 | [[UIApplication sharedApplication].keyWindow addSubview:self];
39 |
40 | UILabel *alertlabel = [[UILabel alloc] initWithFrame:CGRectMake(0,0,0,0)];
41 |
42 | alertlabel.textColor = [UIColor whiteColor];
43 |
44 | alertlabel.textAlignment = NSTextAlignmentCenter;
45 |
46 | [alertlabel setNumberOfLines:0];
47 |
48 | NSString *alertText = @"温馨提示\n该图片尚未从iCloud中下载\n下载到本地后重试";
49 |
50 | alertlabel.text = alertText;
51 |
52 | alertlabel.textAlignment = NSTextAlignmentCenter;
53 |
54 | UIFont *font = [UIFont fontWithName:@"HelveticaNeue" size:16];
55 |
56 | alertlabel.font = font;
57 |
58 | CGSize labelsize = [alertText sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:font,NSFontAttributeName, nil]];
59 |
60 |
61 | [alertlabel setFrame:CGRectMake(8, 8, labelsize.width, labelsize.height)];
62 |
63 | UIView * alertView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, labelsize.width + 16, labelsize.height +16)];
64 |
65 | alertView.center = CGPointMake([UIScreen mainScreen].bounds.size.width / 2, [UIScreen mainScreen].bounds.size.height / 2);
66 |
67 | alertView.backgroundColor = [UIColor blackColor];
68 |
69 | alertView.alpha = 1;
70 |
71 | alertView.layer.masksToBounds = YES;
72 |
73 | alertView.layer.cornerRadius = 4;
74 |
75 | [alertView addSubview:alertlabel];
76 |
77 | [self addSubview:alertView];
78 |
79 | [UIView animateWithDuration:3.0f
80 | delay:0
81 | options:UIViewAnimationCurveEaseIn | UIViewAnimationOptionAllowUserInteraction
82 | animations:^{
83 |
84 | alertView.alpha = 0;
85 |
86 | }
87 | completion:^(BOOL finished){
88 | if(alertView.alpha == 0) {
89 |
90 | [self removeFromSuperview];
91 |
92 | }
93 | }];
94 |
95 | }
96 |
97 | @end
98 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/View/ZZPhotoHud.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoHud.h
3 | // ZZPhotoKit
4 | //
5 | // Created by Yuan on 16/1/14.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ZZPhotoHud : UIView
12 |
13 | +(ZZPhotoHud *)sharedHud;
14 |
15 | +(void)showActiveHud;
16 | +(void)hideActiveHud;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/View/ZZPhotoHud.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoHud.m
3 | // ZZPhotoKit
4 | //
5 | // Created by Yuan on 16/1/14.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #import "ZZPhotoHud.h"
10 |
11 | @interface ZZPhotoHud()
12 |
13 | @property (strong ,nonatomic) UIView *hudView;
14 | @property (strong ,nonatomic) UIActivityIndicatorView *indicatorView;
15 | @property (strong ,nonatomic) UILabel *hudLabel;
16 |
17 | @end
18 |
19 | @implementation ZZPhotoHud
20 |
21 | +(ZZPhotoHud *)sharedHud
22 | {
23 | static ZZPhotoHud *_photoHud = nil;
24 | static dispatch_once_t onceToken;
25 | dispatch_once(&onceToken, ^{
26 | _photoHud = [[ZZPhotoHud alloc]init];
27 | });
28 | return _photoHud;
29 | }
30 |
31 | -(instancetype)init
32 | {
33 | self = [super init];
34 | if (self) {
35 |
36 | }
37 | return self;
38 | }
39 |
40 | -(void)show
41 | {
42 | [[UIApplication sharedApplication].keyWindow addSubview:self];
43 |
44 | [self makeInitUI];
45 |
46 | [self makeHudUI];
47 | }
48 |
49 | -(void) makeInitUI
50 | {
51 | //清楚整个背景颜色
52 | self.backgroundColor = [UIColor clearColor];
53 | self.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);
54 | }
55 |
56 | -(void) makeHudUI
57 | {
58 | _hudView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 120, 90)];
59 | _hudView.center = CGPointMake([UIScreen mainScreen].bounds.size.width / 2, [UIScreen mainScreen].bounds.size.height / 2);
60 | _hudView.layer.cornerRadius = 8;
61 | _hudView.clipsToBounds = YES;
62 | _hudView.backgroundColor = [UIColor blackColor];
63 | _hudView.alpha = 0.8;
64 | [self addSubview:_hudView];
65 |
66 | _indicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
67 | _indicatorView.frame = CGRectMake(45, 15, 30, 30);
68 | [_hudView addSubview:_indicatorView];
69 | [_indicatorView startAnimating];
70 |
71 | _hudLabel = [[UILabel alloc] init];
72 | _hudLabel.frame = CGRectMake(0,40, 120, 50);
73 | _hudLabel.textAlignment = NSTextAlignmentCenter;
74 | _hudLabel.text = @"图片处理中...";
75 | _hudLabel.font = [UIFont systemFontOfSize:15];
76 | _hudLabel.textColor = [UIColor whiteColor];
77 | [_hudView addSubview:_hudLabel];
78 | }
79 |
80 | -(void) removeHudUI;
81 | {
82 | [self removeFromSuperview];
83 | [_indicatorView stopAnimating];
84 | }
85 |
86 | +(void)showActiveHud
87 | {
88 | [[self sharedHud] show];
89 | }
90 |
91 | +(void)hideActiveHud
92 | {
93 | [[self sharedHud] removeHudUI];
94 | }
95 |
96 | @end
97 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/View/ZZPhotoListCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoListCell.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/17.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | @interface ZZPhotoListCell : UITableViewCell
12 | /*
13 | * 相册图片,显示相册的最后一张图片
14 | */
15 | @property(strong,nonatomic) UIImageView *coverImage;
16 | /*
17 | * 相册标题,显示相册的标题
18 | */
19 | @property(strong,nonatomic) UILabel *title;
20 | /*
21 | * 相册副标题,显示相册中含有多少张图片
22 | */
23 | @property(strong,nonatomic) UILabel *subTitle;
24 |
25 | /*
26 | * 加载数据方法
27 | */
28 |
29 | -(void)loadPhotoListData:(PHAssetCollection *)assetItem;
30 | @end
31 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/View/ZZPhotoListCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoListCell.m
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/12/17.
6 | // Copyright © 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import "ZZPhotoListCell.h"
10 | #import "ZZPhotoListModel.h"
11 | @implementation ZZPhotoListCell
12 | -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
13 | {
14 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
15 | if (self) {
16 |
17 | _coverImage = [[UIImageView alloc]initWithFrame:CGRectMake(10, 5, 60, 60)];
18 |
19 | _coverImage.layer.masksToBounds = YES;
20 |
21 | _coverImage.contentMode = UIViewContentModeScaleAspectFill;
22 |
23 | [self.contentView addSubview:_coverImage];
24 |
25 | CGFloat labelWidth = [UIScreen mainScreen].bounds.size.width - 90;
26 |
27 | _title = [[UILabel alloc]initWithFrame:CGRectMake(80, 5, labelWidth, 25)];
28 |
29 | _title.textColor = [UIColor blackColor];
30 |
31 | [self.contentView addSubview:_title];
32 |
33 | _subTitle = [[UILabel alloc]initWithFrame:CGRectMake(80, 40, labelWidth, 25)];
34 |
35 | _subTitle.textColor = [UIColor blackColor];
36 |
37 | [self.contentView addSubview:_subTitle];
38 |
39 | CGFloat right = [UIScreen mainScreen].bounds.size.width;
40 |
41 | UIImageView *right_Cell = [[UIImageView alloc]initWithFrame:CGRectMake(right - 29, 25, 9, 20)];
42 |
43 | right_Cell.image = PhotoListRightBtn;
44 |
45 | [self.contentView addSubview:right_Cell];
46 |
47 | }
48 | return self;
49 | }
50 | - (void)awakeFromNib {
51 | [super awakeFromNib];
52 | // Initialization code
53 | }
54 |
55 | -(void)loadPhotoListData:(ZZPhotoListModel *)listmodel
56 | {
57 | if ([listmodel isKindOfClass:[ZZPhotoListModel class]]) {
58 |
59 | [[PHImageManager defaultManager] requestImageForAsset:listmodel.lastObject targetSize:CGSizeMake(200,200) contentMode:PHImageContentModeDefault options:nil resultHandler:^(UIImage *result, NSDictionary *info)
60 | {
61 | if (result == nil) {
62 | self.coverImage.image = NOPhoto_Data_Pic;
63 | }else{
64 | self.coverImage.image = result;
65 | }
66 |
67 | }];
68 | self.title.text = listmodel.title;
69 | self.subTitle.text = [NSString stringWithFormat:@"%lu",(unsigned long)listmodel.count];
70 | }
71 | }
72 | @end
73 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/View/ZZPhotoPickerCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoPickerCell.h
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/7/7.
6 | // Copyright (c) 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ZZResourceConfig.h"
11 | #import "ZZPhoto.h"
12 |
13 | @interface ZZPhotoPickerCell : UICollectionViewCell
14 |
15 | @property(strong,nonatomic) UIImageView *photo;
16 | @property(strong,nonatomic) UIButton *selectBtn;
17 |
18 | @property(strong,nonatomic) void(^selectBlock)();
19 |
20 | @property(assign,nonatomic) BOOL isSelect;
21 |
22 | -(void)loadPhotoData:(ZZPhoto *)photo;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhoto/View/ZZPhotoPickerCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoPickerCell.m
3 | // ZZFramework
4 | //
5 | // Created by Yuan on 15/7/7.
6 | // Copyright (c) 2015年 zzl. All rights reserved.
7 | //
8 |
9 | #import "ZZPhotoPickerCell.h"
10 | #import "ZZAlumAnimation.h"
11 | @implementation ZZPhotoPickerCell
12 | -(instancetype)initWithFrame:(CGRect)frame
13 | {
14 | self = [super initWithFrame:frame];
15 | if (self) {
16 |
17 |
18 | _photo = [[UIImageView alloc]initWithFrame:self.bounds];
19 |
20 | _photo.layer.masksToBounds = YES;
21 |
22 | _photo.contentMode = UIViewContentModeScaleAspectFill;
23 |
24 | [self.contentView addSubview:_photo];
25 |
26 |
27 | CGFloat btnSize = self.frame.size.width / 4;
28 |
29 | _selectBtn = [[UIButton alloc]initWithFrame:CGRectMake(self.frame.size.width - btnSize - 5, 5, btnSize, btnSize)];
30 | [_selectBtn addTarget:self action:@selector(selectPhotoButtonMethod:) forControlEvents:UIControlEventTouchUpInside];
31 | [self.contentView addSubview:_selectBtn];
32 |
33 | }
34 | return self;
35 | }
36 |
37 | -(void) selectPhotoButtonMethod:(UIButton *)sender
38 | {
39 | [[ZZAlumAnimation sharedAnimation] selectAnimation:sender];
40 | self.selectBlock();
41 |
42 | }
43 |
44 | -(void)setIsSelect:(BOOL)isSelect
45 | {
46 | if (isSelect == YES) {
47 | [_selectBtn setImage:Pic_Btn_Selected forState:UIControlStateNormal];
48 | }else{
49 | [_selectBtn setImage:Pic_btn_UnSelected forState:UIControlStateNormal];
50 | }
51 | }
52 |
53 |
54 | -(void)loadPhotoData:(ZZPhoto *)photo
55 | {
56 | if (photo.isSelect == YES) {
57 | [_selectBtn setImage:Pic_Btn_Selected forState:UIControlStateNormal];
58 | }else{
59 | [_selectBtn setImage:Pic_btn_UnSelected forState:UIControlStateNormal];
60 | }
61 |
62 | if ([photo isKindOfClass:[ZZPhoto class]]) {
63 |
64 | [[PHImageManager defaultManager] requestImageForAsset:photo.asset targetSize:CGSizeMake(200, 200) contentMode:PHImageContentModeAspectFit options:nil resultHandler:^(UIImage *result, NSDictionary *info){
65 | self.photo.image = result;
66 |
67 | }];
68 |
69 | }
70 | }
71 | @end
72 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/ZZPhotoRE/ZZPhotoKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZZPhotoKit.h
3 | // ZZPhotoKit
4 | //
5 | // Created by Yuan on 16/1/14.
6 | // Copyright © 2016年 Ace. All rights reserved.
7 | //
8 |
9 | #ifndef ZZPhotoKit_h
10 | #define ZZPhotoKit_h
11 |
12 | #import "ZZPhotoController.h"
13 | #import "ZZCameraController.h"
14 | #import "ZZBrowserPickerViewController.h"
15 |
16 | #import "ZZPhoto.h"
17 | #import "ZZCamera.h"
18 |
19 | /* 说明 */
20 |
21 | /*
22 |
23 | ** 此开源仅供初学者学习参考,不喜欢的大神们还望轻虐。
24 |
25 | ** 此开源中并不完善还需以后的慢慢改进,增强功能。
26 |
27 | ** 此开源中相机调用部分代码来自另外一个作者。
28 |
29 | ** 相册多选使用最新的 PhotoKit 框架
30 |
31 | ** 图片浏览器支持 SDWebImage 加载图片
32 |
33 | ***
34 | 有什么不明白的地方,或者哪里需要改进的可以联系我
35 |
36 | ** 联系方式
37 |
38 | *** 关注微博:袁亮_TRICK *** QQ:412016060
39 |
40 | */
41 |
42 | /*
43 | ** 更新内容
44 |
45 | 修复重大问题。
46 | ※※※ 相册多选回调卡顿问题以及回调后程序崩溃现象。
47 | ※※※ 由于上面问题图片返回大小以及缩略图 UIImageHandle 类暂时不能使用,程序内部暂时只能返回原图尺寸。
48 | 缩略图的返回待后期更新。支持的小伙伴们耐心等待。
49 | ※※※ 相册多选中添加按钮点击闪烁动画效果。
50 |
51 | */
52 |
53 | /*
54 | ** 使用方法
55 |
56 | ※※※ 首先重要提醒一个 文件,Common.h 这个配置文件。
57 | ※※※ 1.包含了所有的按钮图片信息,任意更换即可.
58 | ※※※ 2.包含了图片返回类型的公共枚举.
59 | ※※※ 3.所有用到的头文件。以及一些颜色、控制器宽高、屏幕宽高宏定义.
60 |
61 | ***** 导入头文件 *****
62 | #import "ZZPhotoKit.h"
63 |
64 |
65 |
66 | * 相册多选的调用
67 | ZZPhotoController *photoController = [[ZZPhotoController alloc]init];
68 |
69 | //设置最大选择张数
70 | photoController.selectPhotoOfMax = 5;
71 |
72 | //设置图片返回类型 (下面例子为缩略图)
73 | photoController.imageType = ZZImageTypeOfThumb;
74 |
75 | [photoController showIn:self result:^(id responseObject){
76 | //返回结果集
77 | NSLog(@"%@",responseObject);
78 | NSArray *array = (NSArray *)responseObject;
79 |
80 | UIImage *image = [array objectAtIndex:0];
81 | _imageView.image = image;
82 | }];
83 |
84 | * 相机连拍的调用
85 | ZZCameraController *cameraController = [[ZZCameraController alloc]init];
86 | //设置最大连拍张数
87 | cameraController.takePhotoOfMax = 8;
88 | //设置图片返回类型 (下面例子为缩略图)
89 | cameraController.imageType = ZZImageTypeOfThumb;
90 | [cameraController showIn:self result:^(id responseObject){
91 | //返回结果集
92 | NSLog(@"%@",responseObject);
93 | NSArray *array = (NSArray *)responseObject;
94 |
95 | UIImage *image = [array objectAtIndex:0];
96 | _imageView.image = image;
97 | }];
98 |
99 | * 简单的图片浏览器
100 | ZZBrowserPickerViewController *browserController = [[ZZBrowserPickerViewController alloc]init];
101 | browserController.delegate = self;
102 | [browserController showIn:self animation:ShowAnimationOfPush];
103 |
104 | //delegate
105 | //图片的个数。
106 | -(NSInteger)zzbrowserPickerPhotoNum:(ZZBrowserPickerViewController *)controller
107 | //图片的数组。
108 | -(NSArray *)zzbrowserPickerPhotoContent:(ZZBrowserPickerViewController *)controller
109 |
110 |
111 | ** 详细使用方法还是看demo 吧。
112 | */
113 |
114 |
115 | #endif /* ZZPhotoKit_h */
116 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecord/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ImageAndVideoAndRecord
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 李丹阳. 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 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecordTests/ImageAndVideoAndRecordTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ImageAndVideoAndRecordTests.m
3 | // ImageAndVideoAndRecordTests
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ImageAndVideoAndRecordTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation ImageAndVideoAndRecordTests
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 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecordTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecordUITests/ImageAndVideoAndRecordUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ImageAndVideoAndRecordUITests.m
3 | // ImageAndVideoAndRecordUITests
4 | //
5 | // Created by 李丹阳 on 2017/1/4.
6 | // Copyright © 2017年 李丹阳. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ImageAndVideoAndRecordUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation ImageAndVideoAndRecordUITests
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 |
--------------------------------------------------------------------------------
/ImageAndVideoAndRecordUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ImageFolder/ImageGif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageFolder/ImageGif.gif
--------------------------------------------------------------------------------
/ImageFolder/WechatIMG63.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DayCrazy/publishImageAndVideoAnsRecord/ce1df56dcf395839c4852c69771e3dbb94c64fb4/ImageFolder/WechatIMG63.jpg
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '8.0'
2 | target 'ImageAndVideoAndRecord' do
3 | pod 'MBProgressHUD', '~> 0.9.2'
4 | pod 'SDWebImage', '~>3.7'
5 | pod "Masonry"
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Masonry (1.0.2)
3 | - MBProgressHUD (0.9.2)
4 | - SDWebImage (3.8.2):
5 | - SDWebImage/Core (= 3.8.2)
6 | - SDWebImage/Core (3.8.2)
7 |
8 | DEPENDENCIES:
9 | - Masonry
10 | - MBProgressHUD (~> 0.9.2)
11 | - SDWebImage (~> 3.7)
12 |
13 | SPEC CHECKSUMS:
14 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e
15 | MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
16 | SDWebImage: 098e97e6176540799c27e804c96653ee0833d13c
17 |
18 | PODFILE CHECKSUM: 9f3c8a0e1feefd5561a18ea0d22eb5b24b072747
19 |
20 | COCOAPODS: 1.1.1
21 |
--------------------------------------------------------------------------------
/Pods/Headers/Private/MBProgressHUD/MBProgressHUD.h:
--------------------------------------------------------------------------------
1 | ../../../MBProgressHUD/MBProgressHUD.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASCompositeConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASConstraint+Private.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint+Private.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASConstraintMaker.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraintMaker.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASLayoutConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASUtilities.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASUtilities.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewAttribute.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/Masonry.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/NSArray+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/View+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/ViewController+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSData+ImageContentType.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageCompat.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDecoder.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloader.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIButton+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+GIF.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/MBProgressHUD/MBProgressHUD.h:
--------------------------------------------------------------------------------
1 | ../../../MBProgressHUD/MBProgressHUD.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASCompositeConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASConstraint+Private.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint+Private.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASConstraintMaker.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraintMaker.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASLayoutConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASUtilities.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASUtilities.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewAttribute.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/Masonry.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/NSArray+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/View+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/ViewController+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSData+ImageContentType.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageCompat.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDecoder.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloader.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIButton+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+GIF.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h
--------------------------------------------------------------------------------
/Pods/MBProgressHUD/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2015 Matej Bukovinski
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Masonry (1.0.2)
3 | - MBProgressHUD (0.9.2)
4 | - SDWebImage (3.8.2):
5 | - SDWebImage/Core (= 3.8.2)
6 | - SDWebImage/Core (3.8.2)
7 |
8 | DEPENDENCIES:
9 | - Masonry
10 | - MBProgressHUD (~> 0.9.2)
11 | - SDWebImage (~> 3.7)
12 |
13 | SPEC CHECKSUMS:
14 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e
15 | MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
16 | SDWebImage: 098e97e6176540799c27e804c96653ee0833d13c
17 |
18 | PODFILE CHECKSUM: 9f3c8a0e1feefd5561a18ea0d22eb5b24b072747
19 |
20 | COCOAPODS: 1.1.1
21 |
--------------------------------------------------------------------------------
/Pods/Masonry/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASCompositeConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASConstraint.h"
10 | #import "MASUtilities.h"
11 |
12 | /**
13 | * A group of MASConstraint objects
14 | */
15 | @interface MASCompositeConstraint : MASConstraint
16 |
17 | /**
18 | * Creates a composite with a predefined array of children
19 | *
20 | * @param children child MASConstraints
21 | *
22 | * @return a composite constraint
23 | */
24 | - (id)initWithChildren:(NSArray *)children;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASConstraint+Private.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASConstraint+Private.h
3 | // Masonry
4 | //
5 | // Created by Nick Tymchenko on 29/04/14.
6 | // Copyright (c) 2014 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASConstraint.h"
10 |
11 | @protocol MASConstraintDelegate;
12 |
13 |
14 | @interface MASConstraint ()
15 |
16 | /**
17 | * Whether or not to check for an existing constraint instead of adding constraint
18 | */
19 | @property (nonatomic, assign) BOOL updateExisting;
20 |
21 | /**
22 | * Usually MASConstraintMaker but could be a parent MASConstraint
23 | */
24 | @property (nonatomic, weak) id delegate;
25 |
26 | /**
27 | * Based on a provided value type, is equal to calling:
28 | * NSNumber - setOffset:
29 | * NSValue with CGPoint - setPointOffset:
30 | * NSValue with CGSize - setSizeOffset:
31 | * NSValue with MASEdgeInsets - setInsets:
32 | */
33 | - (void)setLayoutConstantWithValue:(NSValue *)value;
34 |
35 | @end
36 |
37 |
38 | @interface MASConstraint (Abstract)
39 |
40 | /**
41 | * Sets the constraint relation to given NSLayoutRelation
42 | * returns a block which accepts one of the following:
43 | * MASViewAttribute, UIView, NSValue, NSArray
44 | * see readme for more details.
45 | */
46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation;
47 |
48 | /**
49 | * Override to set a custom chaining behaviour
50 | */
51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
52 |
53 | @end
54 |
55 |
56 | @protocol MASConstraintDelegate
57 |
58 | /**
59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example
60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks
61 | */
62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint;
63 |
64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * When you are debugging or printing the constraints attached to a view this subclass
13 | * makes it easier to identify which constraints have been created via Masonry
14 | */
15 | @interface MASLayoutConstraint : NSLayoutConstraint
16 |
17 | /**
18 | * a key to associate with this constraint
19 | */
20 | @property (nonatomic, strong) id mas_key;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASLayoutConstraint.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASLayoutConstraint.h"
10 |
11 | @implementation MASLayoutConstraint
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASAttribute.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * An immutable tuple which stores the view and the related NSLayoutAttribute.
13 | * Describes part of either the left or right hand side of a constraint equation
14 | */
15 | @interface MASViewAttribute : NSObject
16 |
17 | /**
18 | * The view which the reciever relates to. Can be nil if item is not a view.
19 | */
20 | @property (nonatomic, weak, readonly) MAS_VIEW *view;
21 |
22 | /**
23 | * The item which the reciever relates to.
24 | */
25 | @property (nonatomic, weak, readonly) id item;
26 |
27 | /**
28 | * The attribute which the reciever relates to
29 | */
30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute;
31 |
32 | /**
33 | * Convenience initializer.
34 | */
35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute;
36 |
37 | /**
38 | * The designated initializer.
39 | */
40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute;
41 |
42 | /**
43 | * Determine whether the layoutAttribute is a size attribute
44 | *
45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight
46 | */
47 | - (BOOL)isSizeAttribute;
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASViewAttribute.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASAttribute.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASViewAttribute.h"
10 |
11 | @implementation MASViewAttribute
12 |
13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute {
14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute];
15 | return self;
16 | }
17 |
18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute {
19 | self = [super init];
20 | if (!self) return nil;
21 |
22 | _view = view;
23 | _item = item;
24 | _layoutAttribute = layoutAttribute;
25 |
26 | return self;
27 | }
28 |
29 | - (BOOL)isSizeAttribute {
30 | return self.layoutAttribute == NSLayoutAttributeWidth
31 | || self.layoutAttribute == NSLayoutAttributeHeight;
32 | }
33 |
34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute {
35 | if ([viewAttribute isKindOfClass:self.class]) {
36 | return self.view == viewAttribute.view
37 | && self.layoutAttribute == viewAttribute.layoutAttribute;
38 | }
39 | return [super isEqual:viewAttribute];
40 | }
41 |
42 | - (NSUInteger)hash {
43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASViewAttribute.h"
10 | #import "MASConstraint.h"
11 | #import "MASLayoutConstraint.h"
12 | #import "MASUtilities.h"
13 |
14 | /**
15 | * A single constraint.
16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view
17 | */
18 | @interface MASViewConstraint : MASConstraint
19 |
20 | /**
21 | * First item/view and first attribute of the NSLayoutConstraint
22 | */
23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute;
24 |
25 | /**
26 | * Second item/view and second attribute of the NSLayoutConstraint
27 | */
28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute;
29 |
30 | /**
31 | * initialises the MASViewConstraint with the first part of the equation
32 | *
33 | * @param firstViewAttribute view.mas_left, view.mas_width etc.
34 | *
35 | * @return a new view constraint
36 | */
37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute;
38 |
39 | /**
40 | * Returns all MASViewConstraints installed with this view as a first item.
41 | *
42 | * @param view A view to retrieve constraints for.
43 | *
44 | * @return An array of MASViewConstraints.
45 | */
46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | //
2 | // Masonry.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for Masonry.
12 | FOUNDATION_EXPORT double MasonryVersionNumber;
13 |
14 | //! Project version string for Masonry.
15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
16 |
17 | #import "MASUtilities.h"
18 | #import "View+MASAdditions.h"
19 | #import "View+MASShorthandAdditions.h"
20 | #import "ViewController+MASAdditions.h"
21 | #import "NSArray+MASAdditions.h"
22 | #import "NSArray+MASShorthandAdditions.h"
23 | #import "MASConstraint.h"
24 | #import "MASCompositeConstraint.h"
25 | #import "MASViewAttribute.h"
26 | #import "MASViewConstraint.h"
27 | #import "MASConstraintMaker.h"
28 | #import "MASLayoutConstraint.h"
29 | #import "NSLayoutConstraint+MASDebugAdditions.h"
30 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSArray+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASAdditions.h
3 | //
4 | //
5 | // Created by Daniel Hammond on 11/26/13.
6 | //
7 | //
8 |
9 | #import "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | typedef NS_ENUM(NSUInteger, MASAxisType) {
14 | MASAxisTypeHorizontal,
15 | MASAxisTypeVertical
16 | };
17 |
18 | @interface NSArray (MASAdditions)
19 |
20 | /**
21 | * Creates a MASConstraintMaker with each view in the callee.
22 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view
23 | *
24 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
25 | *
26 | * @return Array of created MASConstraints
27 | */
28 | - (NSArray *)mas_makeConstraints:(void (^)(MASConstraintMaker *make))block;
29 |
30 | /**
31 | * Creates a MASConstraintMaker with each view in the callee.
32 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
33 | * If an existing constraint exists then it will be updated instead.
34 | *
35 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
36 | *
37 | * @return Array of created/updated MASConstraints
38 | */
39 | - (NSArray *)mas_updateConstraints:(void (^)(MASConstraintMaker *make))block;
40 |
41 | /**
42 | * Creates a MASConstraintMaker with each view in the callee.
43 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
44 | * All constraints previously installed for the views will be removed.
45 | *
46 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
47 | *
48 | * @return Array of created/updated MASConstraints
49 | */
50 | - (NSArray *)mas_remakeConstraints:(void (^)(MASConstraintMaker *make))block;
51 |
52 | /**
53 | * distribute with fixed spacing
54 | *
55 | * @param axisType which axis to distribute items along
56 | * @param fixedSpacing the spacing between each item
57 | * @param leadSpacing the spacing before the first item and the container
58 | * @param tailSpacing the spacing after the last item and the container
59 | */
60 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing;
61 |
62 | /**
63 | * distribute with fixed item size
64 | *
65 | * @param axisType which axis to distribute items along
66 | * @param fixedItemLength the fixed length of each item
67 | * @param leadSpacing the spacing before the first item and the container
68 | * @param tailSpacing the spacing after the last item and the container
69 | */
70 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing;
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASShorthandAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 22/07/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "NSArray+MASAdditions.h"
10 |
11 | #ifdef MAS_SHORTHAND
12 |
13 | /**
14 | * Shorthand array additions without the 'mas_' prefixes,
15 | * only enabled if MAS_SHORTHAND is defined
16 | */
17 | @interface NSArray (MASShorthandAdditions)
18 |
19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
22 |
23 | @end
24 |
25 | @implementation NSArray (MASShorthandAdditions)
26 |
27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
28 | return [self mas_makeConstraints:block];
29 | }
30 |
31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
32 | return [self mas_updateConstraints:block];
33 | }
34 |
35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
36 | return [self mas_remakeConstraints:block];
37 | }
38 |
39 | @end
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+MASDebugAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * makes debug and log output of NSLayoutConstraints more readable
13 | */
14 | @interface NSLayoutConstraint (MASDebugAdditions)
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/ViewController+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.h
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | #ifdef MAS_VIEW_CONTROLLER
14 |
15 | @interface MAS_VIEW_CONTROLLER (MASAdditions)
16 |
17 | /**
18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute
19 | */
20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide;
21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide;
22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop;
23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom;
24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop;
25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom;
26 |
27 |
28 | @end
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/ViewController+MASAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.m
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "ViewController+MASAdditions.h"
10 |
11 | #ifdef MAS_VIEW_CONTROLLER
12 |
13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions)
14 |
15 | - (MASViewAttribute *)mas_topLayoutGuide {
16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
17 | }
18 | - (MASViewAttribute *)mas_topLayoutGuideTop {
19 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop];
20 | }
21 | - (MASViewAttribute *)mas_topLayoutGuideBottom {
22 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
23 | }
24 |
25 | - (MASViewAttribute *)mas_bottomLayoutGuide {
26 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
27 | }
28 | - (MASViewAttribute *)mas_bottomLayoutGuideTop {
29 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
30 | }
31 | - (MASViewAttribute *)mas_bottomLayoutGuideBottom {
32 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
33 | }
34 |
35 |
36 |
37 | @end
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/lidanyang.xcuserdatad/xcschemes/MBProgressHUD.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/lidanyang.xcuserdatad/xcschemes/Masonry.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/lidanyang.xcuserdatad/xcschemes/Pods-ImageAndVideoAndRecord.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/lidanyang.xcuserdatad/xcschemes/SDWebImage.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/lidanyang.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MBProgressHUD.xcscheme
8 |
9 | isShown
10 |
11 |
12 | Masonry.xcscheme
13 |
14 | isShown
15 |
16 |
17 | Pods-ImageAndVideoAndRecord.xcscheme
18 |
19 | isShown
20 |
21 |
22 | SDWebImage.xcscheme
23 |
24 | isShown
25 |
26 |
27 |
28 | SuppressBuildableAutocreation
29 |
30 | 175B076ED45EB1A3E40F58BA14036467
31 |
32 | primary
33 |
34 |
35 | 86702D87D2D6460E82E6F28B8242DD31
36 |
37 | primary
38 |
39 |
40 | 9DC8D9E02903E93BD0B2FEC9D846EA20
41 |
42 | primary
43 |
44 |
45 | AA14C485126741ABDD5FF86BABA6E476
46 |
47 | primary
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Olivier Poitrey rs@dailymotion.com
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 furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
21 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Fabrice Aneche on 06/01/14.
3 | // Copyright (c) 2014 Dailymotion. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 | @interface NSData (ImageContentType)
9 |
10 | /**
11 | * Compute the content type for an image data
12 | *
13 | * @param data the input data
14 | *
15 | * @return the content type as string (i.e. image/jpeg, image/gif)
16 | */
17 | + (NSString *)sd_contentTypeForImageData:(NSData *)data;
18 |
19 | @end
20 |
21 |
22 | @interface NSData (ImageContentTypeDeprecated)
23 |
24 | + (NSString *)contentTypeForImageData:(NSData *)data __deprecated_msg("Use `sd_contentTypeForImageData:`");
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Fabrice Aneche on 06/01/14.
3 | // Copyright (c) 2014 Dailymotion. All rights reserved.
4 | //
5 |
6 | #import "NSData+ImageContentType.h"
7 |
8 |
9 | @implementation NSData (ImageContentType)
10 |
11 | + (NSString *)sd_contentTypeForImageData:(NSData *)data {
12 | uint8_t c;
13 | [data getBytes:&c length:1];
14 | switch (c) {
15 | case 0xFF:
16 | return @"image/jpeg";
17 | case 0x89:
18 | return @"image/png";
19 | case 0x47:
20 | return @"image/gif";
21 | case 0x49:
22 | case 0x4D:
23 | return @"image/tiff";
24 | case 0x52:
25 | // R as RIFF for WEBP
26 | if ([data length] < 12) {
27 | return nil;
28 | }
29 |
30 | NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(0, 12)] encoding:NSASCIIStringEncoding];
31 | if ([testString hasPrefix:@"RIFF"] && [testString hasSuffix:@"WEBP"]) {
32 | return @"image/webp";
33 | }
34 |
35 | return nil;
36 | }
37 | return nil;
38 | }
39 |
40 | @end
41 |
42 |
43 | @implementation NSData (ImageContentTypeDeprecated)
44 |
45 | + (NSString *)contentTypeForImageData:(NSData *)data {
46 | return [self sd_contentTypeForImageData:data];
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageCompat.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | * (c) Jamie Pinkham
5 | *
6 | * For the full copyright and license information, please view the LICENSE
7 | * file that was distributed with this source code.
8 | */
9 |
10 | #import
11 |
12 | #ifdef __OBJC_GC__
13 | #error SDWebImage does not support Objective-C Garbage Collection
14 | #endif
15 |
16 | #if __IPHONE_OS_VERSION_MIN_REQUIRED != 20000 && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0
17 | #error SDWebImage doesn't support Deployment Target version < 5.0
18 | #endif
19 |
20 | #if !TARGET_OS_IPHONE
21 | #import
22 | #ifndef UIImage
23 | #define UIImage NSImage
24 | #endif
25 | #ifndef UIImageView
26 | #define UIImageView NSImageView
27 | #endif
28 | #else
29 |
30 | #import
31 |
32 | #endif
33 |
34 | #ifndef NS_ENUM
35 | #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
36 | #endif
37 |
38 | #ifndef NS_OPTIONS
39 | #define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
40 | #endif
41 |
42 | #if OS_OBJECT_USE_OBJC
43 | #undef SDDispatchQueueRelease
44 | #undef SDDispatchQueueSetterSementics
45 | #define SDDispatchQueueRelease(q)
46 | #define SDDispatchQueueSetterSementics strong
47 | #else
48 | #undef SDDispatchQueueRelease
49 | #undef SDDispatchQueueSetterSementics
50 | #define SDDispatchQueueRelease(q) (dispatch_release(q))
51 | #define SDDispatchQueueSetterSementics assign
52 | #endif
53 |
54 | extern UIImage *SDScaledImageForKey(NSString *key, UIImage *image);
55 |
56 | typedef void(^SDWebImageNoParamsBlock)();
57 |
58 | extern NSString *const SDWebImageErrorDomain;
59 |
60 | #define dispatch_main_sync_safe(block)\
61 | if ([NSThread isMainThread]) {\
62 | block();\
63 | } else {\
64 | dispatch_sync(dispatch_get_main_queue(), block);\
65 | }
66 |
67 | #define dispatch_main_async_safe(block)\
68 | if ([NSThread isMainThread]) {\
69 | block();\
70 | } else {\
71 | dispatch_async(dispatch_get_main_queue(), block);\
72 | }
73 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageCompat.m:
--------------------------------------------------------------------------------
1 | //
2 | // SDWebImageCompat.m
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 11/12/12.
6 | // Copyright (c) 2012 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import "SDWebImageCompat.h"
10 |
11 | #if !__has_feature(objc_arc)
12 | #error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag
13 | #endif
14 |
15 | inline UIImage *SDScaledImageForKey(NSString *key, UIImage *image) {
16 | if (!image) {
17 | return nil;
18 | }
19 |
20 | if ([image.images count] > 0) {
21 | NSMutableArray *scaledImages = [NSMutableArray array];
22 |
23 | for (UIImage *tempImage in image.images) {
24 | [scaledImages addObject:SDScaledImageForKey(key, tempImage)];
25 | }
26 |
27 | return [UIImage animatedImageWithImages:scaledImages duration:image.duration];
28 | }
29 | else {
30 | if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
31 | CGFloat scale = 1;
32 | if (key.length >= 8) {
33 | NSRange range = [key rangeOfString:@"@2x."];
34 | if (range.location != NSNotFound) {
35 | scale = 2.0;
36 | }
37 |
38 | range = [key rangeOfString:@"@3x."];
39 | if (range.location != NSNotFound) {
40 | scale = 3.0;
41 | }
42 | }
43 |
44 | UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation];
45 | image = scaledImage;
46 | }
47 | return image;
48 | }
49 | }
50 |
51 | NSString *const SDWebImageErrorDomain = @"SDWebImageErrorDomain";
52 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * Created by james on 9/28/11.
6 | *
7 | * For the full copyright and license information, please view the LICENSE
8 | * file that was distributed with this source code.
9 | */
10 |
11 | #import
12 | #import "SDWebImageCompat.h"
13 |
14 | @interface UIImage (ForceDecode)
15 |
16 | + (UIImage *)decodedImageWithImage:(UIImage *)image;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * Created by james on 9/28/11.
6 | *
7 | * For the full copyright and license information, please view the LICENSE
8 | * file that was distributed with this source code.
9 | */
10 |
11 | #import "SDWebImageDecoder.h"
12 |
13 | @implementation UIImage (ForceDecode)
14 |
15 | + (UIImage *)decodedImageWithImage:(UIImage *)image {
16 | // while downloading huge amount of images
17 | // autorelease the bitmap context
18 | // and all vars to help system to free memory
19 | // when there are memory warning.
20 | // on iOS7, do not forget to call
21 | // [[SDImageCache sharedImageCache] clearMemory];
22 |
23 | if (image == nil) { // Prevent "CGBitmapContextCreateImage: invalid context 0x0" error
24 | return nil;
25 | }
26 |
27 | @autoreleasepool{
28 | // do not decode animated images
29 | if (image.images != nil) {
30 | return image;
31 | }
32 |
33 | CGImageRef imageRef = image.CGImage;
34 |
35 | CGImageAlphaInfo alpha = CGImageGetAlphaInfo(imageRef);
36 | BOOL anyAlpha = (alpha == kCGImageAlphaFirst ||
37 | alpha == kCGImageAlphaLast ||
38 | alpha == kCGImageAlphaPremultipliedFirst ||
39 | alpha == kCGImageAlphaPremultipliedLast);
40 | if (anyAlpha) {
41 | return image;
42 | }
43 |
44 | // current
45 | CGColorSpaceModel imageColorSpaceModel = CGColorSpaceGetModel(CGImageGetColorSpace(imageRef));
46 | CGColorSpaceRef colorspaceRef = CGImageGetColorSpace(imageRef);
47 |
48 | BOOL unsupportedColorSpace = (imageColorSpaceModel == kCGColorSpaceModelUnknown ||
49 | imageColorSpaceModel == kCGColorSpaceModelMonochrome ||
50 | imageColorSpaceModel == kCGColorSpaceModelCMYK ||
51 | imageColorSpaceModel == kCGColorSpaceModelIndexed);
52 | if (unsupportedColorSpace) {
53 | colorspaceRef = CGColorSpaceCreateDeviceRGB();
54 | }
55 |
56 | size_t width = CGImageGetWidth(imageRef);
57 | size_t height = CGImageGetHeight(imageRef);
58 | NSUInteger bytesPerPixel = 4;
59 | NSUInteger bytesPerRow = bytesPerPixel * width;
60 | NSUInteger bitsPerComponent = 8;
61 |
62 |
63 | // kCGImageAlphaNone is not supported in CGBitmapContextCreate.
64 | // Since the original image here has no alpha info, use kCGImageAlphaNoneSkipLast
65 | // to create bitmap graphics contexts without alpha info.
66 | CGContextRef context = CGBitmapContextCreate(NULL,
67 | width,
68 | height,
69 | bitsPerComponent,
70 | bytesPerRow,
71 | colorspaceRef,
72 | kCGBitmapByteOrderDefault|kCGImageAlphaNoneSkipLast);
73 |
74 | // Draw the image into the context and retrieve the new bitmap image without alpha
75 | CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef);
76 | CGImageRef imageRefWithoutAlpha = CGBitmapContextCreateImage(context);
77 | UIImage *imageWithoutAlpha = [UIImage imageWithCGImage:imageRefWithoutAlpha
78 | scale:image.scale
79 | orientation:image.imageOrientation];
80 |
81 | if (unsupportedColorSpace) {
82 | CGColorSpaceRelease(colorspaceRef);
83 | }
84 |
85 | CGContextRelease(context);
86 | CGImageRelease(imageRefWithoutAlpha);
87 |
88 | return imageWithoutAlpha;
89 | }
90 | }
91 |
92 | @end
93 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageOperation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import
10 |
11 | @protocol SDWebImageOperation
12 |
13 | - (void)cancel;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+GIF.h
3 | // LBGIFImage
4 | //
5 | // Created by Laurin Brandner on 06.01.12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (GIF)
12 |
13 | + (UIImage *)sd_animatedGIFNamed:(NSString *)name;
14 |
15 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data;
16 |
17 | - (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+MultiFormat.h
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 07/06/13.
6 | // Copyright (c) 2013 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (MultiFormat)
12 |
13 | + (UIImage *)sd_imageWithData:(NSData *)data;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+MultiFormat.m
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 07/06/13.
6 | // Copyright (c) 2013 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import "UIImage+MultiFormat.h"
10 | #import "UIImage+GIF.h"
11 | #import "NSData+ImageContentType.h"
12 | #import
13 |
14 | #ifdef SD_WEBP
15 | #import "UIImage+WebP.h"
16 | #endif
17 |
18 | @implementation UIImage (MultiFormat)
19 |
20 | + (UIImage *)sd_imageWithData:(NSData *)data {
21 | if (!data) {
22 | return nil;
23 | }
24 |
25 | UIImage *image;
26 | NSString *imageContentType = [NSData sd_contentTypeForImageData:data];
27 | if ([imageContentType isEqualToString:@"image/gif"]) {
28 | image = [UIImage sd_animatedGIFWithData:data];
29 | }
30 | #ifdef SD_WEBP
31 | else if ([imageContentType isEqualToString:@"image/webp"])
32 | {
33 | image = [UIImage sd_imageWithWebPData:data];
34 | }
35 | #endif
36 | else {
37 | image = [[UIImage alloc] initWithData:data];
38 | UIImageOrientation orientation = [self sd_imageOrientationFromImageData:data];
39 | if (orientation != UIImageOrientationUp) {
40 | image = [UIImage imageWithCGImage:image.CGImage
41 | scale:image.scale
42 | orientation:orientation];
43 | }
44 | }
45 |
46 |
47 | return image;
48 | }
49 |
50 |
51 | +(UIImageOrientation)sd_imageOrientationFromImageData:(NSData *)imageData {
52 | UIImageOrientation result = UIImageOrientationUp;
53 | CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)imageData, NULL);
54 | if (imageSource) {
55 | CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL);
56 | if (properties) {
57 | CFTypeRef val;
58 | int exifOrientation;
59 | val = CFDictionaryGetValue(properties, kCGImagePropertyOrientation);
60 | if (val) {
61 | CFNumberGetValue(val, kCFNumberIntType, &exifOrientation);
62 | result = [self sd_exifOrientationToiOSOrientation:exifOrientation];
63 | } // else - if it's not set it remains at up
64 | CFRelease((CFTypeRef) properties);
65 | } else {
66 | //NSLog(@"NO PROPERTIES, FAIL");
67 | }
68 | CFRelease(imageSource);
69 | }
70 | return result;
71 | }
72 |
73 | #pragma mark EXIF orientation tag converter
74 | // Convert an EXIF image orientation to an iOS one.
75 | // reference see here: http://sylvana.net/jpegcrop/exif_orientation.html
76 | + (UIImageOrientation) sd_exifOrientationToiOSOrientation:(int)exifOrientation {
77 | UIImageOrientation orientation = UIImageOrientationUp;
78 | switch (exifOrientation) {
79 | case 1:
80 | orientation = UIImageOrientationUp;
81 | break;
82 |
83 | case 3:
84 | orientation = UIImageOrientationDown;
85 | break;
86 |
87 | case 8:
88 | orientation = UIImageOrientationLeft;
89 | break;
90 |
91 | case 6:
92 | orientation = UIImageOrientationRight;
93 | break;
94 |
95 | case 2:
96 | orientation = UIImageOrientationUpMirrored;
97 | break;
98 |
99 | case 4:
100 | orientation = UIImageOrientationDownMirrored;
101 | break;
102 |
103 | case 5:
104 | orientation = UIImageOrientationLeftMirrored;
105 | break;
106 |
107 | case 7:
108 | orientation = UIImageOrientationRightMirrored;
109 | break;
110 | default:
111 | break;
112 | }
113 | return orientation;
114 | }
115 |
116 |
117 |
118 | @end
119 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import
10 | #import "SDWebImageManager.h"
11 |
12 | @interface UIView (WebCacheOperation)
13 |
14 | /**
15 | * Set the image load operation (storage in a UIView based dictionary)
16 | *
17 | * @param operation the operation
18 | * @param key key for storing the operation
19 | */
20 | - (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key;
21 |
22 | /**
23 | * Cancel all operations for the current UIView and key
24 | *
25 | * @param key key for identifying the operations
26 | */
27 | - (void)sd_cancelImageLoadOperationWithKey:(NSString *)key;
28 |
29 | /**
30 | * Just remove the operations corresponding to the current UIView and key without cancelling them
31 | *
32 | * @param key key for identifying the operations
33 | */
34 | - (void)sd_removeImageLoadOperationWithKey:(NSString *)key;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import "UIView+WebCacheOperation.h"
10 | #import "objc/runtime.h"
11 |
12 | static char loadOperationKey;
13 |
14 | @implementation UIView (WebCacheOperation)
15 |
16 | - (NSMutableDictionary *)operationDictionary {
17 | NSMutableDictionary *operations = objc_getAssociatedObject(self, &loadOperationKey);
18 | if (operations) {
19 | return operations;
20 | }
21 | operations = [NSMutableDictionary dictionary];
22 | objc_setAssociatedObject(self, &loadOperationKey, operations, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
23 | return operations;
24 | }
25 |
26 | - (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key {
27 | [self sd_cancelImageLoadOperationWithKey:key];
28 | NSMutableDictionary *operationDictionary = [self operationDictionary];
29 | [operationDictionary setObject:operation forKey:key];
30 | }
31 |
32 | - (void)sd_cancelImageLoadOperationWithKey:(NSString *)key {
33 | // Cancel in progress downloader from queue
34 | NSMutableDictionary *operationDictionary = [self operationDictionary];
35 | id operations = [operationDictionary objectForKey:key];
36 | if (operations) {
37 | if ([operations isKindOfClass:[NSArray class]]) {
38 | for (id operation in operations) {
39 | if (operation) {
40 | [operation cancel];
41 | }
42 | }
43 | } else if ([operations conformsToProtocol:@protocol(SDWebImageOperation)]){
44 | [(id) operations cancel];
45 | }
46 | [operationDictionary removeObjectForKey:key];
47 | }
48 | }
49 |
50 | - (void)sd_removeImageLoadOperationWithKey:(NSString *)key {
51 | NSMutableDictionary *operationDictionary = [self operationDictionary];
52 | [operationDictionary removeObjectForKey:key];
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/MBProgressHUD/MBProgressHUD-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_MBProgressHUD : NSObject
3 | @end
4 | @implementation PodsDummy_MBProgressHUD
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/MBProgressHUD/MBProgressHUD-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/MBProgressHUD/MBProgressHUD.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MBProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDWebImage"
4 | OTHER_LDFLAGS = -framework "CoreGraphics"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Masonry : NSObject
3 | @end
4 | @implementation PodsDummy_Masonry
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Masonry
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDWebImage"
4 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ImageAndVideoAndRecord/Pods-ImageAndVideoAndRecord-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## MBProgressHUD
5 |
6 | Copyright (c) 2009-2015 Matej Bukovinski
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 |
26 | ## Masonry
27 |
28 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
29 |
30 | Permission is hereby granted, free of charge, to any person obtaining a copy
31 | of this software and associated documentation files (the "Software"), to deal
32 | in the Software without restriction, including without limitation the rights
33 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34 | copies of the Software, and to permit persons to whom the Software is
35 | furnished to do so, subject to the following conditions:
36 |
37 | The above copyright notice and this permission notice shall be included in
38 | all copies or substantial portions of the Software.
39 |
40 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
46 | THE SOFTWARE.
47 |
48 | ## SDWebImage
49 |
50 | Copyright (c) 2016 Olivier Poitrey rs@dailymotion.com
51 |
52 | Permission is hereby granted, free of charge, to any person obtaining a copy
53 | of this software and associated documentation files (the "Software"), to deal
54 | in the Software without restriction, including without limitation the rights
55 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
56 | copies of the Software, and to permit persons to whom the Software is furnished
57 | to do so, subject to the following conditions:
58 |
59 | The above copyright notice and this permission notice shall be included in all
60 | copies or substantial portions of the Software.
61 |
62 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
63 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
64 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
66 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
67 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
68 | THE SOFTWARE.
69 |
70 |
71 | Generated by CocoaPods - https://cocoapods.org
72 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ImageAndVideoAndRecord/Pods-ImageAndVideoAndRecord-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ImageAndVideoAndRecord : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ImageAndVideoAndRecord
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ImageAndVideoAndRecord/Pods-ImageAndVideoAndRecord-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 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ImageAndVideoAndRecord/Pods-ImageAndVideoAndRecord.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDWebImage"
4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage"
5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage"
6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"MBProgressHUD" -l"Masonry" -l"SDWebImage" -framework "CoreGraphics" -framework "Foundation" -framework "ImageIO" -framework "UIKit"
7 | PODS_BUILD_DIR = $BUILD_DIR
8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
9 | PODS_ROOT = ${SRCROOT}/Pods
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ImageAndVideoAndRecord/Pods-ImageAndVideoAndRecord.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDWebImage"
4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage"
5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage"
6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"MBProgressHUD" -l"Masonry" -l"SDWebImage" -framework "CoreGraphics" -framework "Foundation" -framework "ImageIO" -framework "UIKit"
7 | PODS_BUILD_DIR = $BUILD_DIR
8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
9 | PODS_ROOT = ${SRCROOT}/Pods
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SDWebImage : NSObject
3 | @end
4 | @implementation PodsDummy_SDWebImage
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SDWebImage
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SDWebImage"
4 | OTHER_LDFLAGS = -framework "ImageIO"
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 |
--------------------------------------------------------------------------------