├── .com.apple.timemachine.supported
├── .swift-version
├── Example
├── HUPhotoBrowser Demo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── HUPhotoBrowser Demo.xccheckout
│ └── xcuserdata
│ │ ├── huluobo.xcuserdatad
│ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ │ ├── jewelz.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── HUPhotoBrowser Demo.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── mac.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── HUPhotoBrowser Demo.xcscheme
│ │ └── xcschememanagement.plist
├── HUPhotoBrowser Demo.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ ├── HUPhotoBrowser Demo.xccheckout
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ ├── huluobo.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── jewelz.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
├── HUPhotoBrowser Demo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── PhotoCell.h
│ ├── PhotoCell.m
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── main.m
│ └── placeholder.png
├── HUPhotoBrowser DemoTests
│ ├── HUPhotoBrowser_DemoTests.m
│ └── Info.plist
├── Podfile
├── Podfile.lock
└── Pods
│ ├── HUPhotoPicker
│ ├── HUPhotoPicker
│ │ ├── Assets
│ │ │ ├── HUAlbumCell.xib
│ │ │ ├── Jurisdiction_icon@2x.png
│ │ │ ├── Jurisdiction_icon@3x.png
│ │ │ ├── album_close_icon@2x.png
│ │ │ ├── album_close_icon@3x.png
│ │ │ ├── album_open_icon@2x.png
│ │ │ ├── album_open_icon@3x.png
│ │ │ ├── album_photograph_icon@2x.png
│ │ │ ├── album_photograph_icon@3x.png
│ │ │ ├── image_selected@2x.png
│ │ │ ├── image_selected@3x.png
│ │ │ ├── nav_back@2x.png
│ │ │ ├── nav_back@3x.png
│ │ │ ├── photo_button_normal@2x.png
│ │ │ ├── photo_button_normal@3x.png
│ │ │ ├── photo_button_selected@2x.png
│ │ │ └── photo_button_selected@3x.png
│ │ └── Classes
│ │ │ ├── Asset.h
│ │ │ ├── HUAlbumCell.h
│ │ │ ├── HUAlbumCell.m
│ │ │ ├── HUAlbumTableViewController.h
│ │ │ ├── HUAlbumTableViewController.m
│ │ │ ├── HUImageGridCell.h
│ │ │ ├── HUImageGridCell.m
│ │ │ ├── HUImageGridViewController.h
│ │ │ ├── HUImageGridViewController.m
│ │ │ ├── HUImagePickerViewController.h
│ │ │ ├── HUImagePickerViewController.m
│ │ │ ├── HUImageSelectModel.h
│ │ │ ├── HUImageSelectModel.m
│ │ │ ├── HUNavTitleView.h
│ │ │ ├── HUNavTitleView.m
│ │ │ ├── HUPHAuthorizationNotDeterminedView.h
│ │ │ ├── HUPHAuthorizationNotDeterminedView.m
│ │ │ ├── HUPHAuthorizationNotDeterminedViewController.h
│ │ │ ├── HUPHAuthorizationNotDeterminedViewController.m
│ │ │ ├── HUPhotoAlbum.h
│ │ │ ├── HUPhotoAlbum.m
│ │ │ ├── HUPhotoManager.h
│ │ │ ├── HUPhotoManager.m
│ │ │ ├── HUPhotoPicker.h
│ │ │ ├── HUTakePhotoCell.h
│ │ │ ├── HUTakePhotoCell.m
│ │ │ ├── HUToast.h
│ │ │ ├── HUToast.m
│ │ │ ├── NSBundle+HUPicker.h
│ │ │ ├── NSBundle+HUPicker.m
│ │ │ ├── UIBarButtonItem+HUButton.h
│ │ │ ├── UIBarButtonItem+HUButton.m
│ │ │ ├── UIView+HUConstraint.h
│ │ │ └── UIView+HUConstraint.m
│ ├── LICENSE
│ └── README.md
│ ├── Headers
│ ├── Private
│ │ ├── HUPhotoBrowser
│ │ │ ├── HUPhotoBrowser.h
│ │ │ ├── HUPhotoBrowserCell.h
│ │ │ ├── HUWebImage.h
│ │ │ ├── HUWebImageDownloadOperation.h
│ │ │ ├── HUWebImageDownloader.h
│ │ │ ├── UIImage+HUExtension.h
│ │ │ ├── UIImageView+HUWebImage.h
│ │ │ ├── UIView+frame.h
│ │ │ └── hu_const.h
│ │ ├── HUPhotoPicker
│ │ │ ├── Asset.h
│ │ │ ├── HUAlbumCell.h
│ │ │ ├── HUAlbumTableViewController.h
│ │ │ ├── HUImageGridCell.h
│ │ │ ├── HUImageGridViewController.h
│ │ │ ├── HUImagePickerViewController.h
│ │ │ ├── HUImageSelectModel.h
│ │ │ ├── HUNavTitleView.h
│ │ │ ├── HUPHAuthorizationNotDeterminedView.h
│ │ │ ├── HUPHAuthorizationNotDeterminedViewController.h
│ │ │ ├── HUPhotoAlbum.h
│ │ │ ├── HUPhotoManager.h
│ │ │ ├── HUPhotoPicker.h
│ │ │ ├── HUTakePhotoCell.h
│ │ │ ├── HUToast.h
│ │ │ ├── NSBundle+HUPicker.h
│ │ │ ├── UIBarButtonItem+HUButton.h
│ │ │ └── UIView+HUConstraint.h
│ │ ├── SDWebImage
│ │ │ ├── NSData+ImageContentType.h
│ │ │ ├── NSImage+WebCache.h
│ │ │ ├── SDImageCache.h
│ │ │ ├── SDImageCacheConfig.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+WebCache.h
│ │ │ └── UIView+WebCacheOperation.h
│ │ └── SVProgressHUD
│ │ │ ├── SVIndefiniteAnimatedView.h
│ │ │ ├── SVProgressAnimatedView.h
│ │ │ ├── SVProgressHUD.h
│ │ │ └── SVRadialGradientLayer.h
│ └── Public
│ │ ├── HUPhotoBrowser
│ │ ├── HUPhotoBrowser.h
│ │ ├── HUWebImageDownloader.h
│ │ └── UIImageView+HUWebImage.h
│ │ ├── HUPhotoPicker
│ │ ├── HUImagePickerViewController.h
│ │ ├── HUPhotoManager.h
│ │ └── HUPhotoPicker.h
│ │ ├── SDWebImage
│ │ ├── NSData+ImageContentType.h
│ │ ├── NSImage+WebCache.h
│ │ ├── SDImageCache.h
│ │ ├── SDImageCacheConfig.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+WebCache.h
│ │ └── UIView+WebCacheOperation.h
│ │ └── SVProgressHUD
│ │ ├── SVIndefiniteAnimatedView.h
│ │ ├── SVProgressAnimatedView.h
│ │ ├── SVProgressHUD.h
│ │ └── SVRadialGradientLayer.h
│ ├── Local Podspecs
│ └── HUPhotoBrowser.podspec.json
│ ├── Manifest.lock
│ ├── Pods.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ ├── huluobo.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── HUPhotoBrowser.xcscheme
│ │ │ ├── HUPhotoPicker-HUPhotoPicker.xcscheme
│ │ │ ├── HUPhotoPicker.xcscheme
│ │ │ ├── Pods-HUPhotoBrowser Demo.xcscheme
│ │ │ ├── Pods-HUPhotoBrowser DemoTests.xcscheme
│ │ │ ├── SDWebImage.xcscheme
│ │ │ ├── SVProgressHUD.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── jewelz.xcuserdatad
│ │ └── xcschemes
│ │ ├── HUPhotoBrowser.xcscheme
│ │ ├── HUPhotoPicker-HUPhotoPicker.xcscheme
│ │ ├── HUPhotoPicker.xcscheme
│ │ ├── Pods-HUPhotoBrowser Demo.xcscheme
│ │ ├── Pods-HUPhotoBrowser DemoTests.xcscheme
│ │ ├── SDWebImage.xcscheme
│ │ └── xcschememanagement.plist
│ ├── SDWebImage
│ ├── LICENSE
│ ├── README.md
│ └── SDWebImage
│ │ ├── NSData+ImageContentType.h
│ │ ├── NSData+ImageContentType.m
│ │ ├── NSImage+WebCache.h
│ │ ├── NSImage+WebCache.m
│ │ ├── SDImageCache.h
│ │ ├── SDImageCache.m
│ │ ├── SDImageCacheConfig.h
│ │ ├── SDImageCacheConfig.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+WebCache.h
│ │ ├── UIView+WebCache.m
│ │ ├── UIView+WebCacheOperation.h
│ │ └── UIView+WebCacheOperation.m
│ ├── SVProgressHUD
│ ├── LICENSE.txt
│ ├── README.md
│ └── SVProgressHUD
│ │ ├── SVIndefiniteAnimatedView.h
│ │ ├── SVIndefiniteAnimatedView.m
│ │ ├── SVProgressAnimatedView.h
│ │ ├── SVProgressAnimatedView.m
│ │ ├── SVProgressHUD.bundle
│ │ ├── angle-mask.png
│ │ ├── angle-mask@2x.png
│ │ ├── angle-mask@3x.png
│ │ ├── error.png
│ │ ├── error@2x.png
│ │ ├── error@3x.png
│ │ ├── info.png
│ │ ├── info@2x.png
│ │ ├── info@3x.png
│ │ ├── success.png
│ │ ├── success@2x.png
│ │ └── success@3x.png
│ │ ├── SVProgressHUD.h
│ │ ├── SVProgressHUD.m
│ │ ├── SVRadialGradientLayer.h
│ │ └── SVRadialGradientLayer.m
│ └── Target Support Files
│ ├── HUPhotoBrowser
│ ├── HUPhotoBrowser-dummy.m
│ ├── HUPhotoBrowser-prefix.pch
│ └── HUPhotoBrowser.xcconfig
│ ├── HUPhotoPicker
│ ├── HUPhotoPicker-dummy.m
│ ├── HUPhotoPicker-prefix.pch
│ ├── HUPhotoPicker.xcconfig
│ └── ResourceBundle-HUPhotoPicker-Info.plist
│ ├── Pods-HUPhotoBrowser Demo
│ ├── Pods-HUPhotoBrowser Demo-acknowledgements.markdown
│ ├── Pods-HUPhotoBrowser Demo-acknowledgements.plist
│ ├── Pods-HUPhotoBrowser Demo-dummy.m
│ ├── Pods-HUPhotoBrowser Demo-frameworks.sh
│ ├── Pods-HUPhotoBrowser Demo-resources.sh
│ ├── Pods-HUPhotoBrowser Demo.debug.xcconfig
│ └── Pods-HUPhotoBrowser Demo.release.xcconfig
│ ├── Pods-HUPhotoBrowser DemoTests
│ ├── Pods-HUPhotoBrowser DemoTests-acknowledgements.markdown
│ ├── Pods-HUPhotoBrowser DemoTests-acknowledgements.plist
│ ├── Pods-HUPhotoBrowser DemoTests-dummy.m
│ ├── Pods-HUPhotoBrowser DemoTests-frameworks.sh
│ ├── Pods-HUPhotoBrowser DemoTests-resources.sh
│ ├── Pods-HUPhotoBrowser DemoTests.debug.xcconfig
│ └── Pods-HUPhotoBrowser DemoTests.release.xcconfig
│ ├── SDWebImage
│ ├── SDWebImage-dummy.m
│ ├── SDWebImage-prefix.pch
│ └── SDWebImage.xcconfig
│ └── SVProgressHUD
│ ├── SVProgressHUD-dummy.m
│ ├── SVProgressHUD-prefix.pch
│ └── SVProgressHUD.xcconfig
├── HUPhotoBrowser.a
├── HUPhotoBrowser.podspec
├── HUPhotoBrowser.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── HUPhotoBrowser.xccheckout
│ └── xcuserdata
│ │ └── jewelz.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ ├── jewelz.xcuserdatad
│ └── xcschemes
│ │ ├── HUPhotoBrowser.xcscheme
│ │ └── xcschememanagement.plist
│ └── mac.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ ├── HUPhotoBrowser.xcscheme
│ └── xcschememanagement.plist
├── HUPhotoBrowser
├── HUPhotoBrowser.h
├── HUPhotoBrowser.m
├── HUPhotoBrowserCell.h
├── HUPhotoBrowserCell.m
├── HUWebImageDownloader
│ ├── HUWebImage.h
│ ├── HUWebImageDownloadOperation.h
│ ├── HUWebImageDownloadOperation.m
│ ├── HUWebImageDownloader.h
│ ├── HUWebImageDownloader.m
│ ├── UIImage+HUExtension.h
│ ├── UIImage+HUExtension.m
│ ├── UIImageView+HUWebImage.h
│ └── UIImageView+HUWebImage.m
├── UIView+frame.h
├── UIView+frame.m
└── hu_const.h
├── HUPhotoBrowserTests
└── Info.plist
├── LICENSE
├── README.md
└── screenshot
├── 2016-04-3008_57_13.gif
├── 2016-04-309.57.28.png
├── 2016-04-309.57.39.png
├── 2016-04-309.58.04.png
└── 201604301836.png
/.com.apple.timemachine.supported:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/.com.apple.timemachine.supported
--------------------------------------------------------------------------------
/.swift-version:
--------------------------------------------------------------------------------
1 | 2.3
2 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcodeproj/project.xcworkspace/xcshareddata/HUPhotoBrowser Demo.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | CE29FB11-1DFE-4499-9106-1E1B43F85B28
9 | IDESourceControlProjectName
10 | HUPhotoBrowser Demo
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
14 | https://github.com/hujewelz/HUPhotoBrowser.git
15 |
16 | IDESourceControlProjectPath
17 | Example/HUPhotoBrowser Demo.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
21 | ../../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/hujewelz/HUPhotoBrowser.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
36 | IDESourceControlWCCName
37 | HUPhotoBrowser
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcodeproj/xcuserdata/huluobo.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HUPhotoBrowser Demo.xcscheme
8 |
9 | orderHint
10 | 7
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcodeproj/xcuserdata/jewelz.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HUPhotoBrowser Demo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 0406239C1C7E9989005653C1
16 |
17 | primary
18 |
19 |
20 | 040623B51C7E9989005653C1
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HUPhotoBrowser Demo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 0406239C1C7E9989005653C1
16 |
17 | primary
18 |
19 |
20 | 040623B51C7E9989005653C1
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcworkspace/xcshareddata/HUPhotoBrowser Demo.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 06162301-A6AF-43BC-A098-A5C0AEEEF86B
9 | IDESourceControlProjectName
10 | HUPhotoBrowser Demo
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
14 | https://github.com/hujewelz/HUPhotoBrowser.git
15 |
16 | IDESourceControlProjectPath
17 | Example/HUPhotoBrowser Demo.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/hujewelz/HUPhotoBrowser.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
36 | IDESourceControlWCCName
37 | HUPhotoBrowser
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcworkspace/xcuserdata/huluobo.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/HUPhotoBrowser Demo.xcworkspace/xcuserdata/huluobo.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcworkspace/xcuserdata/huluobo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo.xcworkspace/xcuserdata/jewelz.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/HUPhotoBrowser Demo.xcworkspace/xcuserdata/jewelz.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // HUPhotoBrowser Demo
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. 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 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // HUPhotoBrowser Demo
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // 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.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // 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.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // 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.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSAllowsArbitraryLoads
28 |
29 |
30 | UILaunchStoryboardName
31 | LaunchScreen
32 | UIMainStoryboardFile
33 | Main
34 | UIRequiredDeviceCapabilities
35 |
36 | armv7
37 |
38 | UISupportedInterfaceOrientations
39 |
40 | UIInterfaceOrientationPortrait
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | NSPhotoLibraryUsageDescription
45 |
46 | UIViewControllerBasedStatusBarAppearance
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo/PhotoCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // PhotoCell.h
3 | // HUPhotoBrowser Demo
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface PhotoCell : UICollectionViewCell
12 |
13 | @property (weak, nonatomic) IBOutlet UIImageView *imageView;
14 |
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo/PhotoCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // PhotoCell.m
3 | // HUPhotoBrowser Demo
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import "PhotoCell.h"
10 |
11 | @implementation PhotoCell
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // HUPhotoBrowser Demo
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // HUPhotoBrowser Demo
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. 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 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser Demo/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/HUPhotoBrowser Demo/placeholder.png
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser DemoTests/HUPhotoBrowser_DemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // HUPhotoBrowser_DemoTests.m
3 | // HUPhotoBrowser DemoTests
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface HUPhotoBrowser_DemoTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation HUPhotoBrowser_DemoTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Example/HUPhotoBrowser DemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | platform :ios, '8.0'
3 | # Uncomment this line if you're using Swift
4 | # use_frameworks!
5 |
6 | target 'HUPhotoBrowser Demo' do
7 |
8 | pod 'HUPhotoBrowser', :path => '../'
9 | pod 'SDWebImage'
10 | pod 'HUPhotoPicker', '~> 1.0.3'
11 | end
12 |
13 | target 'HUPhotoBrowser DemoTests' do
14 |
15 | end
16 |
17 |
--------------------------------------------------------------------------------
/Example/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - HUPhotoBrowser (1.3.0):
3 | - SVProgressHUD
4 | - HUPhotoPicker (1.0.3)
5 | - SDWebImage (4.1.2):
6 | - SDWebImage/Core (= 4.1.2)
7 | - SDWebImage/Core (4.1.2)
8 | - SVProgressHUD (2.2.2)
9 |
10 | DEPENDENCIES:
11 | - HUPhotoBrowser (from `../`)
12 | - HUPhotoPicker (~> 1.0.3)
13 | - SDWebImage
14 |
15 | EXTERNAL SOURCES:
16 | HUPhotoBrowser:
17 | :path: ../
18 |
19 | SPEC CHECKSUMS:
20 | HUPhotoBrowser: be7da9bcd5e6f4554208c94d230f271ffa88df62
21 | HUPhotoPicker: e5ec94c512b9628b76d6599006423f0a04d541cb
22 | SDWebImage: cb6f9f266a9977741efcbc21e618e8be3734c774
23 | SVProgressHUD: 59b2d3dabacbd051576d21d32293ca7228dc18b0
24 |
25 | PODFILE CHECKSUM: e4e6cc855a091fd3213356476a9d01dcc4164c3f
26 |
27 | COCOAPODS: 1.3.1
28 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/Jurisdiction_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/Jurisdiction_icon@2x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/Jurisdiction_icon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/Jurisdiction_icon@3x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_close_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_close_icon@2x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_close_icon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_close_icon@3x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_open_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_open_icon@2x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_open_icon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_open_icon@3x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_photograph_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_photograph_icon@2x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_photograph_icon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/album_photograph_icon@3x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/image_selected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/image_selected@2x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/image_selected@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/image_selected@3x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/nav_back@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/nav_back@2x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/nav_back@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/nav_back@3x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/photo_button_normal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/photo_button_normal@2x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/photo_button_normal@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/photo_button_normal@3x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/photo_button_selected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/photo_button_selected@2x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/photo_button_selected@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/HUPhotoPicker/HUPhotoPicker/Assets/photo_button_selected@3x.png
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/Asset.h:
--------------------------------------------------------------------------------
1 | //
2 | // Asset.h
3 | // HUPhotoPicker
4 | //
5 | // Created by jewelz on 2017/7/28.
6 | //
7 |
8 | #ifndef Asset_h
9 | #define Asset_h
10 |
11 | #import "NSBundle+HUPicker.h"
12 |
13 | #define UIFontBoldMake(size) [UIFont boldSystemFontOfSize:(size)]
14 | #define UIFontMake(size) [UIFont systemFontOfSize:(size)]
15 | #define UIColorMake(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]
16 |
17 | #define UIImageMake(named) [NSBundle hu_imageNamed:(named)]
18 |
19 | #endif /* Asset_h */
20 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUAlbumCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // BAAlbumCell.h
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/6/26.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HUAlbumCell : UITableViewCell
12 |
13 | + (UINib *)nib;
14 | + (NSString *)reuseIdentifier;
15 |
16 | @property (weak, nonatomic) IBOutlet UIImageView *album;
17 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel;
18 | @property (weak, nonatomic) IBOutlet UILabel *countLabel;
19 |
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUAlbumCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // BAAlbumCell.m
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/6/26.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import "HUAlbumCell.h"
10 | #import "NSBundle+HUPicker.h"
11 | #import "NSBundle+HUPicker.h"
12 |
13 | @implementation HUAlbumCell
14 |
15 | + (UINib *)nib {
16 | // NSBundle *podBundle = [NSBundle bundleForClass:[self class]];
17 |
18 | return [UINib nibWithNibName:@"HUAlbumCell" bundle:[NSBundle hu_bundle]];
19 | }
20 |
21 | + (NSString *)reuseIdentifier {
22 | return @"BAAlbumCell";
23 | }
24 |
25 | - (void)awakeFromNib {
26 | [super awakeFromNib];
27 | // Initialization code
28 | }
29 |
30 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
31 | [super setSelected:selected animated:animated];
32 |
33 | // Configure the view for the selected state
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUAlbumTableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // BAAlbumTableViewController.h
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/6/22.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class PHFetchResult;
12 | @interface HUAlbumTableViewController : UITableViewController
13 |
14 | @property (nonatomic, copy) void (^didSelectedAlbum)(NSString *title, PHFetchResult *fetchResult);
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUImageGridCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // BAImageGridCell.h
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/6/22.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "HUImageSelectModel.h"
11 |
12 | @interface HUImageGridCell : UICollectionViewCell
13 |
14 | + (NSString *)reuseIdentifier;
15 |
16 | @property (nonatomic, strong) UIImageView *thumbnail;
17 | @property (nonatomic, strong) UIButton *degradedButton;
18 |
19 | @property (nonatomic, assign) BOOL isDegraded;
20 | @property (nonatomic, copy) NSString *representedAssetIdentifier;
21 |
22 | @property (nonatomic, strong) HUImageSelectModel *model;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUImageGridCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HUImageGridCell.m
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/6/22.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import "HUImageGridCell.h"
10 | #import "Asset.h"
11 | #import "UIView+HUConstraint.h"
12 | //#import "NSBundle+HUPicker.h"
13 |
14 | @interface HUImageGridCell ()
15 |
16 | @property (nonatomic, strong) UIButton *checkButton;
17 |
18 |
19 | @end
20 | @implementation HUImageGridCell
21 |
22 | + (NSString *)reuseIdentifier {
23 | return @"HUImageGridCell";
24 | }
25 |
26 | - (instancetype)initWithFrame:(CGRect)frame {
27 | self = [super initWithFrame:frame];
28 | if (self) {
29 | [self setupView];
30 | }
31 | return self;
32 | }
33 |
34 | - (void)setModel:(HUImageSelectModel *)model {
35 | _model = model;
36 |
37 | [_checkButton setSelected:model.isSelected];
38 | if (model.isSelected) {
39 | NSString *title = [NSString stringWithFormat:@"%zd", model.index];
40 | [_checkButton setTitle:title forState:UIControlStateSelected];
41 | }
42 | }
43 |
44 | - (void)setIsDegraded:(BOOL)isDegraded {
45 | _isDegraded = isDegraded;
46 | self.degradedButton.hidden = !isDegraded;
47 | // NSLog(@"is degraded: %zd", isDegraded);
48 | }
49 |
50 | - (void)setupView {
51 | [self.contentView addSubview:self.thumbnail];
52 |
53 | [self.contentView addConstraintsWithVisualFormat:@"H:|[v0]|" views:@[self.thumbnail]];
54 | [self.contentView addConstraintsWithVisualFormat:@"V:|[v0]|" views:@[self.thumbnail]];
55 |
56 | [self.contentView addSubview:self.checkButton];
57 | [self.contentView addConstraintsWithVisualFormat:@"H:[v0(==22)]-2-|" views:@[self.checkButton]];
58 | [self.contentView addConstraintsWithVisualFormat:@"V:|-2-[v0(==22)]" views:@[self.checkButton]];
59 |
60 |
61 | [self.contentView addSubview:self.degradedButton];
62 | [self.contentView addConstraintsWithVisualFormat:@"H:|[v0]|" views:@[self.degradedButton]];
63 | [self.contentView addConstraintsWithVisualFormat:@"V:|[v0]|" views:@[self.degradedButton]];
64 |
65 | }
66 |
67 | - (UIImageView *)thumbnail {
68 | if (_thumbnail == nil) {
69 | _thumbnail = [UIImageView new];
70 | _thumbnail.contentMode = UIViewContentModeScaleAspectFill;
71 | _thumbnail.backgroundColor = [UIColor redColor];
72 | _thumbnail.clipsToBounds = YES;
73 | }
74 | return _thumbnail;
75 | }
76 |
77 | - (UIButton *)checkButton {
78 | if (_checkButton == nil) {
79 | _checkButton = [UIButton buttonWithType:UIButtonTypeCustom];
80 | [_checkButton setBackgroundImage:UIImageMake(@"photo_button_normal") forState:UIControlStateNormal];
81 | [_checkButton setBackgroundImage:UIImageMake(@"photo_button_selected") forState:UIControlStateSelected];
82 | [_checkButton setTitle:nil forState:UIControlStateNormal];
83 | _checkButton.adjustsImageWhenHighlighted = NO;
84 | _checkButton.userInteractionEnabled = NO;
85 | [_checkButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
86 | _checkButton.titleLabel.font = [UIFont systemFontOfSize:13];
87 | }
88 | return _checkButton;
89 | }
90 |
91 | - (UIButton *)degradedButton {
92 | if (_degradedButton == nil) {
93 | _degradedButton = [UIButton buttonWithType:UIButtonTypeCustom];
94 | _degradedButton.adjustsImageWhenHighlighted = NO;
95 | //_degradedButton.backgroundColor = [UIColor redColor];
96 | _degradedButton.backgroundColor = [UIColor colorWithWhite:1 alpha:0.5];
97 | }
98 | return _degradedButton;
99 | }
100 |
101 | @end
102 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUImageGridViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUImageGridViewController.h
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/6/22.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface HUImageGridViewController : UIViewController
13 |
14 | @property (nonatomic, strong) PHFetchResult *fetchResult;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUImagePickerViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUImagePickerViewController.h
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/6/22.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class HUImagePickerViewController, PHAsset;
12 | @protocol HUImagePickerViewControllerDelegate
13 |
14 | @optional
15 |
16 | - (void)imagePickerViewController:(nonnull HUImagePickerViewController *)imagePickerViewController
17 | didFinishPickingImageWithImages:(nonnull NSArray *)images assets:(nullable NSArray *)assets;
18 |
19 | - (void)imagePickerViewControllerDidBeginUploadImage:(nonnull HUImagePickerViewController *)imagePickerViewController;
20 |
21 |
22 | @end
23 |
24 | @interface HUImagePickerViewController : UINavigationController
25 |
26 | - (instancetype _Nonnull )initWithMaxCount:(NSInteger)maxCount numberOfColumns:(NSInteger)columns;
27 |
28 |
29 | @property (nonatomic, weak, nullable) id delegate;
30 |
31 | @property (nonatomic, assign) NSInteger maxCount;
32 |
33 | @property (nonatomic, assign) NSInteger numberOfColumns;
34 |
35 | @property (nonatomic, assign) CGFloat spacing;
36 |
37 | /// 是否允许通过网络下载iCloud图片,默认为 NO
38 | @property (nonatomic, assign, getter=isNetworkAccessAllowed) BOOL networkAccessAllowed;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUImagePickerViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HUImagePickerViewController.m
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/6/22.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import "HUImagePickerViewController.h"
10 | #import "HUAlbumTableViewController.h"
11 | #import "HUImageGridViewController.h"
12 | #import "HUPHAuthorizationNotDeterminedView.h"
13 | #import "HUPHAuthorizationNotDeterminedViewController.h"
14 | #import "Asset.h"
15 | #import
16 |
17 | @interface HUImagePickerViewController ()
18 |
19 | @end
20 |
21 | @implementation HUImagePickerViewController
22 | @synthesize delegate = _delegate;
23 |
24 | - (instancetype)initWithMaxCount:(NSInteger)maxCount numberOfColumns:(NSInteger)columns {
25 |
26 | UIViewController *rootVc = nil;
27 | PHAuthorizationStatus author = [PHPhotoLibrary authorizationStatus];
28 | if (author == PHAuthorizationStatusRestricted || author == PHAuthorizationStatusDenied) {
29 | rootVc = [[HUPHAuthorizationNotDeterminedViewController alloc] init];
30 | } else {
31 | rootVc = [[HUImageGridViewController alloc] init];
32 | }
33 | self = [super initWithRootViewController:rootVc];
34 | if (self) {
35 | _maxCount = maxCount;
36 | _numberOfColumns = columns;
37 | _spacing = 1.5;
38 | }
39 | return self;
40 | }
41 |
42 | - (instancetype)init {
43 |
44 | return [self initWithMaxCount:10 numberOfColumns:4];
45 | }
46 |
47 |
48 | - (void)viewDidLoad {
49 | [super viewDidLoad];
50 |
51 |
52 | [[UINavigationBar appearance] setTintColor:UIColorMake(30, 30, 30)];
53 | NSDictionary *titleAttribute = @{NSForegroundColorAttributeName:UIColorMake(30, 30, 30), NSFontAttributeName:[UIFont systemFontOfSize:17]};
54 | [[UINavigationBar appearance] setTitleTextAttributes:titleAttribute];
55 |
56 | //设置正常状态
57 | NSDictionary *attribute = @{NSForegroundColorAttributeName:UIColorMake(81, 88, 102), NSFontAttributeName:[UIFont systemFontOfSize:15]};
58 | [[UIBarButtonItem appearance] setTitleTextAttributes:attribute forState:UIControlStateNormal];
59 |
60 | //设置不可用状态
61 | NSDictionary *disAttribute = @{NSForegroundColorAttributeName:UIColorMake(209, 209, 209), NSFontAttributeName:[UIFont systemFontOfSize:15]};
62 | [[UIBarButtonItem appearance] setTitleTextAttributes:disAttribute forState:UIControlStateDisabled];
63 |
64 | // PHAuthorizationStatus author = [PHPhotoLibrary authorizationStatus];
65 | // if (author == PHAuthorizationStatusNotDetermined || author == PHAuthorizationStatusAuthorized) {
66 | // HUAlbumTableViewController *vc = [[HUAlbumTableViewController alloc] init];
67 | //
68 | // [self pushViewController:vc animated:true];
69 | // }
70 |
71 | }
72 |
73 | - (void)setDelegate:(id)delegate {
74 | _delegate = delegate;
75 | }
76 |
77 | - (id)delegate {
78 | return _delegate;
79 | }
80 |
81 |
82 |
83 | @end
84 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUImageSelectModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // BAImageSelectModel.h
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/6/22.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class PHAsset;
12 | @interface HUImageSelectModel : NSObject
13 |
14 | @property (nonatomic, assign) BOOL isSelected;
15 | @property (nonatomic, assign) NSInteger index;
16 | @property (nonatomic, strong) PHAsset *asset;
17 | @property (nonatomic, strong) NSIndexPath *indexPath;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUImageSelectModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // BAImageSelectModel.m
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/6/22.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import "HUImageSelectModel.h"
10 |
11 | @implementation HUImageSelectModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUNavTitleView.h:
--------------------------------------------------------------------------------
1 | //
2 | // NavTitleView.h
3 | // HUPhotoPicker
4 | //
5 | // Created by jewelz on 2017/9/27.
6 | //
7 |
8 | #import
9 |
10 | @interface HUNavTitleView : UIButton
11 |
12 | @property (nonatomic, copy) NSString *title;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUNavTitleView.m:
--------------------------------------------------------------------------------
1 | //
2 | // NavTitleView.m
3 | // HUPhotoPicker
4 | //
5 | // Created by jewelz on 2017/9/27.
6 | //
7 |
8 | #import "HUNavTitleView.h"
9 | #import "NSBundle+HUPicker.h"
10 |
11 | @interface HUNavTitleView()
12 |
13 | @end
14 |
15 | @implementation HUNavTitleView
16 |
17 | - (void)setTitle:(NSString *)title {
18 | _title = [title copy];
19 |
20 | [self setTitle:title forState:UIControlStateNormal];
21 | [self setTitle:title forState:UIControlStateSelected];
22 | [self setTitleEdgeInsets:UIEdgeInsetsMake(0, -self.imageView.image.size.width * 2 - 3, 0, 0)];
23 |
24 | CGFloat titleWidth = [title sizeWithAttributes:@{NSFontAttributeName: self.titleLabel.font}].width + 3;
25 | //CGFloat titleWidth = self.titleLabel.bounds.size.width;
26 | [self setImageEdgeInsets:UIEdgeInsetsMake(0, titleWidth, 0, -titleWidth)];
27 |
28 |
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUPHAuthorizationNotDeterminedView.h:
--------------------------------------------------------------------------------
1 | //
2 | // BAPHAuthorizationNotDeterminedView.h
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/7/20.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HUPHAuthorizationNotDeterminedView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUPHAuthorizationNotDeterminedView.m:
--------------------------------------------------------------------------------
1 | //
2 | // BAPHAuthorizationNotDeterminedView.m
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/7/20.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import "HUPHAuthorizationNotDeterminedView.h"
10 | #import "Asset.h"
11 | #import "UIView+HUConstraint.h"
12 |
13 | @interface HUPHAuthorizationNotDeterminedView()
14 |
15 | @property (nonatomic, strong) UIImageView *imageView;
16 | @property (nonatomic, strong) UILabel *titleLabel;
17 | @property (nonatomic, strong) UILabel *descLabel;
18 |
19 | @end
20 |
21 | @implementation HUPHAuthorizationNotDeterminedView
22 |
23 | - (instancetype)initWithFrame:(CGRect)frame
24 | {
25 | self = [super initWithFrame:frame];
26 | if (self) {
27 | [self setupView];
28 | }
29 | return self;
30 | }
31 |
32 | - (void)setupView {
33 |
34 | [self addSubview:self.imageView];
35 |
36 | [self centerXOffset:0 forView:self.imageView];
37 | [self centerYOffset:-30 forView:self.imageView];
38 |
39 |
40 | [self addSubview:self.titleLabel];
41 | [self addConstraintsWithVisualFormat:@"V:[v0]-30-[v1]" views:@[self.imageView, self.titleLabel]];
42 | [self centerXOffset:0 forView:self.titleLabel];
43 |
44 |
45 | [self addSubview:self.descLabel];
46 | [self centerXOffset:0 forView:self.descLabel];
47 | [self addConstraintsWithVisualFormat:@"V:[v0]-8-[v1]" views:@[self.titleLabel, self.descLabel]];
48 |
49 |
50 | }
51 |
52 | - (UIImageView *)imageView {
53 | if (_imageView == nil) {
54 | _imageView = [[UIImageView alloc] init];
55 | _imageView.image = UIImageMake(@"Jurisdiction_icon");
56 | }
57 | return _imageView;
58 | }
59 |
60 | - (UILabel *)titleLabel {
61 | if (_titleLabel == nil) {
62 | _titleLabel = [[UILabel alloc] init];
63 | _titleLabel.font = UIFontBoldMake(17);
64 | _titleLabel.text = @"此应用没有权限访问您的照片或视频。";
65 | _titleLabel.textColor = UIColorMake(98, 107, 122);
66 | }
67 | return _titleLabel;
68 | }
69 |
70 | - (UILabel *)descLabel {
71 | if (_descLabel == nil) {
72 | _descLabel = [[UILabel alloc] init];
73 | _descLabel.font = UIFontMake(15);
74 | _descLabel.text = @"您可以在\"隐私设置\"中启用访问。";
75 | _descLabel.textColor = [UIColor lightGrayColor];
76 | }
77 | return _descLabel;
78 | }
79 |
80 | @end
81 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUPHAuthorizationNotDeterminedViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // BAPHAuthorizationNotDeterminedViewController.h
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/7/20.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HUPHAuthorizationNotDeterminedViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUPHAuthorizationNotDeterminedViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HUPHAuthorizationNotDeterminedViewController.m
3 | // beautyAssistant
4 | //
5 | // Created by jewelz on 2017/7/20.
6 | // Copyright © 2017年 Service+. All rights reserved.
7 | //
8 |
9 | #import "HUPHAuthorizationNotDeterminedViewController.h"
10 | #import "HUPHAuthorizationNotDeterminedView.h"
11 | #import "HUImagePickerViewController.h"
12 |
13 | @interface HUPHAuthorizationNotDeterminedViewController ()
14 |
15 | @property (nonatomic, strong) HUPHAuthorizationNotDeterminedView *notDeterminedView;
16 |
17 | @end
18 |
19 | @implementation HUPHAuthorizationNotDeterminedViewController
20 |
21 | - (void)viewDidLoad {
22 | [super viewDidLoad];
23 | self.view.backgroundColor = [UIColor whiteColor];
24 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"取消" style:UIBarButtonItemStylePlain target:self action:@selector(rightBarItemClicked)];
25 |
26 | [self.view addSubview:self.notDeterminedView];
27 | }
28 |
29 | #pragma mark - Action
30 |
31 | - (void)rightBarItemClicked {
32 | //[SVProgressHUD dismiss];
33 | if ([self.navigationController isKindOfClass:[HUImagePickerViewController class]]) {
34 | [self.navigationController dismissViewControllerAnimated:YES completion:nil];
35 | }
36 | }
37 |
38 | - (HUPHAuthorizationNotDeterminedView *)notDeterminedView {
39 | if (_notDeterminedView == nil) {
40 | _notDeterminedView = [[HUPHAuthorizationNotDeterminedView alloc] initWithFrame:self.view.bounds];
41 | }
42 | return _notDeterminedView;
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUPhotoAlbum.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUPhotoAlbum.h
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/9/15.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @class PHAssetCollection;
12 | @interface HUPhotoAlbum : NSObject
13 |
14 | @property (nonatomic, copy) NSString *title;
15 | @property (nonatomic, assign) NSUInteger assetCount;
16 | @property (nonatomic, strong) PHAssetCollection *collection;
17 |
18 | + (instancetype)photoAlbumWithAssetCollection:(PHAssetCollection *)collection assetCount:(NSUInteger)count;
19 | - (instancetype)initWithAssetCollection:(PHAssetCollection *)collection assetCount:(NSUInteger)count;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUPhotoAlbum.m:
--------------------------------------------------------------------------------
1 | //
2 | // HUPhotoAlbum.m
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/9/15.
6 | //
7 | //
8 |
9 | #import "HUPhotoAlbum.h"
10 | #import
11 |
12 | @implementation HUPhotoAlbum
13 |
14 | + (instancetype)photoAlbumWithAssetCollection:(PHAssetCollection *)collection assetCount:(NSUInteger)count {
15 | return [[self alloc] initWithAssetCollection:collection assetCount:count];
16 | }
17 |
18 | - (instancetype)initWithAssetCollection:(PHAssetCollection *)collection assetCount:(NSUInteger)count {
19 | self = [super init];
20 | if (self) {
21 | self.title = collection.localizedTitle;
22 | self.collection = collection;
23 | self.assetCount = count;
24 | }
25 | return self;
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUPhotoManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUPhotoHelper.h
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/7/29.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @class PHAsset;
12 | @interface HUPhotoManager : NSObject
13 |
14 | @property (nonatomic, assign, getter=isNetworkAccessAllowed) BOOL networkAccessAllowed;
15 |
16 |
17 | + (nonnull instancetype)sharedInstance;
18 |
19 | - (void)fetchPhotoWithAsset:(nonnull PHAsset *)asset
20 | progress:(nullable void(^)(double progress))progress
21 | completed:(nullable void(^)(BOOL success, UIImage * _Nonnull image))completed;
22 |
23 | - (void)fetchPhotosWithAssets:(nonnull NSArray *)assets
24 | progress:(nullable void(^)(double progress))progress
25 | completed:(nullable void(^)(NSArray * _Nonnull images))completed;
26 |
27 | - (void)cancelPhotoRequest;
28 |
29 | - (void)checkPhotoIsAvaliableWithAsset:(nonnull PHAsset *)asset
30 | progress:(nullable void(^)(double progress))progress
31 | completed:(nullable void(^)(BOOL avaliable, UIImage * _Nonnull image))completed;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUPhotoPicker.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUPhotoPicker.h
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/7/28.
6 | //
7 | //
8 |
9 | #ifndef HUPhotoPicker_h
10 | #define HUPhotoPicker_h
11 |
12 | #import
13 | #import "HUImagePickerViewController.h"
14 |
15 | #endif /* HUPhotoPicker_h */
16 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUTakePhotoCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUTakePhotoCell.h
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/9/15.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface HUTakePhotoCell : UICollectionViewCell
12 |
13 | + (NSString *)reuseIdentifier;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUTakePhotoCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HUTakePhotoCell.m
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/9/15.
6 | //
7 | //
8 |
9 | #import "HUTakePhotoCell.h"
10 | #import "UIView+HUConstraint.h"
11 | #import "Asset.h"
12 |
13 | @implementation HUTakePhotoCell
14 |
15 | - (instancetype)initWithFrame:(CGRect)frame {
16 | self = [super initWithFrame:frame];
17 | if (self) {
18 | [self setupView];
19 | }
20 | return self;
21 | }
22 |
23 |
24 | - (void)setupView {
25 |
26 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
27 | button.backgroundColor = [UIColor whiteColor];
28 | [button setImage:UIImageMake(@"album_photograph_icon") forState:UIControlStateNormal];
29 | button.userInteractionEnabled = NO;
30 | [self.contentView addSubview:button];
31 |
32 | [self.contentView addConstraintsWithVisualFormat:@"H:|[v0]|" views:@[button]];
33 | [self.contentView addConstraintsWithVisualFormat:@"V:|[v0]|" views:@[button]];
34 |
35 | }
36 |
37 |
38 | + (NSString *)reuseIdentifier {
39 | return @"HUTakePhotoCell";
40 | }
41 |
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUToast.h:
--------------------------------------------------------------------------------
1 | //
2 | // Toast.h
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/9/16.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface HUToast : UIView
12 |
13 |
14 | + (void)makeToast:(NSString *)message inView:(UIView *)view;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/HUToast.m:
--------------------------------------------------------------------------------
1 | //
2 | // Toast.m
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/9/16.
6 | //
7 | //
8 |
9 | #import "HUToast.h"
10 | #import "UIView+HUConstraint.h"
11 |
12 | @interface HUToast ()
13 |
14 | @property (nonatomic, strong) UILabel *messageLabel;
15 |
16 | @end
17 |
18 | @implementation HUToast
19 |
20 | + (instancetype)sharedInstance {
21 | static HUToast *toast = nil;
22 | static dispatch_once_t onceToken;
23 | dispatch_once(&onceToken, ^{
24 | toast = [[self alloc] init];
25 | });
26 | return toast;
27 | }
28 |
29 | + (void)makeToast:(NSString *)message inView:(UIView *)view {
30 | [[HUToast sharedInstance] makeToast:message inView:view];
31 | }
32 |
33 | - (instancetype)initWithFrame:(CGRect)frame {
34 | self = [super initWithFrame:CGRectMake(0, 0, 160, 100)];
35 | if (self) {
36 | [self setupView];
37 | }
38 | return self;
39 | }
40 |
41 | - (void)layoutSubviews {
42 | [super layoutSubviews];
43 |
44 | self.messageLabel.frame = self.bounds;
45 | }
46 |
47 | - (void)makeToast:(NSString *)message inView:(UIView *)view {
48 |
49 | if ([view.subviews containsObject:self]) {
50 | return;
51 | }
52 |
53 | self.alpha = 0;
54 | self.messageLabel.text = message;
55 | self.center = CGPointMake(view.frame.size.width/2, view.frame.size.height/2);
56 | [view addSubview:self];
57 | [UIView animateWithDuration:0.25 animations:^{
58 | self.alpha = 1;
59 | } completion:^(BOOL finished) {
60 | NSTimer *timer = [NSTimer timerWithTimeInterval:1 target:self selector:@selector(hide:) userInfo:nil repeats:NO];
61 | [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
62 | }];
63 |
64 | }
65 |
66 | - (void)hide:(NSTimer *)timer {
67 |
68 | [UIView animateWithDuration:0.25 animations:^{
69 | self.alpha = 0;
70 | } completion:^(BOOL finished) {
71 | [self removeFromSuperview];
72 | [timer invalidate];
73 |
74 | }];
75 |
76 | }
77 |
78 | - (void)setupView {
79 | self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.75];
80 | self.layer.cornerRadius = 6;
81 | self.layer.masksToBounds = YES;
82 |
83 | [self addSubview:self.messageLabel];
84 |
85 | }
86 |
87 | - (UILabel *)messageLabel {
88 | if (_messageLabel == nil) {
89 | _messageLabel = [[UILabel alloc] init];
90 | _messageLabel.textColor = [UIColor whiteColor];
91 | _messageLabel.font = [UIFont systemFontOfSize:15];
92 | _messageLabel.numberOfLines = 0;
93 | _messageLabel.textAlignment = NSTextAlignmentCenter;
94 | }
95 | return _messageLabel;
96 | }
97 |
98 | @end
99 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/NSBundle+HUPicker.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSBundle+HUPicker.h
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/7/28.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface NSBundle (HUPicker)
12 |
13 | + (instancetype)hu_bundle;
14 |
15 | + (UIImage *)hu_imageNamed:(NSString *)name;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/NSBundle+HUPicker.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSBundle+HUPicker.m
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/7/28.
6 | //
7 | //
8 |
9 | #import "NSBundle+HUPicker.h"
10 | #import "HUImagePickerViewController.h"
11 |
12 | @implementation NSBundle (HUPicker)
13 |
14 | + (instancetype)hu_bundle {
15 | static NSBundle *bundle = nil;
16 | if (bundle == nil) {
17 | NSBundle *podBundle = [NSBundle bundleForClass:[HUImagePickerViewController class]];
18 |
19 | bundle = [NSBundle bundleWithPath:[podBundle pathForResource:@"HUPhotoPicker" ofType:@"bundle"]];
20 | }
21 | return bundle;
22 | }
23 |
24 | + (UIImage *)hu_imageNamed:(NSString *)name {
25 | return [UIImage imageNamed:name inBundle:[self hu_bundle] compatibleWithTraitCollection:nil];
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/UIBarButtonItem+HUButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+HUButton.h
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/7/29.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface UIBarButtonItem (HUButton)
12 |
13 | + (instancetype)leftItemWithImage:(UIImage *)image target:(id)target action:(SEL)action;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/UIBarButtonItem+HUButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+HUButton.m
3 | // Pods
4 | //
5 | // Created by jewelz on 2017/7/29.
6 | //
7 | //
8 |
9 | #import "UIBarButtonItem+HUButton.h"
10 |
11 | @implementation UIBarButtonItem (HUButton)
12 |
13 | + (instancetype)leftItemWithImage:(UIImage *)image target:(id)target action:(SEL)action {
14 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
15 | button.frame = CGRectMake(0, 0, 60, 44);
16 | button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
17 | [button setImage:image forState:UIControlStateNormal];
18 | [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
19 |
20 | return [[UIBarButtonItem alloc] initWithCustomView:button];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/UIView+HUConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Constraint.h
3 | // HUPhotoPicker
4 | //
5 | // Created by jewelz on 2017/7/28.
6 | //
7 |
8 | #import
9 |
10 | @interface UIView (HUConstraint)
11 |
12 | - (void)addConstraintsWithVisualFormat:(nonnull NSString *)formate views:(nonnull NSArray *)views;
13 |
14 | - (void)centerView:(nonnull UIView *)view;
15 |
16 | - (void)centerXOffset:(CGFloat)offsetX forView:(nonnull UIView *)view;
17 |
18 | - (void)centerYOffset:(CGFloat)offsetY forView:(nonnull UIView *)view;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/HUPhotoPicker/Classes/UIView+HUConstraint.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Constraint.m
3 | // HUPhotoPicker
4 | //
5 | // Created by jewelz on 2017/7/28.
6 | //
7 |
8 | #import "UIView+HUConstraint.h"
9 |
10 | @implementation UIView (HUConstraint)
11 |
12 | - (void)addConstraintsWithVisualFormat:(nonnull NSString *)formate views:(nonnull NSArray *)views {
13 | if (views.count == 0) {
14 | return;
15 | }
16 |
17 | NSMutableDictionary *dict = [NSMutableDictionary dictionary];
18 | __block NSString *key = @"";
19 | [views enumerateObjectsUsingBlock:^(UIView * _Nonnull view, NSUInteger idx, BOOL * _Nonnull stop) {
20 | view.translatesAutoresizingMaskIntoConstraints = NO;
21 | key = [NSString stringWithFormat:@"v%zd", idx];
22 | [dict setObject:view forKey:key];
23 | }];
24 |
25 | [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:formate options:0 metrics:nil views:dict]];
26 | }
27 |
28 | - (void)centerView:(nonnull UIView *)view {
29 | [self centerXOffset:0 forView:view];
30 | [self centerYOffset:0 forView:view];
31 | }
32 |
33 | - (void)centerXOffset:(CGFloat)offsetX forView:(nonnull UIView *)view {
34 | view.translatesAutoresizingMaskIntoConstraints = NO;
35 | [self addConstraint:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1 constant:offsetX]];
36 | }
37 |
38 | - (void)centerYOffset:(CGFloat)offsetY forView:(nonnull UIView *)view {
39 | [self addConstraint:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterY multiplier:1 constant:offsetY]];
40 |
41 | }
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Jewelz Hu
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Example/Pods/HUPhotoPicker/README.md:
--------------------------------------------------------------------------------
1 | # HUPhotoPicker
2 |
3 | [](https://travis-ci.org/hujewelz/HUPhotoPicker)
4 | [](http://cocoapods.org/pods/HUPhotoPicker)
5 | [](http://cocoapods.org/pods/HUPhotoPicker)
6 | [](http://cocoapods.org/pods/HUPhotoPicker)
7 |
8 | ## Example
9 |
10 | To run the example project, clone the repo, and run `pod install` from the Example directory first.
11 |
12 | ## Requirements
13 |
14 | ## Installation
15 |
16 | HUPhotoPicker is available through [CocoaPods](http://cocoapods.org). To install
17 | it, simply add the following line to your Podfile:
18 |
19 | ```ruby
20 | pod "HUPhotoPicker"
21 | ```
22 |
23 | ## Author
24 |
25 | Jewelz Hu, hujewelz@163.com
26 |
27 | ## License
28 |
29 | HUPhotoPicker is available under the MIT license. See the LICENSE file for more info.
30 |
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoBrowser/HUPhotoBrowser.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/HUPhotoBrowser.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoBrowser/HUPhotoBrowserCell.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/HUPhotoBrowserCell.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoBrowser/HUWebImage.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/HUWebImageDownloader/HUWebImage.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoBrowser/HUWebImageDownloadOperation.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/HUWebImageDownloader/HUWebImageDownloadOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoBrowser/HUWebImageDownloader.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/HUWebImageDownloader/HUWebImageDownloader.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoBrowser/UIImage+HUExtension.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/HUWebImageDownloader/UIImage+HUExtension.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoBrowser/UIImageView+HUWebImage.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/HUWebImageDownloader/UIImageView+HUWebImage.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoBrowser/UIView+frame.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/UIView+frame.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoBrowser/hu_const.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/hu_const.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/Asset.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/Asset.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUAlbumCell.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUAlbumCell.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUAlbumTableViewController.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUAlbumTableViewController.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUImageGridCell.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUImageGridCell.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUImageGridViewController.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUImageGridViewController.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUImagePickerViewController.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUImagePickerViewController.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUImageSelectModel.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUImageSelectModel.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUNavTitleView.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUNavTitleView.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUPHAuthorizationNotDeterminedView.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUPHAuthorizationNotDeterminedView.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUPHAuthorizationNotDeterminedViewController.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUPHAuthorizationNotDeterminedViewController.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUPhotoAlbum.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUPhotoAlbum.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUPhotoManager.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUPhotoManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUPhotoPicker.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUPhotoPicker.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUTakePhotoCell.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUTakePhotoCell.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/HUToast.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUToast.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/NSBundle+HUPicker.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/NSBundle+HUPicker.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/UIBarButtonItem+HUButton.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/UIBarButtonItem+HUButton.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/HUPhotoPicker/UIView+HUConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/UIView+HUConstraint.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSData+ImageContentType.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/NSImage+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSImage+WebCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/SDImageCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/SDImageCacheConfig.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCacheConfig.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageCompat.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDecoder.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloader.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/SDWebImageManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIButton+WebCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+GIF.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+WebCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/UIView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIView+WebCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SVProgressHUD/SVIndefiniteAnimatedView.h:
--------------------------------------------------------------------------------
1 | ../../../SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SVProgressHUD/SVProgressAnimatedView.h:
--------------------------------------------------------------------------------
1 | ../../../SVProgressHUD/SVProgressHUD/SVProgressAnimatedView.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SVProgressHUD/SVProgressHUD.h:
--------------------------------------------------------------------------------
1 | ../../../SVProgressHUD/SVProgressHUD/SVProgressHUD.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/SVProgressHUD/SVRadialGradientLayer.h:
--------------------------------------------------------------------------------
1 | ../../../SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/HUPhotoBrowser/HUPhotoBrowser.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/HUPhotoBrowser.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/HUPhotoBrowser/HUWebImageDownloader.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/HUWebImageDownloader/HUWebImageDownloader.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/HUPhotoBrowser/UIImageView+HUWebImage.h:
--------------------------------------------------------------------------------
1 | ../../../../../HUPhotoBrowser/HUWebImageDownloader/UIImageView+HUWebImage.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/HUPhotoPicker/HUImagePickerViewController.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUImagePickerViewController.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/HUPhotoPicker/HUPhotoManager.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUPhotoManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/HUPhotoPicker/HUPhotoPicker.h:
--------------------------------------------------------------------------------
1 | ../../../HUPhotoPicker/HUPhotoPicker/Classes/HUPhotoPicker.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSData+ImageContentType.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/NSImage+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSImage+WebCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/SDImageCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/SDImageCacheConfig.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCacheConfig.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageCompat.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDecoder.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloader.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/SDWebImageManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIButton+WebCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+GIF.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+WebCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/UIView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIView+WebCache.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SVProgressHUD/SVIndefiniteAnimatedView.h:
--------------------------------------------------------------------------------
1 | ../../../SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SVProgressHUD/SVProgressAnimatedView.h:
--------------------------------------------------------------------------------
1 | ../../../SVProgressHUD/SVProgressHUD/SVProgressAnimatedView.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SVProgressHUD/SVProgressHUD.h:
--------------------------------------------------------------------------------
1 | ../../../SVProgressHUD/SVProgressHUD/SVProgressHUD.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/SVProgressHUD/SVRadialGradientLayer.h:
--------------------------------------------------------------------------------
1 | ../../../SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h
--------------------------------------------------------------------------------
/Example/Pods/Local Podspecs/HUPhotoBrowser.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "HUPhotoBrowser",
3 | "version": "1.3.0",
4 | "summary": "photo browser for ios, which can browse Photo library and web image",
5 | "homepage": "https://github.com/hujewelz/HUPhotoBrowser",
6 | "license": "MIT",
7 | "authors": {
8 | "Jewelz Hu": "https://github.com/hujewelz/HUPhotoBrowser"
9 | },
10 | "platforms": {
11 | "ios": "7.0"
12 | },
13 | "source": {
14 | "git": "https://github.com/hujewelz/HUPhotoBrowser.git",
15 | "tag": "1.3.0"
16 | },
17 | "source_files": "HUPhotoBrowser/**/*.{h,m}",
18 | "requires_arc": true,
19 | "frameworks": [
20 | "UIKit",
21 | "Photos",
22 | "AssetsLibrary"
23 | ],
24 | "public_header_files": [
25 | "HUPhotoBrowser/HUPhotoBrowser.h",
26 | "HUPhotoBrowser/HUPhotoPicker/HUImagePickerViewController.h",
27 | "HUPhotoBrowser/HUWebImageDownloader/{UIImageView+HUWebImage,HUWebImageDownloader}.h"
28 | ],
29 | "dependencies": {
30 | "SVProgressHUD": [
31 |
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Example/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - HUPhotoBrowser (1.3.0):
3 | - SVProgressHUD
4 | - HUPhotoPicker (1.0.3)
5 | - SDWebImage (4.1.2):
6 | - SDWebImage/Core (= 4.1.2)
7 | - SDWebImage/Core (4.1.2)
8 | - SVProgressHUD (2.2.2)
9 |
10 | DEPENDENCIES:
11 | - HUPhotoBrowser (from `../`)
12 | - HUPhotoPicker (~> 1.0.3)
13 | - SDWebImage
14 |
15 | EXTERNAL SOURCES:
16 | HUPhotoBrowser:
17 | :path: ../
18 |
19 | SPEC CHECKSUMS:
20 | HUPhotoBrowser: be7da9bcd5e6f4554208c94d230f271ffa88df62
21 | HUPhotoPicker: e5ec94c512b9628b76d6599006423f0a04d541cb
22 | SDWebImage: cb6f9f266a9977741efcbc21e618e8be3734c774
23 | SVProgressHUD: 59b2d3dabacbd051576d21d32293ca7228dc18b0
24 |
25 | PODFILE CHECKSUM: e4e6cc855a091fd3213356476a9d01dcc4164c3f
26 |
27 | COCOAPODS: 1.3.1
28 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/huluobo.xcuserdatad/xcschemes/HUPhotoBrowser.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/huluobo.xcuserdatad/xcschemes/HUPhotoPicker-HUPhotoPicker.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/huluobo.xcuserdatad/xcschemes/HUPhotoPicker.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/huluobo.xcuserdatad/xcschemes/Pods-HUPhotoBrowser Demo.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/huluobo.xcuserdatad/xcschemes/Pods-HUPhotoBrowser DemoTests.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/huluobo.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/huluobo.xcuserdatad/xcschemes/SVProgressHUD.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/huluobo.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HUPhotoBrowser.xcscheme
8 |
9 | isShown
10 |
11 | orderHint
12 | 0
13 |
14 | HUPhotoPicker-HUPhotoPicker.xcscheme
15 |
16 | isShown
17 |
18 | orderHint
19 | 2
20 |
21 | HUPhotoPicker.xcscheme
22 |
23 | isShown
24 |
25 | orderHint
26 | 1
27 |
28 | Pods-HUPhotoBrowser Demo.xcscheme
29 |
30 | isShown
31 |
32 | orderHint
33 | 3
34 |
35 | Pods-HUPhotoBrowser DemoTests.xcscheme
36 |
37 | isShown
38 |
39 | orderHint
40 | 4
41 |
42 | SDWebImage.xcscheme
43 |
44 | isShown
45 |
46 | orderHint
47 | 5
48 |
49 | SVProgressHUD.xcscheme
50 |
51 | isShown
52 |
53 | orderHint
54 | 6
55 |
56 |
57 | SuppressBuildableAutocreation
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/jewelz.xcuserdatad/xcschemes/HUPhotoBrowser.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/jewelz.xcuserdatad/xcschemes/HUPhotoPicker-HUPhotoPicker.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/jewelz.xcuserdatad/xcschemes/HUPhotoPicker.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/jewelz.xcuserdatad/xcschemes/Pods-HUPhotoBrowser Demo.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/jewelz.xcuserdatad/xcschemes/Pods-HUPhotoBrowser DemoTests.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/jewelz.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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/jewelz.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HUPhotoBrowser.xcscheme
8 |
9 | isShown
10 |
11 |
12 | HUPhotoPicker-HUPhotoPicker.xcscheme
13 |
14 | isShown
15 |
16 |
17 | HUPhotoPicker.xcscheme
18 |
19 | isShown
20 |
21 |
22 | Pods-HUPhotoBrowser Demo.xcscheme
23 |
24 | isShown
25 |
26 |
27 | Pods-HUPhotoBrowser DemoTests.xcscheme
28 |
29 | isShown
30 |
31 |
32 | SDWebImage.xcscheme
33 |
34 | isShown
35 |
36 |
37 |
38 | SuppressBuildableAutocreation
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2017 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 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | * (c) Fabrice Aneche
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 | #import "SDWebImageCompat.h"
12 |
13 | typedef NS_ENUM(NSInteger, SDImageFormat) {
14 | SDImageFormatUndefined = -1,
15 | SDImageFormatJPEG = 0,
16 | SDImageFormatPNG,
17 | SDImageFormatGIF,
18 | SDImageFormatTIFF,
19 | SDImageFormatWebP
20 | };
21 |
22 | @interface NSData (ImageContentType)
23 |
24 | /**
25 | * Return image format
26 | *
27 | * @param data the input image data
28 | *
29 | * @return the image format as `SDImageFormat` (enum)
30 | */
31 | + (SDImageFormat)sd_imageFormatForImageData:(nullable NSData *)data;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | * (c) Fabrice Aneche
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 "NSData+ImageContentType.h"
11 |
12 |
13 | @implementation NSData (ImageContentType)
14 |
15 | + (SDImageFormat)sd_imageFormatForImageData:(nullable NSData *)data {
16 | if (!data) {
17 | return SDImageFormatUndefined;
18 | }
19 |
20 | uint8_t c;
21 | [data getBytes:&c length:1];
22 | switch (c) {
23 | case 0xFF:
24 | return SDImageFormatJPEG;
25 | case 0x89:
26 | return SDImageFormatPNG;
27 | case 0x47:
28 | return SDImageFormatGIF;
29 | case 0x49:
30 | case 0x4D:
31 | return SDImageFormatTIFF;
32 | case 0x52:
33 | // R as RIFF for WEBP
34 | if (data.length < 12) {
35 | return SDImageFormatUndefined;
36 | }
37 |
38 | NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(0, 12)] encoding:NSASCIIStringEncoding];
39 | if ([testString hasPrefix:@"RIFF"] && [testString hasSuffix:@"WEBP"]) {
40 | return SDImageFormatWebP;
41 | }
42 | }
43 | return SDImageFormatUndefined;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/NSImage+WebCache.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 "SDWebImageCompat.h"
10 |
11 | #if SD_MAC
12 |
13 | #import
14 |
15 | @interface NSImage (WebCache)
16 |
17 | - (CGImageRef)CGImage;
18 | - (NSArray *)images;
19 | - (BOOL)isGIF;
20 |
21 | @end
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/NSImage+WebCache.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 "NSImage+WebCache.h"
10 |
11 | #if SD_MAC
12 |
13 | @implementation NSImage (WebCache)
14 |
15 | - (CGImageRef)CGImage {
16 | NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height);
17 | CGImageRef cgImage = [self CGImageForProposedRect:&imageRect context:NULL hints:nil];
18 | return cgImage;
19 | }
20 |
21 | - (NSArray *)images {
22 | return nil;
23 | }
24 |
25 | - (BOOL)isGIF {
26 | return NO;
27 | }
28 |
29 | @end
30 |
31 | #endif
32 |
33 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/SDImageCacheConfig.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 "SDWebImageCompat.h"
11 |
12 | @interface SDImageCacheConfig : NSObject
13 |
14 | /**
15 | * Decompressing images that are downloaded and cached can improve performance but can consume lot of memory.
16 | * Defaults to YES. Set this to NO if you are experiencing a crash due to excessive memory consumption.
17 | */
18 | @property (assign, nonatomic) BOOL shouldDecompressImages;
19 |
20 | /**
21 | * disable iCloud backup [defaults to YES]
22 | */
23 | @property (assign, nonatomic) BOOL shouldDisableiCloud;
24 |
25 | /**
26 | * use memory cache [defaults to YES]
27 | */
28 | @property (assign, nonatomic) BOOL shouldCacheImagesInMemory;
29 |
30 | /**
31 | * The maximum length of time to keep an image in the cache, in seconds
32 | */
33 | @property (assign, nonatomic) NSInteger maxCacheAge;
34 |
35 | /**
36 | * The maximum size of the cache, in bytes.
37 | */
38 | @property (assign, nonatomic) NSUInteger maxCacheSize;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/SDImageCacheConfig.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 "SDImageCacheConfig.h"
10 |
11 | static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
12 |
13 | @implementation SDImageCacheConfig
14 |
15 | - (instancetype)init {
16 | if (self = [super init]) {
17 | _shouldDecompressImages = YES;
18 | _shouldDisableiCloud = YES;
19 | _shouldCacheImagesInMemory = YES;
20 | _maxCacheAge = kDefaultCacheMaxCacheAge;
21 | _maxCacheSize = 0;
22 | }
23 | return self;
24 | }
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Example/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 | // Apple's defines from TargetConditionals.h are a bit weird.
17 | // Seems like TARGET_OS_MAC is always defined (on all platforms).
18 | // To determine if we are running on OSX, we can only rely on TARGET_OS_IPHONE=0 and all the other platforms
19 | #if !TARGET_OS_IPHONE && !TARGET_OS_IOS && !TARGET_OS_TV && !TARGET_OS_WATCH
20 | #define SD_MAC 1
21 | #else
22 | #define SD_MAC 0
23 | #endif
24 |
25 | // iOS and tvOS are very similar, UIKit exists on both platforms
26 | // Note: watchOS also has UIKit, but it's very limited
27 | #if TARGET_OS_IOS || TARGET_OS_TV
28 | #define SD_UIKIT 1
29 | #else
30 | #define SD_UIKIT 0
31 | #endif
32 |
33 | #if TARGET_OS_IOS
34 | #define SD_IOS 1
35 | #else
36 | #define SD_IOS 0
37 | #endif
38 |
39 | #if TARGET_OS_TV
40 | #define SD_TV 1
41 | #else
42 | #define SD_TV 0
43 | #endif
44 |
45 | #if TARGET_OS_WATCH
46 | #define SD_WATCH 1
47 | #else
48 | #define SD_WATCH 0
49 | #endif
50 |
51 |
52 | #if SD_MAC
53 | #import
54 | #ifndef UIImage
55 | #define UIImage NSImage
56 | #endif
57 | #ifndef UIImageView
58 | #define UIImageView NSImageView
59 | #endif
60 | #ifndef UIView
61 | #define UIView NSView
62 | #endif
63 | #else
64 | #if __IPHONE_OS_VERSION_MIN_REQUIRED != 20000 && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0
65 | #error SDWebImage doesn't support Deployment Target version < 5.0
66 | #endif
67 |
68 | #if SD_UIKIT
69 | #import
70 | #endif
71 | #if SD_WATCH
72 | #import
73 | #endif
74 | #endif
75 |
76 | #ifndef NS_ENUM
77 | #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
78 | #endif
79 |
80 | #ifndef NS_OPTIONS
81 | #define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
82 | #endif
83 |
84 | #if OS_OBJECT_USE_OBJC
85 | #undef SDDispatchQueueRelease
86 | #undef SDDispatchQueueSetterSementics
87 | #define SDDispatchQueueRelease(q)
88 | #define SDDispatchQueueSetterSementics strong
89 | #else
90 | #undef SDDispatchQueueRelease
91 | #undef SDDispatchQueueSetterSementics
92 | #define SDDispatchQueueRelease(q) (dispatch_release(q))
93 | #define SDDispatchQueueSetterSementics assign
94 | #endif
95 |
96 | FOUNDATION_EXPORT UIImage *SDScaledImageForKey(NSString *key, UIImage *image);
97 |
98 | typedef void(^SDWebImageNoParamsBlock)(void);
99 |
100 | FOUNDATION_EXPORT NSString *const SDWebImageErrorDomain;
101 |
102 | #ifndef dispatch_main_async_safe
103 | #define dispatch_main_async_safe(block)\
104 | if (strcmp(dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL), dispatch_queue_get_label(dispatch_get_main_queue())) == 0) {\
105 | block();\
106 | } else {\
107 | dispatch_async(dispatch_get_main_queue(), block);\
108 | }
109 | #endif
110 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/SDWebImageCompat.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 "SDWebImageCompat.h"
10 |
11 | #import "objc/runtime.h"
12 |
13 | #if !__has_feature(objc_arc)
14 | #error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag
15 | #endif
16 |
17 | inline UIImage *SDScaledImageForKey(NSString * _Nullable key, UIImage * _Nullable image) {
18 | if (!image) {
19 | return nil;
20 | }
21 |
22 | #if SD_MAC
23 | return image;
24 | #elif SD_UIKIT || SD_WATCH
25 | if ((image.images).count > 0) {
26 | NSMutableArray *scaledImages = [NSMutableArray array];
27 |
28 | for (UIImage *tempImage in image.images) {
29 | [scaledImages addObject:SDScaledImageForKey(key, tempImage)];
30 | }
31 |
32 | UIImage *animatedImage = [UIImage animatedImageWithImages:scaledImages duration:image.duration];
33 | #ifdef SD_WEBP
34 | if (animatedImage) {
35 | SEL sd_webpLoopCount = NSSelectorFromString(@"sd_webpLoopCount");
36 | NSNumber *value = objc_getAssociatedObject(image, sd_webpLoopCount);
37 | NSInteger loopCount = value.integerValue;
38 | if (loopCount) {
39 | objc_setAssociatedObject(animatedImage, sd_webpLoopCount, @(loopCount), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
40 | }
41 | }
42 | #endif
43 | return animatedImage;
44 | } else {
45 | #if SD_WATCH
46 | if ([[WKInterfaceDevice currentDevice] respondsToSelector:@selector(screenScale)]) {
47 | #elif SD_UIKIT
48 | if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
49 | #endif
50 | CGFloat scale = 1;
51 | if (key.length >= 8) {
52 | NSRange range = [key rangeOfString:@"@2x."];
53 | if (range.location != NSNotFound) {
54 | scale = 2.0;
55 | }
56 |
57 | range = [key rangeOfString:@"@3x."];
58 | if (range.location != NSNotFound) {
59 | scale = 3.0;
60 | }
61 | }
62 |
63 | UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation];
64 | image = scaledImage;
65 | }
66 | return image;
67 | }
68 | #endif
69 | }
70 |
71 | NSString *const SDWebImageErrorDomain = @"SDWebImageErrorDomain";
72 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | * (c) james
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 | #import "SDWebImageCompat.h"
12 |
13 | @interface UIImage (ForceDecode)
14 |
15 | + (nullable UIImage *)decodedImageWithImage:(nullable UIImage *)image;
16 |
17 | + (nullable UIImage *)decodedAndScaledDownImageWithImage:(nullable UIImage *)image;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | * (c) Laurin Brandner
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 "SDWebImageCompat.h"
11 |
12 | @interface UIImage (GIF)
13 |
14 | /**
15 | * Compatibility method - creates an animated UIImage from an NSData, it will only contain the 1st frame image
16 | */
17 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data;
18 |
19 | /**
20 | * Checks if an UIImage instance is a GIF. Will use the `images` array
21 | */
22 | - (BOOL)isGIF;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/UIImage+GIF.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | * (c) Laurin Brandner
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 "UIImage+GIF.h"
11 | #import
12 | #import "objc/runtime.h"
13 | #import "NSImage+WebCache.h"
14 |
15 | @implementation UIImage (GIF)
16 |
17 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data {
18 | if (!data) {
19 | return nil;
20 | }
21 |
22 | #if SD_MAC
23 | return [[UIImage alloc] initWithData:data];
24 | #else
25 |
26 | CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL);
27 |
28 | size_t count = CGImageSourceGetCount(source);
29 |
30 | UIImage *staticImage;
31 |
32 | if (count <= 1) {
33 | staticImage = [[UIImage alloc] initWithData:data];
34 | } else {
35 | // we will only retrieve the 1st frame. the full GIF support is available via the FLAnimatedImageView category.
36 | // this here is only code to allow drawing animated images as static ones
37 | #if SD_WATCH
38 | CGFloat scale = 1;
39 | scale = [WKInterfaceDevice currentDevice].screenScale;
40 | #elif SD_UIKIT
41 | CGFloat scale = 1;
42 | scale = [UIScreen mainScreen].scale;
43 | #endif
44 |
45 | CGImageRef CGImage = CGImageSourceCreateImageAtIndex(source, 0, NULL);
46 | #if SD_UIKIT || SD_WATCH
47 | UIImage *frameImage = [UIImage imageWithCGImage:CGImage scale:scale orientation:UIImageOrientationUp];
48 | staticImage = [UIImage animatedImageWithImages:@[frameImage] duration:0.0f];
49 | #endif
50 | CGImageRelease(CGImage);
51 | }
52 |
53 | CFRelease(source);
54 |
55 | return staticImage;
56 | #endif
57 | }
58 |
59 | - (BOOL)isGIF {
60 | return (self.images != nil);
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.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 "SDWebImageCompat.h"
10 | #import "NSData+ImageContentType.h"
11 |
12 | @interface UIImage (MultiFormat)
13 |
14 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data;
15 | - (nullable NSData *)sd_imageData;
16 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.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 "SDWebImageCompat.h"
10 |
11 | #if SD_UIKIT
12 |
13 | #import "SDWebImageManager.h"
14 |
15 | /**
16 | * Integrates SDWebImage async downloading and caching of remote images with UIImageView for highlighted state.
17 | */
18 | @interface UIImageView (HighlightedWebCache)
19 |
20 | /**
21 | * Set the imageView `highlightedImage` with an `url`.
22 | *
23 | * The download is asynchronous and cached.
24 | *
25 | * @param url The url for the image.
26 | */
27 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url NS_REFINED_FOR_SWIFT;
28 |
29 | /**
30 | * Set the imageView `highlightedImage` with an `url` and custom options.
31 | *
32 | * The download is asynchronous and cached.
33 | *
34 | * @param url The url for the image.
35 | * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
36 | */
37 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
38 | options:(SDWebImageOptions)options NS_REFINED_FOR_SWIFT;
39 |
40 | /**
41 | * Set the imageView `highlightedImage` with an `url`.
42 | *
43 | * The download is asynchronous and cached.
44 | *
45 | * @param url The url for the image.
46 | * @param completedBlock A block called when operation has been completed. This block has no return value
47 | * and takes the requested UIImage as first parameter. In case of error the image parameter
48 | * is nil and the second parameter may contain an NSError. The third parameter is a Boolean
49 | * indicating if the image was retrieved from the local cache or from the network.
50 | * The fourth parameter is the original image url.
51 | */
52 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
53 | completed:(nullable SDExternalCompletionBlock)completedBlock NS_REFINED_FOR_SWIFT;
54 |
55 | /**
56 | * Set the imageView `highlightedImage` with an `url` and custom options.
57 | *
58 | * The download is asynchronous and cached.
59 | *
60 | * @param url The url for the image.
61 | * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
62 | * @param completedBlock A block called when operation has been completed. This block has no return value
63 | * and takes the requested UIImage as first parameter. In case of error the image parameter
64 | * is nil and the second parameter may contain an NSError. The third parameter is a Boolean
65 | * indicating if the image was retrieved from the local cache or from the network.
66 | * The fourth parameter is the original image url.
67 | */
68 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
69 | options:(SDWebImageOptions)options
70 | completed:(nullable SDExternalCompletionBlock)completedBlock;
71 |
72 | /**
73 | * Set the imageView `highlightedImage` with an `url` and custom options.
74 | *
75 | * The download is asynchronous and cached.
76 | *
77 | * @param url The url for the image.
78 | * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
79 | * @param progressBlock A block called while image is downloading
80 | * @note the progress block is executed on a background queue
81 | * @param completedBlock A block called when operation has been completed. This block has no return value
82 | * and takes the requested UIImage as first parameter. In case of error the image parameter
83 | * is nil and the second parameter may contain an NSError. The third parameter is a Boolean
84 | * indicating if the image was retrieved from the local cache or from the network.
85 | * The fourth parameter is the original image url.
86 | */
87 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
88 | options:(SDWebImageOptions)options
89 | progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock
90 | completed:(nullable SDExternalCompletionBlock)completedBlock;
91 |
92 | @end
93 |
94 | #endif
95 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.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 "UIImageView+HighlightedWebCache.h"
10 |
11 | #if SD_UIKIT
12 |
13 | #import "UIView+WebCacheOperation.h"
14 | #import "UIView+WebCache.h"
15 |
16 | @implementation UIImageView (HighlightedWebCache)
17 |
18 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url {
19 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil];
20 | }
21 |
22 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options {
23 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil];
24 | }
25 |
26 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url completed:(nullable SDExternalCompletionBlock)completedBlock {
27 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:completedBlock];
28 | }
29 |
30 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options completed:(nullable SDExternalCompletionBlock)completedBlock {
31 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock];
32 | }
33 |
34 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
35 | options:(SDWebImageOptions)options
36 | progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock
37 | completed:(nullable SDExternalCompletionBlock)completedBlock {
38 | __weak typeof(self)weakSelf = self;
39 | [self sd_internalSetImageWithURL:url
40 | placeholderImage:nil
41 | options:options
42 | operationKey:@"UIImageViewImageOperationHighlighted"
43 | setImageBlock:^(UIImage *image, NSData *imageData) {
44 | weakSelf.highlightedImage = image;
45 | }
46 | progress:progressBlock
47 | completed:completedBlock];
48 | }
49 |
50 | @end
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/Example/Pods/SDWebImage/SDWebImage/UIView+WebCache.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 "SDWebImageCompat.h"
10 |
11 | #if SD_UIKIT || SD_MAC
12 |
13 | #import "SDWebImageManager.h"
14 |
15 | typedef void(^SDSetImageBlock)(UIImage * _Nullable image, NSData * _Nullable imageData);
16 |
17 | @interface UIView (WebCache)
18 |
19 | /**
20 | * Get the current image URL.
21 | *
22 | * Note that because of the limitations of categories this property can get out of sync
23 | * if you use setImage: directly.
24 | */
25 | - (nullable NSURL *)sd_imageURL;
26 |
27 | /**
28 | * Set the imageView `image` with an `url` and optionally a placeholder image.
29 | *
30 | * The download is asynchronous and cached.
31 | *
32 | * @param url The url for the image.
33 | * @param placeholder The image to be set initially, until the image request finishes.
34 | * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
35 | * @param operationKey A string to be used as the operation key. If nil, will use the class name
36 | * @param setImageBlock Block used for custom set image code
37 | * @param progressBlock A block called while image is downloading
38 | * @note the progress block is executed on a background queue
39 | * @param completedBlock A block called when operation has been completed. This block has no return value
40 | * and takes the requested UIImage as first parameter. In case of error the image parameter
41 | * is nil and the second parameter may contain an NSError. The third parameter is a Boolean
42 | * indicating if the image was retrieved from the local cache or from the network.
43 | * The fourth parameter is the original image url.
44 | */
45 | - (void)sd_internalSetImageWithURL:(nullable NSURL *)url
46 | placeholderImage:(nullable UIImage *)placeholder
47 | options:(SDWebImageOptions)options
48 | operationKey:(nullable NSString *)operationKey
49 | setImageBlock:(nullable SDSetImageBlock)setImageBlock
50 | progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock
51 | completed:(nullable SDExternalCompletionBlock)completedBlock;
52 |
53 | /**
54 | * Cancel the current download
55 | */
56 | - (void)sd_cancelCurrentImageLoad;
57 |
58 | #if SD_UIKIT
59 |
60 | #pragma mark - Activity indicator
61 |
62 | /**
63 | * Show activity UIActivityIndicatorView
64 | */
65 | - (void)sd_setShowActivityIndicatorView:(BOOL)show;
66 |
67 | /**
68 | * set desired UIActivityIndicatorViewStyle
69 | *
70 | * @param style The style of the UIActivityIndicatorView
71 | */
72 | - (void)sd_setIndicatorStyle:(UIActivityIndicatorViewStyle)style;
73 |
74 | - (BOOL)sd_showActivityIndicatorView;
75 | - (void)sd_addActivityIndicator;
76 | - (void)sd_removeActivityIndicator;
77 |
78 | #endif
79 |
80 | @end
81 |
82 | #endif
83 |
--------------------------------------------------------------------------------
/Example/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 "SDWebImageCompat.h"
10 |
11 | #if SD_UIKIT || SD_MAC
12 |
13 | #import "SDWebImageManager.h"
14 |
15 | @interface UIView (WebCacheOperation)
16 |
17 | /**
18 | * Set the image load operation (storage in a UIView based dictionary)
19 | *
20 | * @param operation the operation
21 | * @param key key for storing the operation
22 | */
23 | - (void)sd_setImageLoadOperation:(nullable id)operation forKey:(nullable NSString *)key;
24 |
25 | /**
26 | * Cancel all operations for the current UIView and key
27 | *
28 | * @param key key for identifying the operations
29 | */
30 | - (void)sd_cancelImageLoadOperationWithKey:(nullable NSString *)key;
31 |
32 | /**
33 | * Just remove the operations corresponding to the current UIView and key without cancelling them
34 | *
35 | * @param key key for identifying the operations
36 | */
37 | - (void)sd_removeImageLoadOperationWithKey:(nullable NSString *)key;
38 |
39 | @end
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/Example/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 |
11 | #if SD_UIKIT || SD_MAC
12 |
13 | #import "objc/runtime.h"
14 |
15 | static char loadOperationKey;
16 |
17 | typedef NSMutableDictionary SDOperationsDictionary;
18 |
19 | @implementation UIView (WebCacheOperation)
20 |
21 | - (SDOperationsDictionary *)operationDictionary {
22 | SDOperationsDictionary *operations = objc_getAssociatedObject(self, &loadOperationKey);
23 | if (operations) {
24 | return operations;
25 | }
26 | operations = [NSMutableDictionary dictionary];
27 | objc_setAssociatedObject(self, &loadOperationKey, operations, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
28 | return operations;
29 | }
30 |
31 | - (void)sd_setImageLoadOperation:(nullable id)operation forKey:(nullable NSString *)key {
32 | if (key) {
33 | [self sd_cancelImageLoadOperationWithKey:key];
34 | if (operation) {
35 | SDOperationsDictionary *operationDictionary = [self operationDictionary];
36 | operationDictionary[key] = operation;
37 | }
38 | }
39 | }
40 |
41 | - (void)sd_cancelImageLoadOperationWithKey:(nullable NSString *)key {
42 | // Cancel in progress downloader from queue
43 | SDOperationsDictionary *operationDictionary = [self operationDictionary];
44 | id operations = operationDictionary[key];
45 | if (operations) {
46 | if ([operations isKindOfClass:[NSArray class]]) {
47 | for (id operation in operations) {
48 | if (operation) {
49 | [operation cancel];
50 | }
51 | }
52 | } else if ([operations conformsToProtocol:@protocol(SDWebImageOperation)]){
53 | [(id) operations cancel];
54 | }
55 | [operationDictionary removeObjectForKey:key];
56 | }
57 | }
58 |
59 | - (void)sd_removeImageLoadOperationWithKey:(nullable NSString *)key {
60 | if (key) {
61 | SDOperationsDictionary *operationDictionary = [self operationDictionary];
62 | [operationDictionary removeObjectForKey:key];
63 | }
64 | }
65 |
66 | @end
67 |
68 | #endif
69 |
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2017 Sam Vermette, Tobias Tiemerding and contributors.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
9 | A different license may apply to other resources included in this package, including Freepik Icons. Please consult their respective headers for the terms of their individual licenses.
10 |
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SVIndefiniteAnimatedView.h
3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD
4 | //
5 | // Copyright (c) 2014-2017 Guillaume Campagna. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | @interface SVIndefiniteAnimatedView : UIView
11 |
12 | @property (nonatomic, assign) CGFloat strokeThickness;
13 | @property (nonatomic, assign) CGFloat radius;
14 | @property (nonatomic, strong) UIColor *strokeColor;
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressAnimatedView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SVProgressAnimatedView.h
3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD
4 | //
5 | // Copyright (c) 2017 Tobias Tiemerding. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | @interface SVProgressAnimatedView : UIView
11 |
12 | @property (nonatomic, assign) CGFloat radius;
13 | @property (nonatomic, assign) CGFloat strokeThickness;
14 | @property (nonatomic, strong) UIColor *strokeColor;
15 | @property (nonatomic, assign) CGFloat strokeEnd;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressAnimatedView.m:
--------------------------------------------------------------------------------
1 | //
2 | // SVProgressAnimatedView.m
3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD
4 | //
5 | // Copyright (c) 2017 Tobias Tiemerding. All rights reserved.
6 | //
7 |
8 | #import "SVProgressAnimatedView.h"
9 |
10 | @interface SVProgressAnimatedView ()
11 |
12 | @property (nonatomic, strong) CAShapeLayer *ringAnimatedLayer;
13 |
14 | @end
15 |
16 | @implementation SVProgressAnimatedView
17 |
18 | - (void)willMoveToSuperview:(UIView*)newSuperview {
19 | if (newSuperview) {
20 | [self layoutAnimatedLayer];
21 | } else {
22 | [_ringAnimatedLayer removeFromSuperlayer];
23 | _ringAnimatedLayer = nil;
24 | }
25 | }
26 |
27 | - (void)layoutAnimatedLayer {
28 | CALayer *layer = self.ringAnimatedLayer;
29 | [self.layer addSublayer:layer];
30 |
31 | CGFloat widthDiff = CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds);
32 | CGFloat heightDiff = CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds);
33 | layer.position = CGPointMake(CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds) / 2 - widthDiff / 2, CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds) / 2 - heightDiff / 2);
34 | }
35 |
36 | - (CAShapeLayer*)ringAnimatedLayer {
37 | if(!_ringAnimatedLayer) {
38 | CGPoint arcCenter = CGPointMake(self.radius+self.strokeThickness/2+5, self.radius+self.strokeThickness/2+5);
39 | UIBezierPath* smoothedPath = [UIBezierPath bezierPathWithArcCenter:arcCenter radius:self.radius startAngle:(CGFloat)-M_PI_2 endAngle:(CGFloat) (M_PI + M_PI_2) clockwise:YES];
40 |
41 | _ringAnimatedLayer = [CAShapeLayer layer];
42 | _ringAnimatedLayer.contentsScale = [[UIScreen mainScreen] scale];
43 | _ringAnimatedLayer.frame = CGRectMake(0.0f, 0.0f, arcCenter.x*2, arcCenter.y*2);
44 | _ringAnimatedLayer.fillColor = [UIColor clearColor].CGColor;
45 | _ringAnimatedLayer.strokeColor = self.strokeColor.CGColor;
46 | _ringAnimatedLayer.lineWidth = self.strokeThickness;
47 | _ringAnimatedLayer.lineCap = kCALineCapRound;
48 | _ringAnimatedLayer.lineJoin = kCALineJoinBevel;
49 | _ringAnimatedLayer.path = smoothedPath.CGPath;
50 | }
51 | return _ringAnimatedLayer;
52 | }
53 |
54 | - (void)setFrame:(CGRect)frame {
55 | if(!CGRectEqualToRect(frame, super.frame)) {
56 | [super setFrame:frame];
57 |
58 | if(self.superview) {
59 | [self layoutAnimatedLayer];
60 | }
61 | }
62 | }
63 |
64 | - (void)setRadius:(CGFloat)radius {
65 | if(radius != _radius) {
66 | _radius = radius;
67 |
68 | [_ringAnimatedLayer removeFromSuperlayer];
69 | _ringAnimatedLayer = nil;
70 |
71 | if(self.superview) {
72 | [self layoutAnimatedLayer];
73 | }
74 | }
75 | }
76 |
77 | - (void)setStrokeColor:(UIColor*)strokeColor {
78 | _strokeColor = strokeColor;
79 | _ringAnimatedLayer.strokeColor = strokeColor.CGColor;
80 | }
81 |
82 | - (void)setStrokeThickness:(CGFloat)strokeThickness {
83 | _strokeThickness = strokeThickness;
84 | _ringAnimatedLayer.lineWidth = _strokeThickness;
85 | }
86 |
87 | - (void)setStrokeEnd:(CGFloat)strokeEnd {
88 | _strokeEnd = strokeEnd;
89 | _ringAnimatedLayer.strokeEnd = _strokeEnd;
90 | }
91 |
92 | - (CGSize)sizeThatFits:(CGSize)size {
93 | return CGSizeMake((self.radius+self.strokeThickness/2+5)*2, (self.radius+self.strokeThickness/2+5)*2);
94 | }
95 |
96 | @end
97 |
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@2x.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@3x.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@2x.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@3x.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@2x.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@3x.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@2x.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@3x.png
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h:
--------------------------------------------------------------------------------
1 | //
2 | // SVRadialGradientLayer.h
3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD
4 | //
5 | // Copyright (c) 2014-2017 Tobias Tiemerding. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | @interface SVRadialGradientLayer : CALayer
11 |
12 | @property (nonatomic) CGPoint gradientCenter;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Example/Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.m:
--------------------------------------------------------------------------------
1 | //
2 | // SVRadialGradientLayer.m
3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD
4 | //
5 | // Copyright (c) 2014-2017 Tobias Tiemerding. All rights reserved.
6 | //
7 |
8 | #import "SVRadialGradientLayer.h"
9 |
10 | @implementation SVRadialGradientLayer
11 |
12 | - (void)drawInContext:(CGContextRef)context {
13 | size_t locationsCount = 2;
14 | CGFloat locations[2] = {0.0f, 1.0f};
15 | CGFloat colors[8] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.75f};
16 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
17 | CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, colors, locations, locationsCount);
18 | CGColorSpaceRelease(colorSpace);
19 |
20 | float radius = MIN(self.bounds.size.width , self.bounds.size.height);
21 | CGContextDrawRadialGradient (context, gradient, self.gradientCenter, 0, self.gradientCenter, radius, kCGGradientDrawsAfterEndLocation);
22 | CGGradientRelease(gradient);
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/HUPhotoBrowser/HUPhotoBrowser-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_HUPhotoBrowser : NSObject
3 | @end
4 | @implementation PodsDummy_HUPhotoBrowser
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/HUPhotoBrowser/HUPhotoBrowser-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/HUPhotoBrowser/HUPhotoBrowser.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/HUPhotoBrowser
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/HUPhotoBrowser" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" "${PODS_ROOT}/Headers/Public/HUPhotoPicker" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SVProgressHUD"
4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SVProgressHUD"
5 | OTHER_LDFLAGS = -framework "AssetsLibrary" -framework "Photos" -framework "UIKit"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | SKIP_INSTALL = YES
12 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/HUPhotoPicker/HUPhotoPicker-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_HUPhotoPicker : NSObject
3 | @end
4 | @implementation PodsDummy_HUPhotoPicker
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/HUPhotoPicker/HUPhotoPicker-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/HUPhotoPicker/HUPhotoPicker.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/HUPhotoPicker
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/HUPhotoPicker" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" "${PODS_ROOT}/Headers/Public/HUPhotoPicker" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SVProgressHUD"
4 | OTHER_LDFLAGS = -framework "Photos" -framework "UIKit"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/HUPhotoPicker
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/HUPhotoPicker/ResourceBundle-HUPhotoPicker-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleIdentifier
8 | ${PRODUCT_BUNDLE_IDENTIFIER}
9 | CFBundleInfoDictionaryVersion
10 | 6.0
11 | CFBundleName
12 | ${PRODUCT_NAME}
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0.3
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HUPhotoBrowser Demo/Pods-HUPhotoBrowser Demo-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_HUPhotoBrowser_Demo : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_HUPhotoBrowser_Demo
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HUPhotoBrowser Demo/Pods-HUPhotoBrowser Demo.debug.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" "${PODS_ROOT}/Headers/Public/HUPhotoPicker" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SVProgressHUD"
3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/HUPhotoBrowser" "$PODS_CONFIGURATION_BUILD_DIR/HUPhotoPicker" "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage" "$PODS_CONFIGURATION_BUILD_DIR/SVProgressHUD"
4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" -isystem "${PODS_ROOT}/Headers/Public/HUPhotoPicker" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SVProgressHUD"
5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"HUPhotoBrowser" -l"HUPhotoPicker" -l"SDWebImage" -l"SVProgressHUD" -framework "AssetsLibrary" -framework "ImageIO" -framework "Photos" -framework "QuartzCore" -framework "UIKit"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HUPhotoBrowser Demo/Pods-HUPhotoBrowser Demo.release.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" "${PODS_ROOT}/Headers/Public/HUPhotoPicker" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SVProgressHUD"
3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/HUPhotoBrowser" "$PODS_CONFIGURATION_BUILD_DIR/HUPhotoPicker" "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage" "$PODS_CONFIGURATION_BUILD_DIR/SVProgressHUD"
4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" -isystem "${PODS_ROOT}/Headers/Public/HUPhotoPicker" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SVProgressHUD"
5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"HUPhotoBrowser" -l"HUPhotoPicker" -l"SDWebImage" -l"SVProgressHUD" -framework "AssetsLibrary" -framework "ImageIO" -framework "Photos" -framework "QuartzCore" -framework "UIKit"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HUPhotoBrowser DemoTests/Pods-HUPhotoBrowser DemoTests-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 | Generated by CocoaPods - https://cocoapods.org
4 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HUPhotoBrowser DemoTests/Pods-HUPhotoBrowser DemoTests-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Generated by CocoaPods - https://cocoapods.org
18 | Title
19 |
20 | Type
21 | PSGroupSpecifier
22 |
23 |
24 | StringsTable
25 | Acknowledgements
26 | Title
27 | Acknowledgements
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HUPhotoBrowser DemoTests/Pods-HUPhotoBrowser DemoTests-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_HUPhotoBrowser_DemoTests : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_HUPhotoBrowser_DemoTests
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HUPhotoBrowser DemoTests/Pods-HUPhotoBrowser DemoTests.debug.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" "${PODS_ROOT}/Headers/Public/HUPhotoPicker" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SVProgressHUD"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" -isystem "${PODS_ROOT}/Headers/Public/HUPhotoPicker" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SVProgressHUD"
4 | OTHER_LDFLAGS = $(inherited) -ObjC
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
8 | PODS_ROOT = ${SRCROOT}/Pods
9 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HUPhotoBrowser DemoTests/Pods-HUPhotoBrowser DemoTests.release.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" "${PODS_ROOT}/Headers/Public/HUPhotoPicker" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SVProgressHUD"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" -isystem "${PODS_ROOT}/Headers/Public/HUPhotoPicker" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SVProgressHUD"
4 | OTHER_LDFLAGS = $(inherited) -ObjC
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
8 | PODS_ROOT = ${SRCROOT}/Pods
9 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SDWebImage : NSObject
3 | @end
4 | @implementation PodsDummy_SDWebImage
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/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/HUPhotoBrowser" "${PODS_ROOT}/Headers/Public/HUPhotoPicker" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SVProgressHUD"
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 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SDWebImage
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SVProgressHUD : NSObject
3 | @end
4 | @implementation PodsDummy_SVProgressHUD
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SVProgressHUD
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SVProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HUPhotoBrowser" "${PODS_ROOT}/Headers/Public/HUPhotoPicker" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SVProgressHUD"
4 | OTHER_LDFLAGS = -framework "QuartzCore"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SVProgressHUD
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 |
--------------------------------------------------------------------------------
/HUPhotoBrowser.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/HUPhotoBrowser.a
--------------------------------------------------------------------------------
/HUPhotoBrowser.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod spec lint HUPhotoBrowser.podspec' to ensure this is a
3 | # valid spec and to remove all comments including this before submitting the spec.
4 | #
5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
7 | #
8 |
9 | Pod::Spec.new do |s|
10 | s.name = "HUPhotoBrowser"
11 | s.version = "1.4.5"
12 | s.summary = "photo browser for ios, which can browse Photo library and web image"
13 | s.homepage = "https://github.com/hujewelz/HUPhotoBrowser"
14 | s.license = "MIT"
15 | s.author = { "Jewelz Hu" => "https://github.com/hujewelz/HUPhotoBrowser" }
16 | s.platform = :ios, "7.0"
17 | s.source = { :git => "https://github.com/hujewelz/HUPhotoBrowser.git", :tag => s.version.to_s }
18 | s.source_files = "HUPhotoBrowser/**/*.{h,m}"
19 | s.requires_arc = true
20 | s.frameworks = "UIKit", "Photos", "AssetsLibrary"
21 |
22 | s.public_header_files = "HUPhotoBrowser/HUPhotoBrowser.h","HUPhotoBrowser/HUWebImageDownloader/HUWebImage.h", "HUPhotoBrowser/HUWebImageDownloader/{UIImageView+HUWebImage,HUWebImageDownloader}.h"
23 | s.dependency "SVProgressHUD"
24 |
25 |
26 | end
27 |
--------------------------------------------------------------------------------
/HUPhotoBrowser.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/HUPhotoBrowser.xcodeproj/project.xcworkspace/xcshareddata/HUPhotoBrowser.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | D0727199-8C7A-438B-A052-108CA74B7080
9 | IDESourceControlProjectName
10 | project
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
14 | https://github.com/hujewelz/HUPhotoBrowser.git
15 |
16 | IDESourceControlProjectPath
17 | HUPhotoBrowser.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/hujewelz/HUPhotoBrowser.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 3E54BB6501640F2F1E4E23A6F020501F2858AB48
36 | IDESourceControlWCCName
37 | HUPhotoBrowser
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/HUPhotoBrowser.xcodeproj/project.xcworkspace/xcuserdata/jewelz.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/HUPhotoBrowser.xcodeproj/project.xcworkspace/xcuserdata/jewelz.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/HUPhotoBrowser.xcodeproj/xcuserdata/jewelz.xcuserdatad/xcschemes/HUPhotoBrowser.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
65 |
71 |
72 |
73 |
74 |
75 |
76 |
82 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/HUPhotoBrowser.xcodeproj/xcuserdata/jewelz.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HUPhotoBrowser.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 0406225C1C7E93D0005653C1
16 |
17 | primary
18 |
19 |
20 | 040622671C7E93D0005653C1
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/HUPhotoBrowser.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/HUPhotoBrowser.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HUPhotoBrowser.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 0406225C1C7E93D0005653C1
16 |
17 | primary
18 |
19 |
20 | 040622671C7E93D0005653C1
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/HUPhotoBrowser.h:
--------------------------------------------------------------------------------
1 |
2 | //
3 | // HUPhotoBrowser.h
4 | // HUPhotoBrowser
5 | //
6 | // Created by mac on 16/2/24.
7 | // Copyright (c) 2016年 hujewelz. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | typedef void(^ __nullable DismissBlock)(UIImage * __nullable image, NSInteger index);
13 |
14 | @interface HUPhotoBrowser : UIView
15 |
16 | @property (nonatomic, strong, readonly) UIButton *saveButton;
17 |
18 | /*
19 | * 是否隐藏工具栏,默认不隐藏
20 | */
21 | @property (nonatomic) BOOL didHideToolBar;
22 |
23 | /*
24 | * @param imageView 点击的imageView
25 | * @param URLStrings 加载的网络图片的urlString
26 | * @param index 点击的图片在所有要展示图片中的位置
27 | */
28 |
29 | + (nonnull instancetype)showFromImageView:(nullable UIImageView *)imageView withURLStrings:(nullable NSArray *)URLStrings atIndex:(NSInteger)index;
30 |
31 | /*
32 | * @param imageView 点击的imageView
33 | * @param withImages 加载的本地图片
34 | * @param index 点击的图片在所有要展示图片中的位置
35 | */
36 |
37 | + (nonnull instancetype)showFromImageView:(nullable UIImageView *)imageView withImages:(nullable NSArray *)images atIndex:(NSInteger)index;
38 |
39 | /*
40 | * @param imageView 点击的imageView
41 | * @param URLStrings 加载的网络图片的urlString
42 | * @param image 占位图片
43 | * @param index 点击的图片在所有要展示图片中的位置
44 | * @param dismiss photoBrowser消失的回调
45 | */
46 | + (nonnull instancetype)showFromImageView:(nullable UIImageView *)imageView withURLStrings:(nullable NSArray *)URLStrings placeholderImage:(nullable UIImage *)image atIndex:(NSInteger)index dismiss:(DismissBlock)block;
47 |
48 | /*
49 | * @param imageView 点击的imageView
50 | * @param withImages 加载的本地图片
51 | * @param image 占位图片
52 | * @param index 点击的图片在所有要展示图片中的位置
53 | * @param dismiss photoBrowser消失的回调
54 | */
55 | + (nonnull instancetype)showFromImageView:(nullable UIImageView *)imageView withImages:(nullable NSArray *)images atIndex:(NSInteger)index dismiss:(DismissBlock)block;
56 |
57 | @property (nonatomic, strong, nullable) UIImage *placeholderImage;
58 |
59 | @end
60 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/HUPhotoBrowserCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUPhotoBrowserCell.h
3 | // HUPhotoBrowser
4 | //
5 | // Created by mac on 16/2/24.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define kPhotoBrowserCellID @"HUPhotoBrowserCell"
12 | static NSString * const kPhotoCellDidZommingNotification = @"kPhotoCellDidZommingNotification";
13 | static NSString * const kPhotoCellDidImageLoadedNotification = @"kPhotoCellDidImageLoadedNotification";
14 |
15 | @interface HUPhotoBrowserCell : UICollectionViewCell
16 |
17 | @property (nonatomic, strong, readonly) UIActivityIndicatorView *indicatorView;
18 | @property (nonatomic, strong, readonly) UIImageView *imageView;
19 |
20 | @property (nonatomic, strong) NSIndexPath *indexPath;
21 |
22 | - (void)resetZoomingScale;
23 |
24 | - (void)resizeImageView;
25 |
26 | - (void)startAnimating;
27 |
28 | - (void)stopAnimating;
29 |
30 | @property (nonatomic, copy) void(^tapActionBlock)(UITapGestureRecognizer *tapGesture);
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/HUWebImageDownloader/HUWebImage.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUWebImage.h
3 | // HUPhotoBrowser
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #ifndef HUPhotoBrowser_HUWebImage_h
10 | #define HUPhotoBrowser_HUWebImage_h
11 |
12 | #import "UIImageView+HUWebImage.h"
13 | #import "HUWebImageDownloader.h"
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/HUWebImageDownloader/HUWebImageDownloadOperation.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUWebImageDownloadOperation.h
3 | // Pods
4 | //
5 | // Created by mac on 16/4/19.
6 | //
7 | //
8 |
9 | #import
10 |
11 | typedef void (^HUWebImageDownloadCompltedBlock) (UIImage * __nullable image, NSData * __nullable data, NSError * __nullable error);
12 |
13 | @interface HUWebImageDownloadOperation : NSOperation
14 |
15 | - (nonnull instancetype)initWithURL:(nonnull NSURL *)url completed:(nullable HUWebImageDownloadCompltedBlock)completedBlock;
16 | - (void)resume;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/HUWebImageDownloader/HUWebImageDownloadOperation.m:
--------------------------------------------------------------------------------
1 | //
2 | // HUWebImageDownloadOperation.m
3 | // Pods
4 | //
5 | // Created by mac on 16/4/19.
6 | //
7 | //
8 |
9 | #import "HUWebImageDownloadOperation.h"
10 | #import "UIImage+HUExtension.h"
11 |
12 | @interface HUWebImageDownloadOperation () {
13 | NSLock *_lock;
14 | }
15 |
16 | @property (nonatomic, copy) HUWebImageDownloadCompltedBlock completedBlock;
17 | @property (nonatomic, strong) NSURL *url;
18 | @property (nonatomic, strong) NSURLSession *session;
19 | @property (nonatomic, strong) NSURLSessionDownloadTask *downloadTask;
20 | @property (nonatomic, assign) BOOL myFinished;
21 | @property (nonatomic, assign) BOOL myExecuting;
22 |
23 | @end
24 |
25 | @implementation HUWebImageDownloadOperation
26 |
27 | - (instancetype)initWithURL:(NSURL *)url completed:(HUWebImageDownloadCompltedBlock)completedBlock {
28 | if (self = [super init]) {
29 | _url = url;
30 | _completedBlock = completedBlock;
31 | _lock = [NSLock new];
32 | }
33 | return self;
34 | }
35 |
36 | - (void)resume {
37 | if (self.isCancelled && !self.isFinished) {
38 | [_lock lock];
39 | self.myExecuting = YES;
40 | [_lock unlock];
41 | [_downloadTask resume];
42 | }
43 | }
44 |
45 | - (void)start {
46 | if (self.isCancelled) {
47 | [self reset];
48 | return;
49 | }
50 | [_lock lock];
51 | self.myExecuting = YES;
52 | [_lock unlock];
53 | [self beginTask];
54 | }
55 |
56 | - (BOOL)isConcurrent {
57 | return YES;
58 | }
59 |
60 | - (BOOL)isFinished {
61 | return _myFinished;
62 | }
63 |
64 | - (BOOL)isExecuting {
65 | return _myExecuting;
66 | }
67 |
68 | - (void)setMyExecuting:(BOOL)myExecuting {
69 | [self willChangeValueForKey:@"isExecuting"];
70 | _myExecuting = myExecuting;
71 | [self didChangeValueForKey:@"isExecuting"];
72 | }
73 |
74 | - (void)setMyFinished:(BOOL)myFinished {
75 | [self willChangeValueForKey:@"isFinished"];
76 | _myFinished = myFinished;
77 | [self didChangeValueForKey:@"isFinished"];
78 | }
79 |
80 | - (void)beginTask {
81 |
82 | NSURLRequest *request = [NSURLRequest requestWithURL:_url];
83 | __weak __typeof(self) wself = self;
84 |
85 | self.downloadTask = [self.session downloadTaskWithRequest:request completionHandler:^(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error) {
86 | __strong __typeof(self) sself = wself;
87 |
88 | [sself end];
89 |
90 | if (!sself.completedBlock) {
91 | sself.myFinished = YES;
92 | return ;
93 | }
94 |
95 |
96 | NSString *caches = [NSSearchPathForDirectoriesInDomains (NSCachesDirectory, NSUserDomainMask, YES) lastObject];
97 | NSString *file = [caches stringByAppendingPathComponent:response.suggestedFilename];
98 | if (location.path) {
99 | [NSFileManager.defaultManager moveItemAtPath:location.path toPath:file error:nil];
100 | }
101 |
102 | NSData *data = [NSData dataWithContentsOfFile:file];
103 |
104 | [NSFileManager.defaultManager removeItemAtPath:file error:nil];
105 |
106 | if (data == nil || sself.isCancelled) {
107 | sself.completedBlock(nil, nil, error);
108 | sself.myFinished = YES;
109 | return ;
110 | }
111 |
112 | UIImage *image = [UIImage hu_imageFromData:data];
113 | [[NSOperationQueue mainQueue] addOperationWithBlock:^{
114 | sself.completedBlock(image, data, nil);
115 | sself.myFinished = YES;
116 | }];
117 |
118 | }];
119 |
120 | [_downloadTask resume];
121 | }
122 |
123 | - (void)reset {
124 | [self end];
125 | self.completedBlock = nil;
126 | [[self.session dataTaskWithURL:_url] cancel];
127 | }
128 |
129 | - (void)end {
130 | self.myExecuting = NO;
131 | self.myFinished = YES;
132 | }
133 |
134 | - (NSURLSession *)session {
135 | if (_session == nil) {
136 | NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
137 | _session = [NSURLSession sessionWithConfiguration:configuration];
138 | }
139 | return _session;
140 | }
141 |
142 |
143 | @end
144 |
145 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/HUWebImageDownloader/HUWebImageDownloader.h:
--------------------------------------------------------------------------------
1 | //
2 | // HUWebImageDownloader.h
3 | // HUPhotoBrowser
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSInteger, HUWebImageOption) {
12 | HUWebImageOptionNone,
13 | HUWebImageOptionMemoryOnely,
14 | HUWebImageOptionMemoryAndDisk,
15 | };
16 |
17 | typedef void(^HUDownloadCompletionBlock)( UIImage * __nullable image, NSError * __nullable error, NSURL * __nullable imageUrl);
18 |
19 | @class HUWebImageDownloadOperation;
20 | @interface HUWebImageDownloader : NSObject
21 |
22 | + (nonnull instancetype)sharedInstance;
23 | + (nonnull NSString *)cacheKeyForURL:(nonnull NSURL *)url;
24 | + (nullable UIImage *)imageFromDiskCacheForKey:(nonnull NSString *)key;
25 | + (nullable UIImage *)imageFromMemoryCacheForKey:(nonnull NSString *)key;
26 | + (nonnull HUWebImageDownloadOperation *)downloadImageWithURL:(nonnull NSURL *)url completed:(nullable HUDownloadCompletionBlock)completeBlock;
27 | + (nonnull HUWebImageDownloadOperation *)downloadImageWithURL:(nonnull NSURL *)url option:(HUWebImageOption)option completed:(nullable HUDownloadCompletionBlock)completeBlock;
28 |
29 | - (nonnull NSString *)cacheKeyForURL:(nonnull NSURL *)url;
30 | - (nullable UIImage *)imageFromDiskCacheForKey:(nonnull NSString *)key;
31 | - (nullable UIImage *)imageFromMemoryCacheForKey:(nonnull NSString *)key;
32 | - (void)saveImage:(nullable UIImage *)image forKey:(nonnull NSString *)key toDisk:(BOOL)toDisk;
33 |
34 |
35 | - (nonnull HUWebImageDownloadOperation *)downloadImageWithURL:(nonnull NSURL *)url completed:(nullable HUDownloadCompletionBlock)completeBlock;
36 |
37 |
38 | - (nonnull HUWebImageDownloadOperation *)downloadImageWithURL:(nonnull NSURL *)url option:(HUWebImageOption)option completed:(nullable HUDownloadCompletionBlock)completeBlock;
39 |
40 | @property (nonatomic) BOOL shouldCacheImagesInMemory;
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/HUWebImageDownloader/UIImage+HUExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+HUExtension.h
3 | // HUPhotoBrowser
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (HUExtension)
12 |
13 | + (UIImage *)hu_imageFromData:(NSData *)data;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/HUWebImageDownloader/UIImage+HUExtension.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+HUExtension.m
3 | // HUPhotoBrowser
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import "UIImage+HUExtension.h"
10 |
11 | @implementation UIImage (HUExtension)
12 |
13 | + (UIImage *)hu_imageFromData:(NSData *)data {
14 | UIImage *image = [UIImage imageWithData:data];
15 | return [image fixOrientation];
16 | }
17 |
18 | - (UIImage *)fixOrientation {
19 |
20 | // No-op if the orientation is already correct
21 | if (self.imageOrientation == UIImageOrientationUp)
22 | return self;
23 |
24 | // We need to calculate the proper transformation to make the image upright.
25 | // We do it in 2 steps: Rotate if Left/Right/Down, and then flip if Mirrored.
26 | CGAffineTransform transform = CGAffineTransformIdentity;
27 |
28 | switch (self.imageOrientation) {
29 | case UIImageOrientationDown:
30 | case UIImageOrientationDownMirrored:
31 | transform = CGAffineTransformTranslate(transform, self.size.width, self.size.height);
32 | transform = CGAffineTransformRotate(transform, M_PI);
33 | break;
34 |
35 | case UIImageOrientationLeft:
36 | case UIImageOrientationLeftMirrored:
37 | transform = CGAffineTransformTranslate(transform, self.size.width, 0);
38 | transform = CGAffineTransformRotate(transform, M_PI_2);
39 | break;
40 |
41 | case UIImageOrientationRight:
42 | case UIImageOrientationRightMirrored:
43 | transform = CGAffineTransformTranslate(transform, 0, self.size.height);
44 | transform = CGAffineTransformRotate(transform, -M_PI_2);
45 | break;
46 | default:
47 | break;
48 | }
49 |
50 | switch (self.imageOrientation) {
51 | case UIImageOrientationUpMirrored:
52 | case UIImageOrientationDownMirrored:
53 | transform = CGAffineTransformTranslate(transform, self.size.width, 0);
54 | transform = CGAffineTransformScale(transform, -1, 1);
55 | break;
56 |
57 | case UIImageOrientationLeftMirrored:
58 | case UIImageOrientationRightMirrored:
59 | transform = CGAffineTransformTranslate(transform, self.size.height, 0);
60 | transform = CGAffineTransformScale(transform, -1, 1);
61 | break;
62 | default:
63 | break;
64 | }
65 |
66 | // Now we draw the underlying CGImage into a new context, applying the transform
67 | // calculated above.
68 | CGContextRef ctx = CGBitmapContextCreate(NULL, self.size.width, self.size.height,
69 | CGImageGetBitsPerComponent(self.CGImage), 0,
70 | CGImageGetColorSpace(self.CGImage),
71 | CGImageGetBitmapInfo(self.CGImage));
72 | CGContextConcatCTM(ctx, transform);
73 | switch (self.imageOrientation) {
74 | case UIImageOrientationLeft:
75 | case UIImageOrientationLeftMirrored:
76 | case UIImageOrientationRight:
77 | case UIImageOrientationRightMirrored:
78 | // Grr...
79 | CGContextDrawImage(ctx, CGRectMake(0,0,self.size.height,self.size.width), self.CGImage);
80 | break;
81 |
82 | default:
83 | CGContextDrawImage(ctx, CGRectMake(0,0,self.size.width,self.size.height), self.CGImage);
84 | break;
85 | }
86 |
87 | // And now we just create a new UIImage from the drawing context
88 | CGImageRef cgimg = CGBitmapContextCreateImage(ctx);
89 | UIImage *img = [UIImage imageWithCGImage:cgimg];
90 | CGContextRelease(ctx);
91 | CGImageRelease(cgimg);
92 | return img;
93 | }
94 |
95 |
96 |
97 | @end
98 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/HUWebImageDownloader/UIImageView+HUWebImage.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImageView+HUWebImage.h
3 | // HUPhotoBrowser
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImageView (HUWebImage)
12 |
13 | - (void)hu_setImageWithURL:(nullable NSURL *)url;
14 | - (void)hu_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder;
15 | - (void)hu_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder completed:(nullable void(^)(UIImage * __nullable image, NSError * __nullable error, NSURL * __nullable imageUrl))completed;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/HUWebImageDownloader/UIImageView+HUWebImage.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImageView+HUWebImage.m
3 | // HUPhotoBrowser
4 | //
5 | // Created by mac on 16/2/25.
6 | // Copyright (c) 2016年 hujewelz. All rights reserved.
7 | //
8 |
9 | #import "UIImageView+HUWebImage.h"
10 | #import "HUWebImageDownloadOperation.h"
11 | #import "HUWebImageDownloader.h"
12 | #import
13 | #import "hu_const.h"
14 |
15 |
16 | static char *loadOperationKey = "loadOperationKey";
17 | static char imageURLKey;
18 |
19 | @implementation UIImageView (HUWebImage)
20 |
21 | - (void)hu_setImageWithURL:(nullable NSURL *)url {
22 | [self hu_setImageWithURL:url placeholderImage:nil];
23 | }
24 |
25 | - (void)hu_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder {
26 | [self hu_setImageWithURL:url placeholderImage:placeholder completed:nil];
27 | }
28 |
29 | - (void)hu_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder completed:(nullable void (^)(UIImage *, NSError *, NSURL *))completed {
30 | if (url == nil) {
31 | return;
32 | }
33 | self.image = nil;
34 | self.image = placeholder;
35 | [self hu_cancelImageDownloadOperationForKey:@"downloadimage"];
36 | objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
37 | __weak __typeof(self) wself = self;
38 | HUWebImageDownloadOperation *operation = [HUWebImageDownloader downloadImageWithURL:url completed:^(UIImage *image, NSError *error, NSURL *imageUrl) {
39 | __strong __typeof (wself) sself = wself;
40 | if (!sself) {
41 | return ;
42 | }
43 | if (![[sself hu_imageURL].absoluteString isEqualToString:url.absoluteString]) {
44 | return;
45 | }
46 |
47 | dispatch_async_main({
48 | if (image) {
49 | sself.image = image;
50 | [sself setNeedsLayout];
51 | }
52 | else {
53 | sself.image = placeholder;
54 | [sself setNeedsLayout];
55 | }
56 | if (completed) {
57 | completed(image, error, imageUrl);
58 | }
59 | })
60 | }];
61 | if (operation) {
62 | [self hu_setImageDownloadOperation:operation forKey:@"downloadimage"];
63 | }
64 |
65 | }
66 |
67 |
68 |
69 | - (void)hu_setImageDownloadOperation:(id)operation forKey:(NSString *)key {
70 | if (key == nil) {
71 | return ;
72 | }
73 | [self hu_cancelImageDownloadOperationForKey:key];
74 | NSMutableDictionary *operations = [self operationDict];
75 | [operations setObject:operation forKey:key];
76 | }
77 |
78 | - (void)hu_cancelImageDownloadOperationForKey:(NSString *)key {
79 | NSMutableDictionary *operations = [self operationDict];
80 |
81 | id operation = operations[key];
82 | if ([operation isKindOfClass:[HUWebImageDownloadOperation class]]) {
83 | [operation cancel];
84 | }
85 | [operations removeObjectForKey:key];
86 | }
87 |
88 | - (NSMutableDictionary *)operationDict {
89 | NSMutableDictionary *operations = objc_getAssociatedObject(self, loadOperationKey);
90 | if (operations) {
91 | return operations;
92 | }
93 | operations = [NSMutableDictionary dictionary];
94 | objc_setAssociatedObject(self, loadOperationKey, operations, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
95 | return operations;
96 | }
97 |
98 | - (NSURL *)hu_imageURL {
99 | return objc_getAssociatedObject(self, &imageURLKey);
100 | }
101 |
102 | @end
103 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/UIView+frame.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Extension.h
3 | // 微博
4 | //
5 | // Created by jewelz on 15/4/23.
6 | // Copyright (c) 2015年 yangtzeu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (frame)
12 | @property (assign, nonatomic) CGFloat x;
13 | @property (assign, nonatomic) CGFloat y;
14 | @property (assign, nonatomic) CGFloat width;
15 | @property (assign, nonatomic) CGFloat height;
16 | @property (assign, nonatomic) CGSize size;
17 | @property (assign, nonatomic) CGPoint origion;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/UIView+frame.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Extension.m
3 | // 微博
4 | //
5 | // Created by jewelz on 15/4/23.
6 | // Copyright (c) 2015年 yangtzeu. All rights reserved.
7 | //
8 |
9 | #import "UIView+frame.h"
10 |
11 | @implementation UIView (frame)
12 |
13 | - (void)setX:(CGFloat)x {
14 | CGRect frame = self.frame;
15 | frame.origin.x = x;
16 | self.frame = frame;
17 | }
18 |
19 | - (CGFloat)x {
20 | return self.frame.origin.x;
21 | }
22 |
23 | - (void)setY:(CGFloat)y {
24 | CGRect frame = self.frame;
25 | frame.origin.y = y;
26 | self.frame = frame;
27 | }
28 |
29 | - (CGFloat)y {
30 | return self.frame.origin.y;
31 | }
32 |
33 | - (void)setWidth:(CGFloat)width {
34 | CGRect frame = self.frame;
35 | frame.size.width = width;
36 | self.frame = frame;
37 | }
38 |
39 | - (CGFloat)width {
40 | return self.frame.size.width;
41 | }
42 |
43 | - (void)setHeight:(CGFloat)height {
44 | CGRect frame = self.frame;
45 | frame.size.height = height;
46 | self.frame = frame;
47 | }
48 |
49 | - (CGFloat)height {
50 | return self.frame.size.height;
51 | }
52 |
53 | - (void)setSize:(CGSize)size {
54 | CGRect frame = self.frame;
55 | frame.size = size;
56 | self.frame = frame;
57 | }
58 |
59 | - (CGSize)size {
60 | return self.frame.size;
61 | }
62 |
63 | - (void)setOrigion:(CGPoint)origion {
64 | CGRect frame = self.frame;
65 | frame.origin = origion;
66 | self.frame = frame;
67 | }
68 |
69 | - (CGPoint)origion {
70 | return self.frame.origin;
71 | }
72 |
73 |
74 | @end
75 |
--------------------------------------------------------------------------------
/HUPhotoBrowser/hu_const.h:
--------------------------------------------------------------------------------
1 | //
2 | // const.h
3 | // HUPhotoBrowser
4 | //
5 | // Created by mac on 16/2/24.
6 | // Copyright (c) 2016年 jinhuadiqigan. All rights reserved.
7 | //
8 |
9 | #ifndef HUPhotoBrowser_const_h
10 | #define HUPhotoBrowser_const_h
11 |
12 | #define kScreenRect [UIScreen mainScreen].bounds
13 | #define kScreenWidth [UIScreen mainScreen].bounds.size.width
14 | #define kScreenHeight [UIScreen mainScreen].bounds.size.height
15 | #define kScreenRatio kScreenWidth / kScreenHeight
16 | #define kScreenMidX CGRectGetMaxX(kScreenRect)
17 | #define kScreenMidY CGRectGetMaxY(kScreenRect)
18 |
19 | #define dispatch_async_main(block) if ([NSThread isMainThread]) { \
20 | block;\
21 | } else { \
22 | dispatch_async(dispatch_get_main_queue(), ^{ \
23 | block; \
24 | }); \
25 | } \
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/HUPhotoBrowserTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Jewelz Hu
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # HUPhotoBrowser
2 | [](https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/master/LICENSE)
3 | [](https://img.shields.io/cocoapods/v/HUPhotoBrowser.svg)
4 |
5 | ⚠️最新的版本不再集成[HUPhotoPicker](https://github.com/hujewelz/HUPhotoPicker)了,需要使用的同学可以指定版本为 `1.2.5`,推荐单独使用[HUPhotoPicker](https://github.com/hujewelz/HUPhotoPicker)
6 |
7 | **HUPhotoBrowser** ios图片浏览器,支持浏览本地图片及网络图片,暂不支持浏览视频及gif,使用起来非常简单,只需要一行代码。
8 | **HUImagePickerViewController** 图片选择器,你可以像使用`UIImagePickerController`一样的使用它,支持图片多选。
9 |
10 | 
11 |
12 | ## PhotoBrowser的使用
13 |
14 | 在需要用到的地方 `#import `
15 |
16 | HUPhotoBrowser支持本地图片浏览
17 |
18 | [HUPhotoBrowser showFromImageView:cell.imageView withImages:self.images atIndex:indexPath.row];
19 |
20 | HUPhotoBrowser同时支持网络图片浏览
21 |
22 | [HUPhotoBrowser showFromImageView:cell.imageView withURLStrings:_URLStrings placeholderImage:[UIImage imageNamed:@"placeholder"] atIndex:indexPath.row dismiss:nil];
23 |
24 | 在需要浏览的图片的点击事件中调用即可:
25 |
26 | ```Objective-C
27 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
28 |
29 | PhotoCell *cell = (PhotoCell *)[collectionView cellForItemAtIndexPath:indexPath];
30 | if (_localImage) {
31 | [HUPhotoBrowser showFromImageView:cell.imageView withImages:self.originalImages atIndex:indexPath.row];
32 | }
33 | else {
34 | [HUPhotoBrowser showFromImageView:cell.imageView withURLStrings:_URLStrings placeholderImage:[UIImage imageNamed:@"placeholder"] atIndex:indexPath.row dismiss:nil];
35 | }
36 |
37 | }
38 | ```
39 |
40 | 你还可以获取到当前浏览到的图片
41 |
42 | ```Objective-C
43 | [HUPhotoBrowser showFromImageView:cell.imageView withImages:self.images placeholderImage:nil atIndex:indexPath.row dismiss:^(UIImage *image, NSInteger index) {
44 |
45 | }];
46 | ```
47 |
48 | ## 安装
49 |
50 | 1. [CocoaPods](https://cocoapods.org/)安装:
51 | ```
52 | pod 'HUPhotoBrowser'
53 | ```
54 | 2. 下载ZIP包,将`HUPhotoBrowser`资源文件拖到工程中。
55 | 3. 将`HUPhotoBrowser.xcodeproj`工程文件和`HUPhotoBrowser`源文件一同拖入工程目录下,在工程中右键选择 "Add Files to ...",选择`HUPhotoBrowser.xcodeproj`。
56 |
57 | 
58 |
59 | 然后在 "Build Settings -> Header Search Paths" 中添加源文件路径。
60 |
61 |
62 | ## 其他
63 |
64 | 为了不影响您项目中导入的其他第三方库,本库没有导入任何其他的第三方内容,可以放心使用。在使用前,您可以查看[示例程序](https://github.com/hujewelz/HUPhotoBrowser/tree/master/Example)
65 | * 如果在使用过程中遇到BUG,希望你能Issues我,谢谢(或者尝试下载最新的框架代码看看BUG修复没有)
66 | * 如果您有什么建议可以Issues我,谢谢
67 | * 后续我会持续更新,为它添加更多的功能,欢迎star :)
68 |
69 |
70 |
--------------------------------------------------------------------------------
/screenshot/2016-04-3008_57_13.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/screenshot/2016-04-3008_57_13.gif
--------------------------------------------------------------------------------
/screenshot/2016-04-309.57.28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/screenshot/2016-04-309.57.28.png
--------------------------------------------------------------------------------
/screenshot/2016-04-309.57.39.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/screenshot/2016-04-309.57.39.png
--------------------------------------------------------------------------------
/screenshot/2016-04-309.58.04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/screenshot/2016-04-309.58.04.png
--------------------------------------------------------------------------------
/screenshot/201604301836.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hujewelz/HUPhotoBrowser/c7530436a6463117052fb83d0c5e6fb303b4501b/screenshot/201604301836.png
--------------------------------------------------------------------------------