├── .swift-version
├── LICENSE
├── Podfile
├── Podfile.lock
├── Pods
├── Headers
│ ├── Private
│ │ └── SDWebImage
│ │ │ ├── NSBezierPath+RoundedCorners.h
│ │ │ ├── NSButton+WebCache.h
│ │ │ ├── NSData+ImageContentType.h
│ │ │ ├── NSImage+Compatibility.h
│ │ │ ├── SDAnimatedImage.h
│ │ │ ├── SDAnimatedImageRep.h
│ │ │ ├── SDAnimatedImageView+WebCache.h
│ │ │ ├── SDAnimatedImageView.h
│ │ │ ├── SDAsyncBlockOperation.h
│ │ │ ├── SDDiskCache.h
│ │ │ ├── SDImageAPNGCoder.h
│ │ │ ├── SDImageAPNGCoderInternal.h
│ │ │ ├── SDImageAssetManager.h
│ │ │ ├── SDImageCache.h
│ │ │ ├── SDImageCacheConfig.h
│ │ │ ├── SDImageCacheDefine.h
│ │ │ ├── SDImageCachesManager.h
│ │ │ ├── SDImageCachesManagerOperation.h
│ │ │ ├── SDImageCoder.h
│ │ │ ├── SDImageCoderHelper.h
│ │ │ ├── SDImageCodersManager.h
│ │ │ ├── SDImageFrame.h
│ │ │ ├── SDImageGIFCoder.h
│ │ │ ├── SDImageGIFCoderInternal.h
│ │ │ ├── SDImageGraphics.h
│ │ │ ├── SDImageIOCoder.h
│ │ │ ├── SDImageLoader.h
│ │ │ ├── SDImageLoadersManager.h
│ │ │ ├── SDImageTransformer.h
│ │ │ ├── SDInternalMacros.h
│ │ │ ├── SDMemoryCache.h
│ │ │ ├── SDWeakProxy.h
│ │ │ ├── SDWebImage.h
│ │ │ ├── SDWebImageCacheKeyFilter.h
│ │ │ ├── SDWebImageCacheSerializer.h
│ │ │ ├── SDWebImageCompat.h
│ │ │ ├── SDWebImageDefine.h
│ │ │ ├── SDWebImageDownloader.h
│ │ │ ├── SDWebImageDownloaderConfig.h
│ │ │ ├── SDWebImageDownloaderOperation.h
│ │ │ ├── SDWebImageDownloaderRequestModifier.h
│ │ │ ├── SDWebImageError.h
│ │ │ ├── SDWebImageIndicator.h
│ │ │ ├── SDWebImageManager.h
│ │ │ ├── SDWebImageOperation.h
│ │ │ ├── SDWebImagePrefetcher.h
│ │ │ ├── SDWebImageTransition.h
│ │ │ ├── SDmetamacros.h
│ │ │ ├── UIButton+WebCache.h
│ │ │ ├── UIColor+HexString.h
│ │ │ ├── UIImage+ForceDecode.h
│ │ │ ├── UIImage+GIF.h
│ │ │ ├── UIImage+MemoryCacheCost.h
│ │ │ ├── UIImage+Metadata.h
│ │ │ ├── UIImage+MultiFormat.h
│ │ │ ├── UIImage+Transform.h
│ │ │ ├── UIImageView+HighlightedWebCache.h
│ │ │ ├── UIImageView+WebCache.h
│ │ │ ├── UIView+WebCache.h
│ │ │ └── UIView+WebCacheOperation.h
│ └── Public
│ │ └── SDWebImage
│ │ ├── NSButton+WebCache.h
│ │ ├── NSData+ImageContentType.h
│ │ ├── NSImage+Compatibility.h
│ │ ├── SDAnimatedImage.h
│ │ ├── SDAnimatedImageRep.h
│ │ ├── SDAnimatedImageView+WebCache.h
│ │ ├── SDAnimatedImageView.h
│ │ ├── SDDiskCache.h
│ │ ├── SDImageAPNGCoder.h
│ │ ├── SDImageCache.h
│ │ ├── SDImageCacheConfig.h
│ │ ├── SDImageCacheDefine.h
│ │ ├── SDImageCachesManager.h
│ │ ├── SDImageCoder.h
│ │ ├── SDImageCoderHelper.h
│ │ ├── SDImageCodersManager.h
│ │ ├── SDImageFrame.h
│ │ ├── SDImageGIFCoder.h
│ │ ├── SDImageGraphics.h
│ │ ├── SDImageIOCoder.h
│ │ ├── SDImageLoader.h
│ │ ├── SDImageLoadersManager.h
│ │ ├── SDImageTransformer.h
│ │ ├── SDMemoryCache.h
│ │ ├── SDWebImage.h
│ │ ├── SDWebImageCacheKeyFilter.h
│ │ ├── SDWebImageCacheSerializer.h
│ │ ├── SDWebImageCompat.h
│ │ ├── SDWebImageDefine.h
│ │ ├── SDWebImageDownloader.h
│ │ ├── SDWebImageDownloaderConfig.h
│ │ ├── SDWebImageDownloaderOperation.h
│ │ ├── SDWebImageDownloaderRequestModifier.h
│ │ ├── SDWebImageError.h
│ │ ├── SDWebImageIndicator.h
│ │ ├── SDWebImageManager.h
│ │ ├── SDWebImageOperation.h
│ │ ├── SDWebImagePrefetcher.h
│ │ ├── SDWebImageTransition.h
│ │ ├── UIButton+WebCache.h
│ │ ├── UIImage+ForceDecode.h
│ │ ├── UIImage+GIF.h
│ │ ├── UIImage+MemoryCacheCost.h
│ │ ├── UIImage+Metadata.h
│ │ ├── UIImage+MultiFormat.h
│ │ ├── UIImage+Transform.h
│ │ ├── UIImageView+HighlightedWebCache.h
│ │ ├── UIImageView+WebCache.h
│ │ ├── UIView+WebCache.h
│ │ └── UIView+WebCacheOperation.h
├── Manifest.lock
├── Pods.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── gaoshaodong.xcuserdatad
│ │ └── xcschemes
│ │ ├── Pods-SDCycleScrollView.xcscheme
│ │ ├── SDWebImage.xcscheme
│ │ └── xcschememanagement.plist
├── SDWebImage
│ ├── LICENSE
│ ├── README.md
│ ├── SDWebImage
│ │ ├── NSButton+WebCache.h
│ │ ├── NSButton+WebCache.m
│ │ ├── NSData+ImageContentType.h
│ │ ├── NSData+ImageContentType.m
│ │ ├── NSImage+Compatibility.h
│ │ ├── NSImage+Compatibility.m
│ │ ├── Private
│ │ │ ├── NSBezierPath+RoundedCorners.h
│ │ │ ├── NSBezierPath+RoundedCorners.m
│ │ │ ├── SDAsyncBlockOperation.h
│ │ │ ├── SDAsyncBlockOperation.m
│ │ │ ├── SDImageAPNGCoderInternal.h
│ │ │ ├── SDImageAssetManager.h
│ │ │ ├── SDImageAssetManager.m
│ │ │ ├── SDImageCachesManagerOperation.h
│ │ │ ├── SDImageCachesManagerOperation.m
│ │ │ ├── SDImageGIFCoderInternal.h
│ │ │ ├── SDInternalMacros.h
│ │ │ ├── SDInternalMacros.m
│ │ │ ├── SDWeakProxy.h
│ │ │ ├── SDWeakProxy.m
│ │ │ ├── SDmetamacros.h
│ │ │ ├── UIColor+HexString.h
│ │ │ └── UIColor+HexString.m
│ │ ├── SDAnimatedImage.h
│ │ ├── SDAnimatedImage.m
│ │ ├── SDAnimatedImageRep.h
│ │ ├── SDAnimatedImageRep.m
│ │ ├── SDAnimatedImageView+WebCache.h
│ │ ├── SDAnimatedImageView+WebCache.m
│ │ ├── SDAnimatedImageView.h
│ │ ├── SDAnimatedImageView.m
│ │ ├── SDDiskCache.h
│ │ ├── SDDiskCache.m
│ │ ├── SDImageAPNGCoder.h
│ │ ├── SDImageAPNGCoder.m
│ │ ├── SDImageCache.h
│ │ ├── SDImageCache.m
│ │ ├── SDImageCacheConfig.h
│ │ ├── SDImageCacheConfig.m
│ │ ├── SDImageCacheDefine.h
│ │ ├── SDImageCacheDefine.m
│ │ ├── SDImageCachesManager.h
│ │ ├── SDImageCachesManager.m
│ │ ├── SDImageCoder.h
│ │ ├── SDImageCoder.m
│ │ ├── SDImageCoderHelper.h
│ │ ├── SDImageCoderHelper.m
│ │ ├── SDImageCodersManager.h
│ │ ├── SDImageCodersManager.m
│ │ ├── SDImageFrame.h
│ │ ├── SDImageFrame.m
│ │ ├── SDImageGIFCoder.h
│ │ ├── SDImageGIFCoder.m
│ │ ├── SDImageGraphics.h
│ │ ├── SDImageGraphics.m
│ │ ├── SDImageIOCoder.h
│ │ ├── SDImageIOCoder.m
│ │ ├── SDImageLoader.h
│ │ ├── SDImageLoader.m
│ │ ├── SDImageLoadersManager.h
│ │ ├── SDImageLoadersManager.m
│ │ ├── SDImageTransformer.h
│ │ ├── SDImageTransformer.m
│ │ ├── SDMemoryCache.h
│ │ ├── SDMemoryCache.m
│ │ ├── SDWebImageCacheKeyFilter.h
│ │ ├── SDWebImageCacheKeyFilter.m
│ │ ├── SDWebImageCacheSerializer.h
│ │ ├── SDWebImageCacheSerializer.m
│ │ ├── SDWebImageCompat.h
│ │ ├── SDWebImageCompat.m
│ │ ├── SDWebImageDefine.h
│ │ ├── SDWebImageDefine.m
│ │ ├── SDWebImageDownloader.h
│ │ ├── SDWebImageDownloader.m
│ │ ├── SDWebImageDownloaderConfig.h
│ │ ├── SDWebImageDownloaderConfig.m
│ │ ├── SDWebImageDownloaderOperation.h
│ │ ├── SDWebImageDownloaderOperation.m
│ │ ├── SDWebImageDownloaderRequestModifier.h
│ │ ├── SDWebImageDownloaderRequestModifier.m
│ │ ├── SDWebImageError.h
│ │ ├── SDWebImageError.m
│ │ ├── SDWebImageIndicator.h
│ │ ├── SDWebImageIndicator.m
│ │ ├── SDWebImageManager.h
│ │ ├── SDWebImageManager.m
│ │ ├── SDWebImageOperation.h
│ │ ├── SDWebImagePrefetcher.h
│ │ ├── SDWebImagePrefetcher.m
│ │ ├── SDWebImageTransition.h
│ │ ├── SDWebImageTransition.m
│ │ ├── UIButton+WebCache.h
│ │ ├── UIButton+WebCache.m
│ │ ├── UIImage+ForceDecode.h
│ │ ├── UIImage+ForceDecode.m
│ │ ├── UIImage+GIF.h
│ │ ├── UIImage+GIF.m
│ │ ├── UIImage+MemoryCacheCost.h
│ │ ├── UIImage+MemoryCacheCost.m
│ │ ├── UIImage+Metadata.h
│ │ ├── UIImage+Metadata.m
│ │ ├── UIImage+MultiFormat.h
│ │ ├── UIImage+MultiFormat.m
│ │ ├── UIImage+Transform.h
│ │ ├── UIImage+Transform.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
│ └── WebImage
│ │ ├── SDWebImage.h
│ │ └── SDWebImage.modulemap
└── Target Support Files
│ ├── Pods-SDCycleScrollView
│ ├── Pods-SDCycleScrollView-acknowledgements.markdown
│ ├── Pods-SDCycleScrollView-acknowledgements.plist
│ ├── Pods-SDCycleScrollView-dummy.m
│ ├── Pods-SDCycleScrollView-frameworks.sh
│ ├── Pods-SDCycleScrollView-resources.sh
│ ├── Pods-SDCycleScrollView.debug.xcconfig
│ └── Pods-SDCycleScrollView.release.xcconfig
│ └── SDWebImage
│ ├── SDWebImage-dummy.m
│ ├── SDWebImage-prefix.pch
│ └── SDWebImage.xcconfig
├── README.md
├── SDCycleScrollView.podspec
├── SDCycleScrollView.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── SDCycleScrollView.xccheckout
│ └── xcuserdata
│ │ ├── aier.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── WorkspaceSettings.xcsettings
│ │ ├── gaoshaodong.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ │ ├── gsd.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ │ └── sky.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ ├── aier.xcuserdatad
│ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ │ ├── SDCycleScrollView.xcscheme
│ │ └── xcschememanagement.plist
│ ├── gaoshaodong.xcuserdatad
│ └── xcschemes
│ │ ├── SDCycleScrollView.xcscheme
│ │ └── xcschememanagement.plist
│ ├── gsd.xcuserdatad
│ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ │ ├── SDCycleScrollView.xcscheme
│ │ └── xcschememanagement.plist
│ └── sky.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ ├── SDCycleScrollView.xcscheme
│ └── xcschememanagement.plist
├── SDCycleScrollView.xcworkspace
├── contents.xcworkspacedata
├── xcshareddata
│ └── IDEWorkspaceChecks.plist
└── xcuserdata
│ └── gaoshaodong.xcuserdatad
│ ├── UserInterfaceState.xcuserstate
│ └── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
├── SDCycleScrollView
├── 005.jpg
├── AppDelegate.h
├── AppDelegate.m
├── Base.lproj
│ └── LaunchScreen.xib
├── CustomCollectionViewCell.h
├── CustomCollectionViewCell.m
├── DemoVC
│ └── xib的demo
│ │ ├── DemoVCWithXib.h
│ │ ├── DemoVCWithXib.m
│ │ └── DemoVCWithXib.xib
├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── LaunchImage.launchimage
│ │ └── Contents.json
│ ├── h6.imageset
│ │ ├── Contents.json
│ │ └── h6@2x.png
│ └── h7.imageset
│ │ ├── Contents.json
│ │ └── h7.png
├── Info.plist
├── Lib
│ └── SDCycleScrollView
│ │ ├── PageControl
│ │ ├── TAAbstractDotView.h
│ │ ├── TAAbstractDotView.m
│ │ ├── TAAnimatedDotView.h
│ │ ├── TAAnimatedDotView.m
│ │ ├── TADotView.h
│ │ ├── TADotView.m
│ │ ├── TAPageControl.h
│ │ └── TAPageControl.m
│ │ ├── SDCollectionViewCell.h
│ │ ├── SDCollectionViewCell.m
│ │ ├── SDCycleScrollView.h
│ │ ├── SDCycleScrollView.m
│ │ ├── UIView+SDExtension.h
│ │ └── UIView+SDExtension.m
├── ViewController.h
├── ViewController.m
├── h1.jpg
├── h2.jpg
├── h3.jpg
├── h4.jpg
├── main.m
├── pageControlCurrentDot@2x.png
├── pageControlCurrentDot@3x.png
├── pageControlDot@2x.png
├── pageControlDot@3x.png
└── placeholder@2x.png
├── SDCycleScrollViewTests
├── Info.plist
└── SDCycleScrollViewTests.m
└── qrcode_for_gh_a69e5c4e13c4_430.jpg
/.swift-version:
--------------------------------------------------------------------------------
1 | 3.0
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 GSD_iOS
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 |
23 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '8.0'
2 | target 'SDCycleScrollView'
3 |
4 | #use_frameworks!
5 |
6 | pod 'SDWebImage', '>= 5.0.0'
7 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - SDWebImage (5.0.0):
3 | - SDWebImage/Core (= 5.0.0)
4 | - SDWebImage/Core (5.0.0)
5 |
6 | DEPENDENCIES:
7 | - SDWebImage (>= 5.0.0)
8 |
9 | SPEC REPOS:
10 | https://github.com/cocoapods/specs.git:
11 | - SDWebImage
12 |
13 | SPEC CHECKSUMS:
14 | SDWebImage: 5de80a0302de9e377e62f47d2fa1304efff0e55f
15 |
16 | PODFILE CHECKSUM: 36b38d6f3870a9dd8180509afda3b51d62283956
17 |
18 | COCOAPODS: 1.5.3
19 |
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/NSBezierPath+RoundedCorners.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/Private/NSBezierPath+RoundedCorners.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/NSButton+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSButton+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSData+ImageContentType.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/NSImage+Compatibility.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSImage+Compatibility.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDAnimatedImage.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDAnimatedImage.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDAnimatedImageRep.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDAnimatedImageRep.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDAnimatedImageView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDAnimatedImageView+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDAnimatedImageView.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDAnimatedImageView.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDAsyncBlockOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDDiskCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDDiskCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageAPNGCoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageAPNGCoder.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageAPNGCoderInternal.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/Private/SDImageAPNGCoderInternal.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageAssetManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/Private/SDImageAssetManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageCacheConfig.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCacheConfig.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageCacheDefine.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCacheDefine.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageCachesManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCachesManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageCachesManagerOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/Private/SDImageCachesManagerOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageCoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCoder.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageCoderHelper.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCoderHelper.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageCodersManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCodersManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageFrame.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageFrame.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageGIFCoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageGIFCoder.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageGIFCoderInternal.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/Private/SDImageGIFCoderInternal.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageGraphics.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageGraphics.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageIOCoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageIOCoder.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageLoader.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageLoader.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageLoadersManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageLoadersManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDImageTransformer.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageTransformer.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDInternalMacros.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/Private/SDInternalMacros.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDMemoryCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDMemoryCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWeakProxy.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/Private/SDWeakProxy.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImage.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/WebImage/SDWebImage.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageCacheKeyFilter.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageCacheKeyFilter.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageCacheSerializer.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageCacheSerializer.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageCompat.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageDefine.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDefine.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloader.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderConfig.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderConfig.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderRequestModifier.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderRequestModifier.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageError.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageError.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageIndicator.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageIndicator.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDWebImageTransition.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageTransition.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/SDmetamacros.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/Private/SDmetamacros.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIButton+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIColor+HexString.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/Private/UIColor+HexString.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImage+ForceDecode.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+ForceDecode.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+GIF.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImage+MemoryCacheCost.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+MemoryCacheCost.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImage+Metadata.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+Metadata.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImage+Transform.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+Transform.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIView+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/NSButton+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSButton+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSData+ImageContentType.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/NSImage+Compatibility.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/NSImage+Compatibility.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDAnimatedImage.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDAnimatedImage.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDAnimatedImageRep.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDAnimatedImageRep.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDAnimatedImageView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDAnimatedImageView+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDAnimatedImageView.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDAnimatedImageView.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDDiskCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDDiskCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageAPNGCoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageAPNGCoder.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageCacheConfig.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCacheConfig.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageCacheDefine.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCacheDefine.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageCachesManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCachesManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageCoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCoder.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageCoderHelper.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCoderHelper.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageCodersManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageCodersManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageFrame.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageFrame.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageGIFCoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageGIFCoder.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageGraphics.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageGraphics.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageIOCoder.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageIOCoder.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageLoader.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageLoader.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageLoadersManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageLoadersManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDImageTransformer.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDImageTransformer.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDMemoryCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDMemoryCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImage.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/WebImage/SDWebImage.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageCacheKeyFilter.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageCacheKeyFilter.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageCacheSerializer.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageCacheSerializer.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageCompat.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageDefine.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDefine.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloader.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderConfig.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderConfig.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderRequestModifier.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderRequestModifier.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageError.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageError.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageIndicator.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageIndicator.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageManager.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageManager.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageOperation.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/SDWebImageTransition.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/SDWebImageTransition.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIButton+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImage+ForceDecode.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+ForceDecode.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+GIF.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImage+MemoryCacheCost.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+MemoryCacheCost.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImage+Metadata.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+Metadata.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImage+Transform.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImage+Transform.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIImageView+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIView+WebCache.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIView+WebCache.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h:
--------------------------------------------------------------------------------
1 | ../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h
--------------------------------------------------------------------------------
/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - SDWebImage (5.0.0):
3 | - SDWebImage/Core (= 5.0.0)
4 | - SDWebImage/Core (5.0.0)
5 |
6 | DEPENDENCIES:
7 | - SDWebImage (>= 5.0.0)
8 |
9 | SPEC REPOS:
10 | https://github.com/cocoapods/specs.git:
11 | - SDWebImage
12 |
13 | SPEC CHECKSUMS:
14 | SDWebImage: 5de80a0302de9e377e62f47d2fa1304efff0e55f
15 |
16 | PODFILE CHECKSUM: 36b38d6f3870a9dd8180509afda3b51d62283956
17 |
18 | COCOAPODS: 1.5.3
19 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/gaoshaodong.xcuserdatad/xcschemes/Pods-SDCycleScrollView.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/gaoshaodong.xcuserdatad/xcschemes/SDWebImage.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/gaoshaodong.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Pods-SDCycleScrollView.xcscheme
8 |
9 | isShown
10 |
11 |
12 | SDWebImage.xcscheme
13 |
14 | isShown
15 |
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2018 Olivier Poitrey rs@dailymotion.com
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
21 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | /*
2 | * 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 | /**
14 | You can use switch case like normal enum. It's also recommended to add a default case. You should not assume anything about the raw value.
15 | For custom coder plugin, it can also extern the enum for supported format. See `SDImageCoder` for more detailed information.
16 | */
17 | typedef NSInteger SDImageFormat NS_TYPED_EXTENSIBLE_ENUM;
18 | static const SDImageFormat SDImageFormatUndefined = -1;
19 | static const SDImageFormat SDImageFormatJPEG = 0;
20 | static const SDImageFormat SDImageFormatPNG = 1;
21 | static const SDImageFormat SDImageFormatGIF = 2;
22 | static const SDImageFormat SDImageFormatTIFF = 3;
23 | static const SDImageFormat SDImageFormatWebP = 4;
24 | static const SDImageFormat SDImageFormatHEIC = 5;
25 | static const SDImageFormat SDImageFormatHEIF = 6;
26 |
27 | @interface NSData (ImageContentType)
28 |
29 | /**
30 | * Return image format
31 | *
32 | * @param data the input image data
33 | *
34 | * @return the image format as `SDImageFormat` (enum)
35 | */
36 | + (SDImageFormat)sd_imageFormatForImageData:(nullable NSData *)data;
37 |
38 | /**
39 | * Convert SDImageFormat to UTType
40 | *
41 | * @param format Format as SDImageFormat
42 | * @return The UTType as CFStringRef
43 | */
44 | + (nonnull CFStringRef)sd_UTTypeFromImageFormat:(SDImageFormat)format CF_RETURNS_NOT_RETAINED NS_SWIFT_NAME(sd_UTType(from:));
45 |
46 | /**
47 | * Convert UTTyppe to SDImageFormat
48 | *
49 | * @param uttype The UTType as CFStringRef
50 | * @return The Format as SDImageFormat
51 | */
52 | + (SDImageFormat)sd_imageFormatFromUTType:(nonnull CFStringRef)uttype;
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/NSImage+Compatibility.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 | // This category is provided to easily write cross-platform(AppKit/UIKit) code. For common usage, see `UIImage+Metadata.h`.
12 |
13 | #if SD_MAC
14 |
15 | @interface NSImage (Compatibility)
16 |
17 | /**
18 | The underlying Core Graphics image object. This will actually use `CGImageForProposedRect` with the image size.
19 | */
20 | @property (nonatomic, readonly, nullable) CGImageRef CGImage;
21 | /**
22 | The scale factor of the image. This wil actually use `bestRepresentationForRect` with image size and pixel size to calculate the scale factor. If failed, use the default value 1.0. Should be greater than or equal to 1.0.
23 | */
24 | @property (nonatomic, readonly) CGFloat scale;
25 |
26 | // These are convenience methods to make AppKit's `NSImage` match UIKit's `UIImage` behavior. The scale factor should be greater than or equal to 1.0.
27 |
28 | /**
29 | Returns an image object with the scale factor and orientation. The representation is created from the Core Graphics image object.
30 | @note The difference between this and `initWithCGImage:size` is that `initWithCGImage:size` will actually create a `NSCGImageSnapshotRep` representation and always use `backingScaleFactor` as scale factor. So we should avoid it and use `NSBitmapImageRep` with `initWithCGImage:` instead.
31 | @note The difference between this and UIKit's `UIImage` equivalent method is the way to process orientation. If the provided image orientation is not equal to Up orientation, this method will firstly rotate the CGImage to the correct orientation to work compatible with `NSImageView`. However, UIKit will not actually rotate CGImage and just store it as `imageOrientation` property.
32 |
33 | @param cgImage A Core Graphics image object
34 | @param scale The image scale factor
35 | @param orientation The orientation of the image data
36 | @return The image object
37 | */
38 | - (nonnull instancetype)initWithCGImage:(nonnull CGImageRef)cgImage scale:(CGFloat)scale orientation:(CGImagePropertyOrientation)orientation;
39 |
40 | /**
41 | Returns an image object with the scale factor. The representation is created from the image data.
42 | @note The difference between these this and `initWithData:` is that `initWithData:` will always use `backingScaleFactor` as scale factor.
43 |
44 | @param data The image data
45 | @param scale The image scale factor
46 | @return The image object
47 | */
48 | - (nullable instancetype)initWithData:(nonnull NSData *)data scale:(CGFloat)scale;
49 |
50 | @end
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/NSImage+Compatibility.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+Compatibility.h"
10 |
11 | #if SD_MAC
12 |
13 | #import "SDImageCoderHelper.h"
14 |
15 | @implementation NSImage (Compatibility)
16 |
17 | - (CGImageRef)CGImage {
18 | NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height);
19 | CGImageRef cgImage = [self CGImageForProposedRect:&imageRect context:nil hints:nil];
20 | return cgImage;
21 | }
22 |
23 | - (CGFloat)scale {
24 | CGFloat scale = 1;
25 | NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height);
26 | NSImageRep *imageRep = [self bestRepresentationForRect:imageRect context:nil hints:nil];
27 | CGFloat width = imageRep.size.width;
28 | CGFloat height = imageRep.size.height;
29 | NSUInteger pixelWidth = imageRep.pixelsWide;
30 | NSUInteger pixelHeight = imageRep.pixelsHigh;
31 | if (width > 0 && height > 0) {
32 | CGFloat widthScale = pixelWidth / width;
33 | CGFloat heightScale = pixelHeight / height;
34 | if (widthScale == heightScale && widthScale >= 1) {
35 | // Protect because there may be `NSImageRepMatchesDevice` (0)
36 | scale = widthScale;
37 | }
38 | }
39 |
40 | return scale;
41 | }
42 |
43 | - (instancetype)initWithCGImage:(CGImageRef)cgImage scale:(CGFloat)scale orientation:(CGImagePropertyOrientation)orientation {
44 | NSBitmapImageRep *imageRep;
45 | if (orientation != kCGImagePropertyOrientationUp) {
46 | // AppKit design is different from UIKit. Where CGImage based image rep does not respect to any orientation. Only data based image rep which contains the EXIF metadata can automatically detect orientation.
47 | // This should be nonnull, until the memory is exhausted cause `CGBitmapContextCreate` failed.
48 | CGImageRef rotatedCGImage = [SDImageCoderHelper CGImageCreateDecoded:cgImage orientation:orientation];
49 | imageRep = [[NSBitmapImageRep alloc] initWithCGImage:rotatedCGImage];
50 | CGImageRelease(rotatedCGImage);
51 | } else {
52 | imageRep = [[NSBitmapImageRep alloc] initWithCGImage:cgImage];
53 | }
54 | if (scale < 1) {
55 | scale = 1;
56 | }
57 | CGFloat pixelWidth = imageRep.pixelsWide;
58 | CGFloat pixelHeight = imageRep.pixelsHigh;
59 | NSSize size = NSMakeSize(pixelWidth / scale, pixelHeight / scale);
60 | self = [self initWithSize:size];
61 | if (self) {
62 | imageRep.size = size;
63 | [self addRepresentation:imageRep];
64 | }
65 | return self;
66 | }
67 |
68 | - (instancetype)initWithData:(NSData *)data scale:(CGFloat)scale {
69 | NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithData:data];
70 | if (!imageRep) {
71 | return nil;
72 | }
73 | if (scale < 1) {
74 | scale = 1;
75 | }
76 | CGFloat pixelWidth = imageRep.pixelsWide;
77 | CGFloat pixelHeight = imageRep.pixelsHigh;
78 | NSSize size = NSMakeSize(pixelWidth / scale, pixelHeight / scale);
79 | self = [self initWithSize:size];
80 | if (self) {
81 | imageRep.size = size;
82 | [self addRepresentation:imageRep];
83 | }
84 | return self;
85 | }
86 |
87 | @end
88 |
89 | #endif
90 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/NSBezierPath+RoundedCorners.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 "UIImage+Transform.h"
14 |
15 | @interface NSBezierPath (RoundedCorners)
16 |
17 | /**
18 | Convenience way to create a bezier path with the specify rounding corners on macOS. Same as the one on `UIBezierPath`.
19 | */
20 | + (nonnull instancetype)sd_bezierPathWithRoundedRect:(NSRect)rect byRoundingCorners:(SDRectCorner)corners cornerRadius:(CGFloat)cornerRadius;
21 |
22 | @end
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/NSBezierPath+RoundedCorners.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 "NSBezierPath+RoundedCorners.h"
10 |
11 | #if SD_MAC
12 |
13 | @implementation NSBezierPath (RoundedCorners)
14 |
15 | + (instancetype)sd_bezierPathWithRoundedRect:(NSRect)rect byRoundingCorners:(SDRectCorner)corners cornerRadius:(CGFloat)cornerRadius {
16 | NSBezierPath *path = [NSBezierPath bezierPath];
17 |
18 | CGFloat maxCorner = MIN(NSWidth(rect), NSHeight(rect)) / 2;
19 |
20 | CGFloat topLeftRadius = MIN(maxCorner, (corners & SDRectCornerTopLeft) ? cornerRadius : 0);
21 | CGFloat topRightRadius = MIN(maxCorner, (corners & SDRectCornerTopRight) ? cornerRadius : 0);
22 | CGFloat bottomLeftRadius = MIN(maxCorner, (corners & SDRectCornerBottomLeft) ? cornerRadius : 0);
23 | CGFloat bottomRightRadius = MIN(maxCorner, (corners & SDRectCornerBottomRight) ? cornerRadius : 0);
24 |
25 | NSPoint topLeft = NSMakePoint(NSMinX(rect), NSMaxY(rect));
26 | NSPoint topRight = NSMakePoint(NSMaxX(rect), NSMaxY(rect));
27 | NSPoint bottomLeft = NSMakePoint(NSMinX(rect), NSMinY(rect));
28 | NSPoint bottomRight = NSMakePoint(NSMaxX(rect), NSMinY(rect));
29 |
30 | [path moveToPoint:NSMakePoint(NSMidX(rect), NSMaxY(rect))];
31 | [path appendBezierPathWithArcFromPoint:topLeft toPoint:bottomLeft radius:topLeftRadius];
32 | [path appendBezierPathWithArcFromPoint:bottomLeft toPoint:bottomRight radius:bottomLeftRadius];
33 | [path appendBezierPathWithArcFromPoint:bottomRight toPoint:topRight radius:bottomRightRadius];
34 | [path appendBezierPathWithArcFromPoint:topRight toPoint:topLeft radius:topRightRadius];
35 | [path closePath];
36 |
37 | return path;
38 | }
39 |
40 | @end
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.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 | @class SDAsyncBlockOperation;
12 | typedef void (^SDAsyncBlock)(SDAsyncBlockOperation * __nonnull asyncOperation);
13 |
14 | @interface SDAsyncBlockOperation : NSOperation
15 |
16 | - (nonnull instancetype)initWithBlock:(nonnull SDAsyncBlock)block;
17 | + (nonnull instancetype)blockOperationWithBlock:(nonnull SDAsyncBlock)block;
18 | - (void)complete;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.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 "SDAsyncBlockOperation.h"
10 |
11 | @interface SDAsyncBlockOperation ()
12 |
13 | @property (assign, nonatomic, getter = isExecuting) BOOL executing;
14 | @property (assign, nonatomic, getter = isFinished) BOOL finished;
15 | @property (nonatomic, copy, nonnull) SDAsyncBlock executionBlock;
16 |
17 | @end
18 |
19 | @implementation SDAsyncBlockOperation
20 |
21 | @synthesize executing = _executing;
22 | @synthesize finished = _finished;
23 |
24 | - (nonnull instancetype)initWithBlock:(nonnull SDAsyncBlock)block {
25 | self = [super init];
26 | if (self) {
27 | self.executionBlock = block;
28 | }
29 | return self;
30 | }
31 |
32 | + (nonnull instancetype)blockOperationWithBlock:(nonnull SDAsyncBlock)block {
33 | SDAsyncBlockOperation *operation = [[SDAsyncBlockOperation alloc] initWithBlock:block];
34 | return operation;
35 | }
36 |
37 | - (void)start {
38 | if (self.isCancelled) {
39 | return;
40 | }
41 |
42 | [self willChangeValueForKey:@"isExecuting"];
43 | self.executing = YES;
44 | [self didChangeValueForKey:@"isExecuting"];
45 |
46 | if (self.executionBlock) {
47 | self.executionBlock(self);
48 | } else {
49 | [self complete];
50 | }
51 | }
52 |
53 | - (void)cancel {
54 | [super cancel];
55 | [self complete];
56 | }
57 |
58 | - (void)complete {
59 | [self willChangeValueForKey:@"isExecuting"];
60 | [self willChangeValueForKey:@"isFinished"];
61 | self.executing = NO;
62 | self.finished = YES;
63 | [self didChangeValueForKey:@"isExecuting"];
64 | [self didChangeValueForKey:@"isFinished"];
65 | }
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDImageAPNGCoderInternal.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 "SDImageAPNGCoder.h"
11 |
12 | @interface SDImageAPNGCoder ()
13 |
14 | - (float)sd_frameDurationAtIndex:(NSUInteger)index source:(nonnull CGImageSourceRef)source;
15 | - (NSUInteger)sd_imageLoopCountWithSource:(nonnull CGImageSourceRef)source;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDImageAssetManager.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 | // Apple parse the Asset Catalog compiled file(`Assets.car`) by CoreUI.framework, however it's a private framework and there are no other ways to directly get the data. So we just process the normal bundle files :)
13 |
14 | @interface SDImageAssetManager : NSObject
15 |
16 | @property (nonatomic, strong, nonnull) NSMapTable *imageTable;
17 |
18 | + (nonnull instancetype)sharedAssetManager;
19 | - (nullable NSString *)getPathForName:(nonnull NSString *)name bundle:(nonnull NSBundle *)bundle preferredScale:(nonnull CGFloat *)scale;
20 | - (nullable UIImage *)imageForName:(nonnull NSString *)name;
21 | - (void)storeImage:(nonnull UIImage *)image forName:(nonnull NSString *)name;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDImageCachesManagerOperation.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 | // This is used for operation management, but not for operation queue execute
13 | @interface SDImageCachesManagerOperation : NSOperation
14 |
15 | @property (nonatomic, assign, readonly) NSUInteger pendingCount;
16 |
17 | - (void)beginWithTotalCount:(NSUInteger)totalCount;
18 | - (void)completeOne;
19 | - (void)done;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDImageCachesManagerOperation.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 "SDImageCachesManagerOperation.h"
10 |
11 | @implementation SDImageCachesManagerOperation
12 | {
13 | dispatch_semaphore_t _pendingCountLock;
14 | }
15 |
16 | @synthesize executing = _executing;
17 | @synthesize finished = _finished;
18 | @synthesize cancelled = _cancelled;
19 | @synthesize pendingCount = _pendingCount;
20 |
21 | - (instancetype)init {
22 | if (self = [super init]) {
23 | _pendingCountLock = dispatch_semaphore_create(1);
24 | _pendingCount = 0;
25 | }
26 | return self;
27 | }
28 |
29 | - (void)beginWithTotalCount:(NSUInteger)totalCount {
30 | self.executing = YES;
31 | self.finished = NO;
32 | _pendingCount = totalCount;
33 | }
34 |
35 | - (NSUInteger)pendingCount {
36 | SD_LOCK(_pendingCountLock);
37 | NSUInteger pendingCount = _pendingCount;
38 | SD_UNLOCK(_pendingCountLock);
39 | return pendingCount;
40 | }
41 |
42 | - (void)completeOne {
43 | SD_LOCK(_pendingCountLock);
44 | _pendingCount = _pendingCount > 0 ? _pendingCount - 1 : 0;
45 | SD_UNLOCK(_pendingCountLock);
46 | }
47 |
48 | - (void)cancel {
49 | self.cancelled = YES;
50 | [self reset];
51 | }
52 |
53 | - (void)done {
54 | self.finished = YES;
55 | self.executing = NO;
56 | [self reset];
57 | }
58 |
59 | - (void)reset {
60 | SD_LOCK(_pendingCountLock);
61 | _pendingCount = 0;
62 | SD_UNLOCK(_pendingCountLock);
63 | }
64 |
65 | - (void)setFinished:(BOOL)finished {
66 | [self willChangeValueForKey:@"isFinished"];
67 | _finished = finished;
68 | [self didChangeValueForKey:@"isFinished"];
69 | }
70 |
71 | - (void)setExecuting:(BOOL)executing {
72 | [self willChangeValueForKey:@"isExecuting"];
73 | _executing = executing;
74 | [self didChangeValueForKey:@"isExecuting"];
75 | }
76 |
77 | - (void)setCancelled:(BOOL)cancelled {
78 | [self willChangeValueForKey:@"isCancelled"];
79 | _cancelled = cancelled;
80 | [self didChangeValueForKey:@"isCancelled"];
81 | }
82 |
83 | @end
84 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDImageGIFCoderInternal.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 "SDImageGIFCoder.h"
11 |
12 | @interface SDImageGIFCoder ()
13 |
14 | - (float)sd_frameDurationAtIndex:(NSUInteger)index source:(nonnull CGImageSourceRef)source;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.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 "SDmetamacros.h"
11 |
12 | #ifndef SD_LOCK
13 | #define SD_LOCK(lock) dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER);
14 | #endif
15 |
16 | #ifndef SD_UNLOCK
17 | #define SD_UNLOCK(lock) dispatch_semaphore_signal(lock);
18 | #endif
19 |
20 | #ifndef weakify
21 | #define weakify(...) \
22 | sd_keywordify \
23 | metamacro_foreach_cxt(sd_weakify_,, __weak, __VA_ARGS__)
24 | #endif
25 |
26 | #ifndef strongify
27 | #define strongify(...) \
28 | sd_keywordify \
29 | _Pragma("clang diagnostic push") \
30 | _Pragma("clang diagnostic ignored \"-Wshadow\"") \
31 | metamacro_foreach(sd_strongify_,, __VA_ARGS__) \
32 | _Pragma("clang diagnostic pop")
33 | #endif
34 |
35 | #define sd_weakify_(INDEX, CONTEXT, VAR) \
36 | CONTEXT __typeof__(VAR) metamacro_concat(VAR, _weak_) = (VAR);
37 |
38 | #define sd_strongify_(INDEX, VAR) \
39 | __strong __typeof__(VAR) VAR = metamacro_concat(VAR, _weak_);
40 |
41 | #if DEBUG
42 | #define sd_keywordify autoreleasepool {}
43 | #else
44 | #define sd_keywordify try {} @catch (...) {}
45 | #endif
46 |
47 | #ifndef onExit
48 | #define onExit \
49 | sd_keywordify \
50 | __strong sd_cleanupBlock_t metamacro_concat(sd_exitBlock_, __LINE__) __attribute__((cleanup(sd_executeCleanupBlock), unused)) = ^
51 | #endif
52 |
53 | typedef void (^sd_cleanupBlock_t)(void);
54 |
55 | #if defined(__cplusplus)
56 | extern "C" {
57 | #endif
58 | void sd_executeCleanupBlock (__strong sd_cleanupBlock_t *block);
59 | #if defined(__cplusplus)
60 | }
61 | #endif
62 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.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 "SDInternalMacros.h"
10 |
11 | void sd_executeCleanupBlock (__strong sd_cleanupBlock_t *block) {
12 | (*block)();
13 | }
14 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDWeakProxy.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 SDWeakProxy : NSProxy
13 |
14 | @property (nonatomic, weak, readonly, nullable) id target;
15 |
16 | - (nonnull instancetype)initWithTarget:(nonnull id)target;
17 | + (nonnull instancetype)proxyWithTarget:(nonnull id)target;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/SDWeakProxy.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 "SDWeakProxy.h"
10 |
11 | @implementation SDWeakProxy
12 |
13 | - (instancetype)initWithTarget:(id)target {
14 | _target = target;
15 | return self;
16 | }
17 |
18 | + (instancetype)proxyWithTarget:(id)target {
19 | return [[SDWeakProxy alloc] initWithTarget:target];
20 | }
21 |
22 | - (id)forwardingTargetForSelector:(SEL)selector {
23 | return _target;
24 | }
25 |
26 | - (void)forwardInvocation:(NSInvocation *)invocation {
27 | void *null = NULL;
28 | [invocation setReturnValue:&null];
29 | }
30 |
31 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector {
32 | return [NSObject instanceMethodSignatureForSelector:@selector(init)];
33 | }
34 |
35 | - (BOOL)respondsToSelector:(SEL)aSelector {
36 | return [_target respondsToSelector:aSelector];
37 | }
38 |
39 | - (BOOL)isEqual:(id)object {
40 | return [_target isEqual:object];
41 | }
42 |
43 | - (NSUInteger)hash {
44 | return [_target hash];
45 | }
46 |
47 | - (Class)superclass {
48 | return [_target superclass];
49 | }
50 |
51 | - (Class)class {
52 | return [_target class];
53 | }
54 |
55 | - (BOOL)isKindOfClass:(Class)aClass {
56 | return [_target isKindOfClass:aClass];
57 | }
58 |
59 | - (BOOL)isMemberOfClass:(Class)aClass {
60 | return [_target isMemberOfClass:aClass];
61 | }
62 |
63 | - (BOOL)conformsToProtocol:(Protocol *)aProtocol {
64 | return [_target conformsToProtocol:aProtocol];
65 | }
66 |
67 | - (BOOL)isProxy {
68 | return YES;
69 | }
70 |
71 | - (NSString *)description {
72 | return [_target description];
73 | }
74 |
75 | - (NSString *)debugDescription {
76 | return [_target debugDescription];
77 | }
78 |
79 | @end
80 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/UIColor+HexString.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 | @interface UIColor (HexString)
12 |
13 | /**
14 | Convenience way to get hex string from color. The output should always be 32-bit RGBA hex string like `#00000000`.
15 | */
16 | @property (nonatomic, copy, readonly, nonnull) NSString *sd_hexString;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/Private/UIColor+HexString.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 "UIColor+HexString.h"
10 |
11 | @implementation UIColor (HexString)
12 |
13 | - (NSString *)sd_hexString {
14 | CGFloat red, green, blue, alpha;
15 | #if SD_UIKIT
16 | if (![self getRed:&red green:&green blue:&blue alpha:&alpha]) {
17 | [self getWhite:&red alpha:&alpha];
18 | green = red;
19 | blue = red;
20 | }
21 | #else
22 | @try {
23 | [self getRed:&red green:&green blue:&blue alpha:&alpha];
24 | }
25 | @catch (NSException *exception) {
26 | [self getWhite:&red alpha:&alpha];
27 | green = red;
28 | blue = red;
29 | }
30 | #endif
31 |
32 | red = roundf(red * 255.f);
33 | green = roundf(green * 255.f);
34 | blue = roundf(blue * 255.f);
35 | alpha = roundf(alpha * 255.f);
36 |
37 | uint hex = ((uint)alpha << 24) | ((uint)red << 16) | ((uint)green << 8) | ((uint)blue);
38 |
39 | return [NSString stringWithFormat:@"#%08x", hex];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDAnimatedImageRep.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 | // A subclass of `NSBitmapImageRep` to fix that GIF loop count issue because `NSBitmapImageRep` will reset `NSImageCurrentFrameDuration` by using `kCGImagePropertyGIFDelayTime` but not `kCGImagePropertyGIFUnclampedDelayTime`.
14 | // Built in GIF coder use this instead of `NSBitmapImageRep` for better GIF rendering. If you do not want this, only enable `SDImageIOCoder`, which just call `NSImage` API and actually use `NSBitmapImageRep` for GIF image.
15 | // This also support APNG format using `SDImageAPNGCoder`. Which provide full alpha-channel support and the correct duration match the `kCGImagePropertyAPNGUnclampedDelayTime`.
16 |
17 | @interface SDAnimatedImageRep : NSBitmapImageRep
18 |
19 | @end
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDAnimatedImageView.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 "SDAnimatedImage.h"
14 |
15 | /**
16 | A drop-in replacement for UIImageView/NSImageView, you can use this for animated image rendering.
17 | Call `setImage:` with `UIImage(NSImage)` which conform to `SDAnimatedImage` protocol will start animated image rendering. Call with normal UIImage(NSImage) will back to normal UIImageView(NSImageView) rendering
18 | For UIKit: use `-startAnimating`, `-stopAnimating` to control animating. `isAnimating` to check animation state.
19 | For AppKit: use `-setAnimates:` to control animating, `animates` to check animation state. This view is layer-backed.
20 | */
21 | @interface SDAnimatedImageView : UIImageView
22 |
23 | /**
24 | Current display frame image.
25 | */
26 | @property (nonatomic, strong, readonly, nullable) UIImage *currentFrame;
27 | /**
28 | Current frame index, zero based. This value is KVO Compliance.
29 | */
30 | @property (nonatomic, assign, readonly) NSUInteger currentFrameIndex;
31 | /**
32 | Current loop count since its latest animating. This value is KVO Compliance.
33 | */
34 | @property (nonatomic, assign, readonly) NSUInteger currentLoopCount;
35 | /**
36 | YES to choose `animationRepeatCount` property for animation loop count. No to use animated image's `animatedImageLoopCount` instead.
37 | Default is NO.
38 | */
39 | @property (nonatomic, assign) BOOL shouldCustomLoopCount;
40 | /**
41 | Total loop count for animated image rendering. Default is animated image's loop count.
42 | If you need to set custom loop count, set `shouldCustomLoopCount` to YES and change this value.
43 | This class override UIImageView's `animationRepeatCount` property on iOS, use this property as well.
44 | */
45 | @property (nonatomic, assign) NSInteger animationRepeatCount;
46 | /**
47 | Provide a max buffer size by bytes. This is used to adjust frame buffer count and can be useful when the decoding cost is expensive (such as Animated WebP software decoding). Default is 0.
48 | `0` means automatically adjust by calculating current memory usage.
49 | `1` means without any buffer cache, each of frames will be decoded and then be freed after rendering. (Lowest Memory and Highest CPU)
50 | `NSUIntegerMax` means cache all the buffer. (Lowest CPU and Highest Memory)
51 | */
52 | @property (nonatomic, assign) NSUInteger maxBufferSize;
53 | /**
54 | Whehter or not to enable incremental image load for animated image. This is for the animated image which `sd_isIncremental` is YES (See `UIImage+Metadata.h`). If enable, animated image rendering will stop at the last frame available currently, and continue when another `setImage:` trigger, where the new animated image's `animatedImageData` should be updated from the previous one. If the `sd_isIncremental` is NO. The incremental image load stop.
55 | @note If you are confused about this description, open Chrome browser to view some large GIF images with low network speed to see the animation behavior.
56 | @note The best practice to use incremental load is using `initWithAnimatedCoder:scale:` in `SDAnimatedImage` with animated coder which conform to `SDProgressiveImageCoder` as well. Then call incremental update and incremental decode method to produce the image.
57 | Default is YES. Set to NO to only render the static poster for incremental animated image.
58 | */
59 | @property (nonatomic, assign) BOOL shouldIncrementalLoad;
60 |
61 | #if SD_UIKIT
62 | /**
63 | You can specify a runloop mode to let it rendering.
64 | Default is NSRunLoopCommonModes on multi-core iOS device, NSDefaultRunLoopMode on single-core iOS device
65 | */
66 | @property (nonatomic, copy, nonnull) NSRunLoopMode runLoopMode;
67 | #endif
68 | @end
69 |
70 | #endif
71 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageAPNGCoder.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 "SDImageCoder.h"
11 |
12 | /**
13 | Built in coder using ImageIO that supports APNG encoding/decoding
14 | */
15 | @interface SDImageAPNGCoder : NSObject
16 |
17 | @property (nonatomic, class, readonly, nonnull) SDImageAPNGCoder *sharedCoder;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/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 | #import "SDMemoryCache.h"
11 | #import "SDDiskCache.h"
12 |
13 | static SDImageCacheConfig *_defaultCacheConfig;
14 | static const NSInteger kDefaultCacheMaxDiskAge = 60 * 60 * 24 * 7; // 1 week
15 |
16 | @implementation SDImageCacheConfig
17 |
18 | + (SDImageCacheConfig *)defaultCacheConfig {
19 | static dispatch_once_t onceToken;
20 | dispatch_once(&onceToken, ^{
21 | _defaultCacheConfig = [SDImageCacheConfig new];
22 | });
23 | return _defaultCacheConfig;
24 | }
25 |
26 | - (instancetype)init {
27 | if (self = [super init]) {
28 | _shouldDisableiCloud = YES;
29 | _shouldCacheImagesInMemory = YES;
30 | _shouldUseWeakMemoryCache = YES;
31 | _shouldRemoveExpiredDataWhenEnterBackground = YES;
32 | _diskCacheReadingOptions = 0;
33 | _diskCacheWritingOptions = NSDataWritingAtomic;
34 | _maxDiskAge = kDefaultCacheMaxDiskAge;
35 | _maxDiskSize = 0;
36 | _diskCacheExpireType = SDImageCacheConfigExpireTypeModificationDate;
37 | _memoryCacheClass = [SDMemoryCache class];
38 | _diskCacheClass = [SDDiskCache class];
39 | }
40 | return self;
41 | }
42 |
43 | - (id)copyWithZone:(NSZone *)zone {
44 | SDImageCacheConfig *config = [[[self class] allocWithZone:zone] init];
45 | config.shouldDisableiCloud = self.shouldDisableiCloud;
46 | config.shouldCacheImagesInMemory = self.shouldCacheImagesInMemory;
47 | config.shouldUseWeakMemoryCache = self.shouldUseWeakMemoryCache;
48 | config.shouldRemoveExpiredDataWhenEnterBackground = self.shouldRemoveExpiredDataWhenEnterBackground;
49 | config.diskCacheReadingOptions = self.diskCacheReadingOptions;
50 | config.diskCacheWritingOptions = self.diskCacheWritingOptions;
51 | config.maxDiskAge = self.maxDiskAge;
52 | config.maxDiskSize = self.maxDiskSize;
53 | config.maxMemoryCost = self.maxMemoryCost;
54 | config.maxMemoryCount = self.maxMemoryCount;
55 | config.diskCacheExpireType = self.diskCacheExpireType;
56 | config.fileManager = self.fileManager; // NSFileManager does not conform to NSCopying, just pass the reference
57 | config.memoryCacheClass = self.memoryCacheClass;
58 | config.diskCacheClass = self.diskCacheClass;
59 |
60 | return config;
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageCacheDefine.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 "SDImageCacheDefine.h"
10 | #import "SDImageCodersManager.h"
11 | #import "SDImageCoderHelper.h"
12 | #import "SDAnimatedImage.h"
13 | #import "UIImage+Metadata.h"
14 |
15 | UIImage * _Nullable SDImageCacheDecodeImageData(NSData * _Nonnull imageData, NSString * _Nonnull cacheKey, SDWebImageOptions options, SDWebImageContext * _Nullable context) {
16 | UIImage *image;
17 | BOOL decodeFirstFrame = options & SDWebImageDecodeFirstFrameOnly;
18 | NSNumber *scaleValue = context[SDWebImageContextImageScaleFactor];
19 | CGFloat scale = scaleValue.doubleValue >= 1 ? scaleValue.doubleValue : SDImageScaleFactorForKey(cacheKey);
20 | if (scale < 1) {
21 | scale = 1;
22 | }
23 | SDImageCoderOptions *coderOptions = @{SDImageCoderDecodeFirstFrameOnly : @(decodeFirstFrame), SDImageCoderDecodeScaleFactor : @(scale)};
24 | if (context) {
25 | SDImageCoderMutableOptions *mutableCoderOptions = [coderOptions mutableCopy];
26 | [mutableCoderOptions setValue:context forKey:SDImageCoderWebImageContext];
27 | coderOptions = [mutableCoderOptions copy];
28 | }
29 |
30 | if (!decodeFirstFrame) {
31 | Class animatedImageClass = context[SDWebImageContextAnimatedImageClass];
32 | // check whether we should use `SDAnimatedImage`
33 | if ([animatedImageClass isSubclassOfClass:[UIImage class]] && [animatedImageClass conformsToProtocol:@protocol(SDAnimatedImage)]) {
34 | image = [[animatedImageClass alloc] initWithData:imageData scale:scale options:coderOptions];
35 | if (options & SDWebImagePreloadAllFrames && [image respondsToSelector:@selector(preloadAllFrames)]) {
36 | [((id)image) preloadAllFrames];
37 | }
38 | }
39 | }
40 | if (!image) {
41 | image = [[SDImageCodersManager sharedManager] decodedImageWithData:imageData options:coderOptions];
42 | }
43 | if (image) {
44 | BOOL shouldDecode = (options & SDWebImageAvoidDecodeImage) == 0;
45 | if ([image conformsToProtocol:@protocol(SDAnimatedImage)]) {
46 | // `SDAnimatedImage` do not decode
47 | shouldDecode = NO;
48 | } else if (image.sd_isAnimated) {
49 | // animated image do not decode
50 | shouldDecode = NO;
51 | }
52 | if (shouldDecode) {
53 | BOOL shouldScaleDown = options & SDWebImageScaleDownLargeImages;
54 | if (shouldScaleDown) {
55 | image = [SDImageCoderHelper decodedAndScaledDownImageWithImage:image limitBytes:0];
56 | } else {
57 | image = [SDImageCoderHelper decodedImageWithImage:image];
58 | }
59 | }
60 | }
61 |
62 | return image;
63 | }
64 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageCachesManager.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 "SDImageCacheDefine.h"
11 |
12 | typedef NS_ENUM(NSUInteger, SDImageCachesManagerOperationPolicy) {
13 | SDImageCachesManagerOperationPolicySerial, // process all caches serially (from the highest priority to the lowest priority cache by order)
14 | SDImageCachesManagerOperationPolicyConcurrent, // process all caches concurrently
15 | SDImageCachesManagerOperationPolicyHighestOnly, // process the highest priority cache only
16 | SDImageCachesManagerOperationPolicyLowestOnly // process the lowest priority cache only
17 | };
18 |
19 | @interface SDImageCachesManager : NSObject
20 |
21 | /**
22 | Returns the global shared caches manager instance. By default we will set [`SDImageCache.sharedImageCache`] into the caches array.
23 | */
24 | @property (nonatomic, class, readonly, nonnull) SDImageCachesManager *sharedManager;
25 |
26 | // These are op policy for cache manager.
27 |
28 | /**
29 | Operation policy for query op.
30 | Defaults to `Serial`, means query all caches serially (one completion called then next begin) until one cache query success (`image` != nil).
31 | */
32 | @property (nonatomic, assign) SDImageCachesManagerOperationPolicy queryOperationPolicy;
33 |
34 | /**
35 | Operation policy for store op.
36 | Defaults to `HighestOnly`, means store to the highest priority cache only.
37 | */
38 | @property (nonatomic, assign) SDImageCachesManagerOperationPolicy storeOperationPolicy;
39 |
40 | /**
41 | Operation policy for remove op.
42 | Defaults to `Concurrent`, means remove all caches concurrently.
43 | */
44 | @property (nonatomic, assign) SDImageCachesManagerOperationPolicy removeOperationPolicy;
45 |
46 | /**
47 | Operation policy for contains op.
48 | Defaults to `Serial`, means check all caches serially (one completion called then next begin) until one cache check success (`containsCacheType` != None).
49 | */
50 | @property (nonatomic, assign) SDImageCachesManagerOperationPolicy containsOperationPolicy;
51 |
52 | /**
53 | Operation policy for clear op.
54 | Defaults to `Concurrent`, means clear all caches concurrently.
55 | */
56 | @property (nonatomic, assign) SDImageCachesManagerOperationPolicy clearOperationPolicy;
57 |
58 | /**
59 | All caches in caches manager. The caches array is a priority queue, which means the later added cache will have the highest priority
60 | */
61 | @property (nonatomic, copy, nullable) NSArray> *caches;
62 |
63 | /**
64 | Add a new cache to the end of caches array. Which has the highest priority.
65 |
66 | @param cache cache
67 | */
68 | - (void)addCache:(nonnull id)cache;
69 |
70 | /**
71 | Remove a cache in the caches array.
72 |
73 | @param cache cache
74 | */
75 | - (void)removeCache:(nonnull id)cache;
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageCoder.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 "SDImageCoder.h"
10 |
11 | SDImageCoderOption const SDImageCoderDecodeFirstFrameOnly = @"decodeFirstFrameOnly";
12 | SDImageCoderOption const SDImageCoderDecodeScaleFactor = @"decodeScaleFactor";
13 |
14 | SDImageCoderOption const SDImageCoderEncodeFirstFrameOnly = @"encodeFirstFrameOnly";
15 | SDImageCoderOption const SDImageCoderEncodeCompressionQuality = @"encodeCompressionQuality";
16 |
17 | SDImageCoderOption const SDImageCoderWebImageContext = @"webImageContext";
18 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageCodersManager.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 "SDImageCoder.h"
11 |
12 | /**
13 | Global object holding the array of coders, so that we avoid passing them from object to object.
14 | Uses a priority queue behind scenes, which means the latest added coders have the highest priority.
15 | This is done so when encoding/decoding something, we go through the list and ask each coder if they can handle the current data.
16 | That way, users can add their custom coders while preserving our existing prebuilt ones
17 |
18 | Note: the `coders` getter will return the coders in their reversed order
19 | Example:
20 | - by default we internally set coders = `IOCoder`, `GIFCoder`, `APNGCoder`
21 | - calling `coders` will return `@[IOCoder, GIFCoder, APNGCoder]`
22 | - call `[addCoder:[MyCrazyCoder new]]`
23 | - calling `coders` now returns `@[IOCoder, GIFCoder, APNGCoder, MyCrazyCoder]`
24 |
25 | Coders
26 | ------
27 | A coder must conform to the `SDImageCoder` protocol or even to `SDProgressiveImageCoder` if it supports progressive decoding
28 | Conformance is important because that way, they will implement `canDecodeFromData` or `canEncodeToFormat`
29 | Those methods are called on each coder in the array (using the priority order) until one of them returns YES.
30 | That means that coder can decode that data / encode to that format
31 | */
32 | @interface SDImageCodersManager : NSObject
33 |
34 | /**
35 | Returns the global shared coders manager instance.
36 | */
37 | @property (nonatomic, class, readonly, nonnull) SDImageCodersManager *sharedManager;
38 |
39 | /**
40 | All coders in coders manager. The coders array is a priority queue, which means the later added coder will have the highest priority
41 | */
42 | @property (nonatomic, copy, nullable) NSArray> *coders;
43 |
44 | /**
45 | Add a new coder to the end of coders array. Which has the highest priority.
46 |
47 | @param coder coder
48 | */
49 | - (void)addCoder:(nonnull id)coder;
50 |
51 | /**
52 | Remove a coder in the coders array.
53 |
54 | @param coder coder
55 | */
56 | - (void)removeCoder:(nonnull id)coder;
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageFrame.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 SDImageFrame : NSObject
13 |
14 | // This class is used for creating animated images via `animatedImageWithFrames` in `SDImageCoderHelper`. Attention if you need to specify animated images loop count, use `sd_imageLoopCount` property in `UIImage+Metadata.h`.
15 |
16 | /**
17 | The image of current frame. You should not set an animated image.
18 | */
19 | @property (nonatomic, strong, readonly, nonnull) UIImage *image;
20 | /**
21 | The duration of current frame to be displayed. The number is seconds but not milliseconds. You should not set this to zero.
22 | */
23 | @property (nonatomic, readonly, assign) NSTimeInterval duration;
24 |
25 | /**
26 | Create a frame instance with specify image and duration
27 |
28 | @param image current frame's image
29 | @param duration current frame's duration
30 | @return frame instance
31 | */
32 | + (instancetype _Nonnull)frameWithImage:(UIImage * _Nonnull)image duration:(NSTimeInterval)duration;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageFrame.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 "SDImageFrame.h"
10 |
11 | @interface SDImageFrame ()
12 |
13 | @property (nonatomic, strong, readwrite, nonnull) UIImage *image;
14 | @property (nonatomic, readwrite, assign) NSTimeInterval duration;
15 |
16 | @end
17 |
18 | @implementation SDImageFrame
19 |
20 | + (instancetype)frameWithImage:(UIImage *)image duration:(NSTimeInterval)duration {
21 | SDImageFrame *frame = [[SDImageFrame alloc] init];
22 | frame.image = image;
23 | frame.duration = duration;
24 |
25 | return frame;
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageGIFCoder.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 "SDImageCoder.h"
11 |
12 | /**
13 | Built in coder using ImageIO that supports animated GIF encoding/decoding
14 | @note `SDImageIOCoder` supports GIF but only as static (will use the 1st frame).
15 | @note Use `SDImageGIFCoder` for fully animated GIFs. For `UIImageView`, it will produce animated `UIImage`(`NSImage` on macOS) for rendering. For `SDAnimatedImageView`, it will use `SDAnimatedImage` for rendering.
16 | @note The recommended approach for animated GIFs is using `SDAnimatedImage` with `SDAnimatedImageView`. It's more performant than `UIImageView` for GIF displaying(especially on memory usage)
17 | */
18 | @interface SDImageGIFCoder : NSObject
19 |
20 | @property (nonatomic, class, readonly, nonnull) SDImageGIFCoder *sharedCoder;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageGraphics.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
11 |
12 | /**
13 | These following graphics context method are provided to easily write cross-platform(AppKit/UIKit) code.
14 | For UIKit, these methods just call the same method in `UIGraphics.h`. See the documentation for usage.
15 | For AppKit, these methods use `NSGraphicsContext` to create image context and match the behavior like UIKit.
16 | */
17 | FOUNDATION_EXPORT CGContextRef __nullable SDGraphicsGetCurrentContext(void) CF_RETURNS_NOT_RETAINED;
18 | FOUNDATION_EXPORT void SDGraphicsBeginImageContext(CGSize size);
19 | FOUNDATION_EXPORT void SDGraphicsBeginImageContextWithOptions(CGSize size, BOOL opaque, CGFloat scale);
20 | FOUNDATION_EXPORT void SDGraphicsEndImageContext(void);
21 | FOUNDATION_EXPORT UIImage * __nullable SDGraphicsGetImageFromCurrentImageContext(void);
22 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageIOCoder.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 "SDImageCoder.h"
11 |
12 | /**
13 | Built in coder that supports PNG, JPEG, TIFF, includes support for progressive decoding.
14 |
15 | GIF
16 | Also supports static GIF (meaning will only handle the 1st frame).
17 | For a full GIF support, we recommend `SDAnimatedImageView` to keep both CPU and memory balanced.
18 |
19 | HEIC
20 | This coder also supports HEIC format because ImageIO supports it natively. But it depends on the system capabilities, so it won't work on all devices, see: https://devstreaming-cdn.apple.com/videos/wwdc/2017/511tj33587vdhds/511/511_working_with_heif_and_hevc.pdf
21 | Decode(Software): !Simulator && (iOS 11 || tvOS 11 || macOS 10.13)
22 | Decode(Hardware): !Simulator && ((iOS 11 && A9Chip) || (macOS 10.13 && 6thGenerationIntelCPU))
23 | Encode(Software): macOS 10.13
24 | Encode(Hardware): !Simulator && ((iOS 11 && A10FusionChip) || (macOS 10.13 && 6thGenerationIntelCPU))
25 | */
26 | @interface SDImageIOCoder : NSObject
27 |
28 | @property (nonatomic, class, readonly, nonnull) SDImageIOCoder *sharedCoder;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageLoadersManager.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 "SDImageLoader.h"
10 |
11 | @interface SDImageLoadersManager : NSObject
12 |
13 | /**
14 | Returns the global shared loaders manager instance. By default we will set [`SDWebImageDownloader.sharedDownloader`] into the loaders array.
15 | */
16 | @property (nonatomic, class, readonly, nonnull) SDImageLoadersManager *sharedManager;
17 |
18 | /**
19 | All image loaders in manager. The loaders array is a priority queue, which means the later added loader will have the highest priority
20 | */
21 | @property (nonatomic, copy, nullable) NSArray>* loaders;
22 |
23 | /**
24 | Add a new image loader to the end of loaders array. Which has the highest priority.
25 |
26 | @param loader loader
27 | */
28 | - (void)addLoader:(nonnull id)loader;
29 |
30 | /**
31 | Remove a image loader in the loaders array.
32 |
33 | @param loader loader
34 | */
35 | - (void)removeLoader:(nonnull id)loader;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDImageLoadersManager.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 "SDImageLoadersManager.h"
10 | #import "SDWebImageDownloader.h"
11 |
12 | @interface SDImageLoadersManager ()
13 |
14 | @property (nonatomic, strong, nonnull) dispatch_semaphore_t loadersLock;
15 |
16 | @end
17 |
18 | @implementation SDImageLoadersManager
19 | {
20 | NSMutableArray>* _imageLoaders;
21 | }
22 |
23 | + (SDImageLoadersManager *)sharedManager {
24 | static dispatch_once_t onceToken;
25 | static SDImageLoadersManager *manager;
26 | dispatch_once(&onceToken, ^{
27 | manager = [[SDImageLoadersManager alloc] init];
28 | });
29 | return manager;
30 | }
31 |
32 | - (instancetype)init {
33 | self = [super init];
34 | if (self) {
35 | // initialize with default image loaders
36 | _imageLoaders = [NSMutableArray arrayWithObject:[SDWebImageDownloader sharedDownloader]];
37 | _loadersLock = dispatch_semaphore_create(1);
38 | }
39 | return self;
40 | }
41 |
42 | - (NSArray> *)loaders {
43 | SD_LOCK(self.loadersLock);
44 | NSArray>* loaders = [_imageLoaders copy];
45 | SD_UNLOCK(self.loadersLock);
46 | return loaders;
47 | }
48 |
49 | - (void)setLoaders:(NSArray> *)loaders {
50 | SD_LOCK(self.loadersLock);
51 | [_imageLoaders removeAllObjects];
52 | if (loaders.count) {
53 | [_imageLoaders addObjectsFromArray:loaders];
54 | }
55 | SD_UNLOCK(self.loadersLock);
56 | }
57 |
58 | #pragma mark - Loader Property
59 |
60 | - (void)addLoader:(id)loader {
61 | if (![loader conformsToProtocol:@protocol(SDImageLoader)]) {
62 | return;
63 | }
64 | SD_LOCK(self.loadersLock);
65 | [_imageLoaders addObject:loader];
66 | SD_UNLOCK(self.loadersLock);
67 | }
68 |
69 | - (void)removeLoader:(id)loader {
70 | if (![loader conformsToProtocol:@protocol(SDImageLoader)]) {
71 | return;
72 | }
73 | SD_LOCK(self.loadersLock);
74 | [_imageLoaders removeObject:loader];
75 | SD_UNLOCK(self.loadersLock);
76 | }
77 |
78 | #pragma mark - SDImageLoader
79 |
80 | - (BOOL)canRequestImageForURL:(nullable NSURL *)url {
81 | NSArray> *loaders = self.loaders;
82 | for (id loader in loaders.reverseObjectEnumerator) {
83 | if ([loader canRequestImageForURL:url]) {
84 | return YES;
85 | }
86 | }
87 | return NO;
88 | }
89 |
90 | - (id)requestImageWithURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDImageLoaderCompletedBlock)completedBlock {
91 | if (!url) {
92 | return nil;
93 | }
94 | NSArray> *loaders = self.loaders;
95 | for (id loader in loaders.reverseObjectEnumerator) {
96 | if ([loader canRequestImageForURL:url]) {
97 | return [loader requestImageWithURL:url options:options context:context progress:progressBlock completed:completedBlock];
98 | }
99 | }
100 | return nil;
101 | }
102 |
103 | - (BOOL)shouldBlockFailedURLWithURL:(NSURL *)url error:(NSError *)error {
104 | NSArray> *loaders = self.loaders;
105 | for (id loader in loaders.reverseObjectEnumerator) {
106 | if ([loader canRequestImageForURL:url]) {
107 | return [loader shouldBlockFailedURLWithURL:url error:error];
108 | }
109 | }
110 | return NO;
111 | }
112 |
113 | @end
114 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDMemoryCache.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 | @class SDImageCacheConfig;
12 | // A protocol to allow custom memory cache used in SDImageCache.
13 | @protocol SDMemoryCache
14 |
15 | @required
16 | /**
17 | Create a new memory cache instance with the specify cache config. You can check `maxMemoryCost` and `maxMemoryCount` used for memory cache.
18 |
19 | @param config The cache config to be used to create the cache.
20 | @return The new memory cache instance.
21 | */
22 | - (nonnull instancetype)initWithConfig:(nonnull SDImageCacheConfig *)config;
23 |
24 | /**
25 | Returns the value associated with a given key.
26 |
27 | @param key An object identifying the value. If nil, just return nil.
28 | @return The value associated with key, or nil if no value is associated with key.
29 | */
30 | - (nullable id)objectForKey:(nonnull id)key;
31 |
32 | /**
33 | Sets the value of the specified key in the cache (0 cost).
34 |
35 | @param object The object to be stored in the cache. If nil, it calls `removeObjectForKey:`.
36 | @param key The key with which to associate the value. If nil, this method has no effect.
37 | @discussion Unlike an NSMutableDictionary object, a cache does not copy the key
38 | objects that are put into it.
39 | */
40 | - (void)setObject:(nullable id)object forKey:(nonnull id)key;
41 |
42 | /**
43 | Sets the value of the specified key in the cache, and associates the key-value
44 | pair with the specified cost.
45 |
46 | @param object The object to store in the cache. If nil, it calls `removeObjectForKey`.
47 | @param key The key with which to associate the value. If nil, this method has no effect.
48 | @param cost The cost with which to associate the key-value pair.
49 | @discussion Unlike an NSMutableDictionary object, a cache does not copy the key
50 | objects that are put into it.
51 | */
52 | - (void)setObject:(nullable id)object forKey:(nonnull id)key cost:(NSUInteger)cost;
53 |
54 | /**
55 | Removes the value of the specified key in the cache.
56 |
57 | @param key The key identifying the value to be removed. If nil, this method has no effect.
58 | */
59 | - (void)removeObjectForKey:(nonnull id)key;
60 |
61 | /**
62 | Empties the cache immediately.
63 | */
64 | - (void)removeAllObjects;
65 |
66 | @end
67 |
68 | // A memory cache which auto purge the cache on memory warning and support weak cache.
69 | @interface SDMemoryCache : NSCache
70 |
71 | @property (nonatomic, strong, nonnull, readonly) SDImageCacheConfig *config;
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageCacheKeyFilter.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 | typedef NSString * _Nullable(^SDWebImageCacheKeyFilterBlock)(NSURL * _Nonnull url);
13 |
14 | // This is the protocol for cache key filter. We can use a block to specify the cache key filter. But Using protocol can make this extensible, and allow Swift user to use it easily instead of using `@convention(block)` to store a block into context options.
15 | @protocol SDWebImageCacheKeyFilter
16 |
17 | - (nullable NSString *)cacheKeyForURL:(nonnull NSURL *)url;
18 |
19 | @end
20 |
21 | @interface SDWebImageCacheKeyFilter : NSObject
22 |
23 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageCacheKeyFilterBlock)block;
24 | + (nonnull instancetype)cacheKeyFilterWithBlock:(nonnull SDWebImageCacheKeyFilterBlock)block;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageCacheKeyFilter.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 "SDWebImageCacheKeyFilter.h"
10 |
11 | @interface SDWebImageCacheKeyFilter ()
12 |
13 | @property (nonatomic, copy, nonnull) SDWebImageCacheKeyFilterBlock block;
14 |
15 | @end
16 |
17 | @implementation SDWebImageCacheKeyFilter
18 |
19 | - (instancetype)initWithBlock:(SDWebImageCacheKeyFilterBlock)block {
20 | self = [super init];
21 | if (self) {
22 | self.block = block;
23 | }
24 | return self;
25 | }
26 |
27 | + (instancetype)cacheKeyFilterWithBlock:(SDWebImageCacheKeyFilterBlock)block {
28 | SDWebImageCacheKeyFilter *cacheKeyFilter = [[SDWebImageCacheKeyFilter alloc] initWithBlock:block];
29 | return cacheKeyFilter;
30 | }
31 |
32 | - (NSString *)cacheKeyForURL:(NSURL *)url {
33 | if (!self.block) {
34 | return nil;
35 | }
36 | return self.block(url);
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageCacheSerializer.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 | typedef NSData * _Nullable(^SDWebImageCacheSerializerBlock)(UIImage * _Nonnull image, NSData * _Nullable data, NSURL * _Nullable imageURL);
13 |
14 | // This is the protocol for cache serializer. We can use a block to specify the cache serializer. But Using protocol can make this extensible, and allow Swift user to use it easily instead of using `@convention(block)` to store a block into context options.
15 | @protocol SDWebImageCacheSerializer
16 |
17 | - (nullable NSData *)cacheDataWithImage:(nonnull UIImage *)image originalData:(nullable NSData *)data imageURL:(nullable NSURL *)imageURL;
18 |
19 | @end
20 |
21 | @interface SDWebImageCacheSerializer : NSObject
22 |
23 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageCacheSerializerBlock)block;
24 | + (nonnull instancetype)cacheSerializerWithBlock:(nonnull SDWebImageCacheSerializerBlock)block;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageCacheSerializer.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 "SDWebImageCacheSerializer.h"
10 |
11 | @interface SDWebImageCacheSerializer ()
12 |
13 | @property (nonatomic, copy, nonnull) SDWebImageCacheSerializerBlock block;
14 |
15 | @end
16 |
17 | @implementation SDWebImageCacheSerializer
18 |
19 | - (instancetype)initWithBlock:(SDWebImageCacheSerializerBlock)block {
20 | self = [super init];
21 | if (self) {
22 | self.block = block;
23 | }
24 | return self;
25 | }
26 |
27 | + (instancetype)cacheSerializerWithBlock:(SDWebImageCacheSerializerBlock)block {
28 | SDWebImageCacheSerializer *cacheSerializer = [[SDWebImageCacheSerializer alloc] initWithBlock:block];
29 | return cacheSerializer;
30 | }
31 |
32 | - (NSData *)cacheDataWithImage:(UIImage *)image originalData:(NSData *)data imageURL:(nullable NSURL *)imageURL {
33 | if (!self.block) {
34 | return nil;
35 | }
36 | return self.block(image, data, imageURL);
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/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 | // Seems like TARGET_OS_MAC is always defined (on all platforms).
17 | // To determine if we are running on macOS, use TARGET_OS_OSX in Xcode 8
18 | #if TARGET_OS_OSX
19 | #define SD_MAC 1
20 | #else
21 | #define SD_MAC 0
22 | #endif
23 |
24 | // iOS and tvOS are very similar, UIKit exists on both platforms
25 | // Note: watchOS also has UIKit, but it's very limited
26 | #if TARGET_OS_IOS || TARGET_OS_TV
27 | #define SD_UIKIT 1
28 | #else
29 | #define SD_UIKIT 0
30 | #endif
31 |
32 | #if TARGET_OS_IOS
33 | #define SD_IOS 1
34 | #else
35 | #define SD_IOS 0
36 | #endif
37 |
38 | #if TARGET_OS_TV
39 | #define SD_TV 1
40 | #else
41 | #define SD_TV 0
42 | #endif
43 |
44 | #if TARGET_OS_WATCH
45 | #define SD_WATCH 1
46 | #else
47 | #define SD_WATCH 0
48 | #endif
49 |
50 |
51 | #if SD_MAC
52 | #import
53 | #ifndef UIImage
54 | #define UIImage NSImage
55 | #endif
56 | #ifndef UIImageView
57 | #define UIImageView NSImageView
58 | #endif
59 | #ifndef UIView
60 | #define UIView NSView
61 | #endif
62 | #ifndef UIColor
63 | #define UIColor NSColor
64 | #endif
65 | #else
66 | #if SD_UIKIT
67 | #import
68 | #endif
69 | #if SD_WATCH
70 | #import
71 | #ifndef UIView
72 | #define UIView WKInterfaceObject
73 | #endif
74 | #ifndef UIImageView
75 | #define UIImageView WKInterfaceImage
76 | #endif
77 | #endif
78 | #endif
79 |
80 | #ifndef NS_ENUM
81 | #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
82 | #endif
83 |
84 | #ifndef NS_OPTIONS
85 | #define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
86 | #endif
87 |
88 | #ifndef dispatch_main_async_safe
89 | #define dispatch_main_async_safe(block)\
90 | if (dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL) == dispatch_queue_get_label(dispatch_get_main_queue())) {\
91 | block();\
92 | } else {\
93 | dispatch_async(dispatch_get_main_queue(), block);\
94 | }
95 | #endif
96 |
--------------------------------------------------------------------------------
/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 | #if !__has_feature(objc_arc)
12 | #error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag
13 | #endif
14 |
15 | #if !OS_OBJECT_USE_OBJC
16 | #error SDWebImage need ARC for dispatch object
17 | #endif
18 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderConfig.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 | typedef NS_ENUM(NSInteger, SDWebImageDownloaderExecutionOrder) {
13 | /**
14 | * Default value. All download operations will execute in queue style (first-in-first-out).
15 | */
16 | SDWebImageDownloaderFIFOExecutionOrder,
17 |
18 | /**
19 | * All download operations will execute in stack style (last-in-first-out).
20 | */
21 | SDWebImageDownloaderLIFOExecutionOrder
22 | };
23 |
24 | @interface SDWebImageDownloaderConfig : NSObject
25 |
26 | /**
27 | Gets the default downloader config used for shared instance or initialization when it does not provide any downloader config. Such as `SDWebImageDownloader.sharedDownloader`.
28 | @note You can modify the property on default downloader config, which can be used for later created downloader instance. The already created downloader instance does not get affected.
29 | */
30 | @property (nonatomic, class, readonly, nonnull) SDWebImageDownloaderConfig *defaultDownloaderConfig;
31 |
32 | /**
33 | * The maximum number of concurrent downloads.
34 | * Defaults to 6.
35 | */
36 | @property (nonatomic, assign) NSInteger maxConcurrentDownloads;
37 |
38 | /**
39 | * The timeout value (in seconds) for each download operation.
40 | * Defaults to 15.0.
41 | */
42 | @property (nonatomic, assign) NSTimeInterval downloadTimeout;
43 |
44 | /**
45 | * The minimum interval about progress percent during network downloading. Which means the next progress callback and current progress callback's progress percent difference should be larger or equal to this value. However, the final finish download progress callback does not get effected.
46 | * The value should be 0.0-1.0.
47 | * @note If you're using progressive decoding feature, this will also effect the image refresh rate.
48 | * @note This value may enhance the performance if you don't want progress callback too frequently.
49 | * Defaults to 0, which means each time we receive the new data from URLSession, we callback the progressBlock immediately.
50 | */
51 | @property (nonatomic, assign) double minimumProgressInterval;
52 |
53 | /**
54 | * The custom session configuration in use by NSURLSession. If you don't provide one, we will use `defaultSessionConfiguration` instead.
55 | * Defatuls to nil.
56 | * @note This property does not support dynamic changes, means it's immutable after the downloader instance initialized.
57 | */
58 | @property (nonatomic, strong, nullable) NSURLSessionConfiguration *sessionConfiguration;
59 |
60 | /**
61 | * Gets/Sets a subclass of `SDWebImageDownloaderOperation` as the default
62 | * `NSOperation` to be used each time SDWebImage constructs a request
63 | * operation to download an image.
64 | * Defaults to nil.
65 | * @note Passing `NSOperation` to set as default. Passing `nil` will revert to `SDWebImageDownloaderOperation`.
66 | */
67 | @property (nonatomic, assign, nullable) Class operationClass;
68 |
69 | /**
70 | * Changes download operations execution order.
71 | * Defaults to `SDWebImageDownloaderFIFOExecutionOrder`.
72 | */
73 | @property (nonatomic, assign) SDWebImageDownloaderExecutionOrder executionOrder;
74 |
75 | /**
76 | * Set the default URL credential to be set for request operations.
77 | * Defaults to nil.
78 | */
79 | @property (nonatomic, copy, nullable) NSURLCredential *urlCredential;
80 |
81 | /**
82 | * Set username using for HTTP Basic authentication.
83 | * Defaults to nil.
84 | */
85 | @property (nonatomic, copy, nullable) NSString *username;
86 |
87 | /**
88 | * Set password using for HTTP Basic authentication.
89 | * Defautls to nil.
90 | */
91 | @property (nonatomic, copy, nullable) NSString *password;
92 |
93 | @end
94 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderConfig.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 "SDWebImageDownloaderConfig.h"
10 |
11 | static SDWebImageDownloaderConfig * _defaultDownloaderConfig;
12 |
13 | @implementation SDWebImageDownloaderConfig
14 |
15 | + (SDWebImageDownloaderConfig *)defaultDownloaderConfig {
16 | static dispatch_once_t onceToken;
17 | dispatch_once(&onceToken, ^{
18 | _defaultDownloaderConfig = [SDWebImageDownloaderConfig new];
19 | });
20 | return _defaultDownloaderConfig;
21 | }
22 |
23 | - (instancetype)init {
24 | self = [super init];
25 | if (self) {
26 | _maxConcurrentDownloads = 6;
27 | _downloadTimeout = 15.0;
28 | _executionOrder = SDWebImageDownloaderFIFOExecutionOrder;
29 | }
30 | return self;
31 | }
32 |
33 | - (id)copyWithZone:(NSZone *)zone {
34 | SDWebImageDownloaderConfig *config = [[[self class] allocWithZone:zone] init];
35 | config.maxConcurrentDownloads = self.maxConcurrentDownloads;
36 | config.downloadTimeout = self.downloadTimeout;
37 | config.minimumProgressInterval = self.minimumProgressInterval;
38 | config.sessionConfiguration = [self.sessionConfiguration copyWithZone:zone];
39 | config.operationClass = self.operationClass;
40 | config.executionOrder = self.executionOrder;
41 | config.urlCredential = self.urlCredential;
42 | config.username = self.username;
43 | config.password = self.password;
44 |
45 | return config;
46 | }
47 |
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderRequestModifier.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 | typedef NSURLRequest * _Nullable (^SDWebImageDownloaderRequestModifierBlock)(NSURLRequest * _Nonnull request);
13 |
14 | // This is the protocol for downloader request modifier. We can use a block to specify the downloader request modifier. But Using protocol can make this extensible, and allow Swift user to use it easily instead of using `@convention(block)` to store a block into context options.
15 | @protocol SDWebImageDownloaderRequestModifier
16 |
17 | - (nullable NSURLRequest *)modifiedRequestWithRequest:(nonnull NSURLRequest *)request;
18 |
19 | @end
20 |
21 | @interface SDWebImageDownloaderRequestModifier : NSObject
22 |
23 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageDownloaderRequestModifierBlock)block;
24 | + (nonnull instancetype)requestModifierWithBlock:(nonnull SDWebImageDownloaderRequestModifierBlock)block;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderRequestModifier.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 "SDWebImageDownloaderRequestModifier.h"
10 |
11 | @interface SDWebImageDownloaderRequestModifier ()
12 |
13 | @property (nonatomic, copy, nonnull) SDWebImageDownloaderRequestModifierBlock block;
14 |
15 | @end
16 |
17 | @implementation SDWebImageDownloaderRequestModifier
18 |
19 | - (instancetype)initWithBlock:(SDWebImageDownloaderRequestModifierBlock)block {
20 | self = [super init];
21 | if (self) {
22 | self.block = block;
23 | }
24 | return self;
25 | }
26 |
27 | + (instancetype)requestModifierWithBlock:(SDWebImageDownloaderRequestModifierBlock)block {
28 | SDWebImageDownloaderRequestModifier *requestModifier = [[SDWebImageDownloaderRequestModifier alloc] initWithBlock:block];
29 | return requestModifier;
30 | }
31 |
32 | - (NSURLRequest *)modifiedRequestWithRequest:(NSURLRequest *)request {
33 | if (!self.block) {
34 | return nil;
35 | }
36 | return self.block(request);
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageError.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 "SDWebImageCompat.h"
11 |
12 | FOUNDATION_EXPORT NSErrorDomain const _Nonnull SDWebImageErrorDomain;
13 |
14 | FOUNDATION_EXPORT NSErrorUserInfoKey const _Nonnull SDWebImageErrorDownloadStatusCodeKey;
15 |
16 | typedef NS_ERROR_ENUM(SDWebImageErrorDomain, SDWebImageError) {
17 | SDWebImageErrorInvalidURL = 1000, // The URL is invalid, such as nil URL or corrupted URL
18 | SDWebImageErrorBadImageData = 1001, // The image data can not be decoded to image, or the image data is empty
19 | SDWebImageErrorCacheNotModified = 1002, // The remote location specify that the cached image is not modified, such as the HTTP response 304 code. It's useful for `SDWebImageRefreshCached`
20 | SDWebImageErrorInvalidDownloadOperation = 2000, // The image download operation is invalid, such as nil operation or unexpected error occur when operation initialized
21 | SDWebImageErrorInvalidDownloadStatusCode = 2001, // The image downloda response a invalid status code. You can check the status code in error's userInfo under `SDWebImageErrorDownloadStatusCodeKey`
22 | };
23 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageError.m:
--------------------------------------------------------------------------------
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 "SDWebImageError.h"
11 |
12 | NSErrorDomain const _Nonnull SDWebImageErrorDomain = @"SDWebImageErrorDomain";
13 | NSErrorUserInfoKey const _Nonnull SDWebImageErrorDownloadStatusCodeKey = @"SDWebImageErrorDownloadStatusCodeKey";
14 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/SDWebImageIndicator.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 | // A protocol to custom the indicator during the image loading
14 | // All of these methods are called from main queue
15 | @protocol SDWebImageIndicator
16 |
17 | @required
18 | /**
19 | The view associate to the indicator.
20 |
21 | @return The indicator view
22 | */
23 | @property (nonatomic, strong, readonly, nonnull) UIView *indicatorView;
24 | /**
25 | Start the animating for indicator.
26 | */
27 | - (void)startAnimatingIndicator;
28 | /**
29 | Stop the animating for indicator.
30 | */
31 | - (void)stopAnimatingIndicator;
32 |
33 | @optional
34 | /**
35 | Update the loading progress (0-1.0) for indicator. Optional
36 |
37 | @param progress The progress, value between 0 and 1.0
38 | */
39 | - (void)updateIndicatorProgress:(double)progress;
40 |
41 | @end
42 |
43 | #pragma mark - Activity Indicator
44 |
45 | // Activity indicator class
46 | // for UIKit(macOS), it use a `UIActivityIndicatorView`
47 | // for AppKit(macOS), it use a `NSProgressIndicator` with the spinning style
48 | @interface SDWebImageActivityIndicator : NSObject
49 |
50 | #if SD_UIKIT
51 | @property (nonatomic, strong, readonly, nonnull) UIActivityIndicatorView *indicatorView;
52 | #else
53 | @property (nonatomic, strong, readonly, nonnull) NSProgressIndicator *indicatorView;
54 | #endif
55 |
56 | @end
57 |
58 | // Convenience way to use activity indicator.
59 | @interface SDWebImageActivityIndicator (Conveniences)
60 |
61 | /// gray-style activity indicator
62 | @property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *grayIndicator;
63 | /// large gray-style activity indicator
64 | @property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *grayLargeIndicator;
65 | /// white-style activity indicator
66 | @property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *whiteIndicator;
67 | /// large white-style activity indicator
68 | @property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *whiteLargeIndicator;
69 |
70 | @end
71 |
72 | #pragma mark - Progress Indicator
73 |
74 | // Progress indicator class
75 | // for UIKit(macOS), it use a `UIProgressView`
76 | // for AppKit(macOS), it use a `NSProgressIndicator` with the bar style
77 | @interface SDWebImageProgressIndicator : NSObject
78 |
79 | #if SD_UIKIT
80 | @property (nonatomic, strong, readonly, nonnull) UIProgressView *indicatorView;
81 | #else
82 | @property (nonatomic, strong, readonly, nonnull) NSProgressIndicator *indicatorView;
83 | #endif
84 |
85 | @end
86 |
87 | // Convenience way to create progress indicator. Remember to specify the indicator width or use layout constraint if need.
88 | @interface SDWebImageProgressIndicator (Conveniences)
89 |
90 | /// default-style progress indicator
91 | @property (nonatomic, class, nonnull, readonly) SDWebImageProgressIndicator *defaultIndicator;
92 | /// bar-style progress indicator
93 | @property (nonatomic, class, nonnull, readonly) SDWebImageProgressIndicator *barIndicator API_UNAVAILABLE(macos, tvos);
94 |
95 | @end
96 |
97 | #endif
98 |
--------------------------------------------------------------------------------
/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 |
17 | // NSOperation conform to `SDWebImageOperation`
18 | @interface NSOperation (SDWebImageOperation)
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIImage+ForceDecode.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 | @interface UIImage (ForceDecode)
12 |
13 | /**
14 | A bool value indicating whether the image has already been decoded. This can help to avoid extra force decode.
15 | */
16 | @property (nonatomic, assign) BOOL sd_isDecoded;
17 |
18 | /**
19 | Decode the provided image. This is useful if you want to force decode the image before rendering to improve performance.
20 |
21 | @param image The image to be decoded
22 | @return The decoded image
23 | */
24 | + (nullable UIImage *)sd_decodedImageWithImage:(nullable UIImage *)image;
25 |
26 | /**
27 | Decode and scale down the provided image
28 |
29 | @param image The image to be decoded
30 | @return The decoded and scaled down image
31 | */
32 | + (nullable UIImage *)sd_decodedAndScaledDownImageWithImage:(nullable UIImage *)image;
33 |
34 | /**
35 | Decode and scale down the provided image with limit bytes
36 |
37 | @param image The image to be decoded
38 | @param bytes The limit bytes size. Provide 0 to use the build-in limit.
39 | @return The decoded and scaled down image
40 | */
41 | + (nullable UIImage *)sd_decodedAndScaledDownImageWithImage:(nullable UIImage *)image limitBytes:(NSUInteger)bytes;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIImage+ForceDecode.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 "UIImage+ForceDecode.h"
10 | #import "SDImageCoderHelper.h"
11 | #import "objc/runtime.h"
12 |
13 | @implementation UIImage (ForceDecode)
14 |
15 | - (BOOL)sd_isDecoded {
16 | NSNumber *value = objc_getAssociatedObject(self, @selector(sd_isDecoded));
17 | return value.boolValue;
18 | }
19 |
20 | - (void)setSd_isDecoded:(BOOL)sd_isDecoded {
21 | objc_setAssociatedObject(self, @selector(sd_isDecoded), @(sd_isDecoded), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
22 | }
23 |
24 | + (UIImage *)sd_decodedImageWithImage:(UIImage *)image {
25 | if (!image) {
26 | return nil;
27 | }
28 | return [SDImageCoderHelper decodedImageWithImage:image];
29 | }
30 |
31 | + (UIImage *)sd_decodedAndScaledDownImageWithImage:(UIImage *)image {
32 | return [self sd_decodedAndScaledDownImageWithImage:image limitBytes:0];
33 | }
34 |
35 | + (UIImage *)sd_decodedAndScaledDownImageWithImage:(UIImage *)image limitBytes:(NSUInteger)bytes {
36 | if (!image) {
37 | return nil;
38 | }
39 | return [SDImageCoderHelper decodedAndScaledDownImageWithImage:image limitBytes:bytes];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/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 | // This category is just use as a convenience method. For more detail control, use methods in `UIImage+MultiFormat.h` or directlly use `SDImageCoder`
13 | @interface UIImage (GIF)
14 |
15 | /**
16 | Creates an animated UIImage from an NSData.
17 | This will create animated image if the data is Animated GIF. And will create a static image is the data is Static GIF.
18 |
19 | @param data The GIF data
20 | @return The created image
21 | */
22 | + (nullable UIImage *)sd_imageWithGIFData:(nullable NSData *)data;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/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 "SDImageGIFCoder.h"
12 |
13 | @implementation UIImage (GIF)
14 |
15 | + (nullable UIImage *)sd_imageWithGIFData:(nullable NSData *)data {
16 | if (!data) {
17 | return nil;
18 | }
19 | return [[SDImageGIFCoder sharedCoder] decodedImageWithData:data options:0];
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIImage+MemoryCacheCost.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 | @interface UIImage (MemoryCacheCost)
12 |
13 | /**
14 | The memory cache cost for specify image used by image cache. The cost function is the bytes size held in memory.
15 | If you set some associated object to `UIImage`, you can set the custom value to indicate the memory cost.
16 |
17 | For `UIImage`, this method return the single frame bytes size when `image.images` is nil for static image. Retuen full frame bytes size when `image.images` is not nil for animated image.
18 | For `NSImage`, this method return the single frame bytes size because `NSImage` does not store all frames in memory.
19 | @note Note that because of the limitations of category this property can get out of sync if you create another instance with CGImage or other methods.
20 | @note For custom animated class conforms to `SDAnimatedImage`, you can override this getter method in your subclass to return a more proper value instead, which representing the current frame's total bytes.
21 | */
22 | @property (assign, nonatomic) NSUInteger sd_memoryCost;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIImage+MemoryCacheCost.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 "UIImage+MemoryCacheCost.h"
10 | #import "objc/runtime.h"
11 | #import "NSImage+Compatibility.h"
12 |
13 | FOUNDATION_STATIC_INLINE NSUInteger SDMemoryCacheCostForImage(UIImage *image) {
14 | CGImageRef imageRef = image.CGImage;
15 | if (!imageRef) {
16 | return 0;
17 | }
18 | NSUInteger bytesPerFrame = CGImageGetBytesPerRow(imageRef) * CGImageGetHeight(imageRef);
19 | NSUInteger frameCount;
20 | #if SD_MAC
21 | frameCount = 1;
22 | #elif SD_UIKIT || SD_WATCH
23 | frameCount = image.images.count > 0 ? image.images.count : 1;
24 | #endif
25 | NSUInteger cost = bytesPerFrame * frameCount;
26 | return cost;
27 | }
28 |
29 | @implementation UIImage (MemoryCacheCost)
30 |
31 | - (NSUInteger)sd_memoryCost {
32 | NSNumber *value = objc_getAssociatedObject(self, @selector(sd_memoryCost));
33 | NSUInteger memoryCost;
34 | if (value != nil) {
35 | memoryCost = [value unsignedIntegerValue];
36 | } else {
37 | memoryCost = SDMemoryCacheCostForImage(self);
38 | }
39 | return memoryCost;
40 | }
41 |
42 | - (void)setSd_memoryCost:(NSUInteger)sd_memoryCost {
43 | objc_setAssociatedObject(self, @selector(sd_memoryCost), @(sd_memoryCost), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIImage+Metadata.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 (Metadata)
13 |
14 | /**
15 | * UIKit:
16 | * For static image format, this value is always 0.
17 | * For animated image format, 0 means infinite looping.
18 | * Note that because of the limitations of categories this property can get out of sync if you create another instance with CGImage or other methods.
19 | * AppKit:
20 | * NSImage currently only support animated via GIF imageRep unlike UIImage.
21 | * The getter of this property will get the loop count from GIF imageRep
22 | * The setter of this property will set the loop count from GIF imageRep
23 | */
24 | @property (nonatomic, assign) NSUInteger sd_imageLoopCount;
25 |
26 | /**
27 | * UIKit:
28 | * Check the `images` array property
29 | * AppKit:
30 | * NSImage currently only support animated via GIF imageRep unlike UIImage. It will check the imageRep's frame count.
31 | */
32 | @property (nonatomic, assign, readonly) BOOL sd_isAnimated;
33 |
34 | /**
35 | * The image format represent the original compressed image data format.
36 | * If you don't manually specify a format, this information is retrieve from CGImage using `CGImageGetUTType`, which may return nil for non-CG based image. At this time it will return `SDImageFormatUndefined` as default value.
37 | * @note Note that because of the limitations of categories this property can get out of sync if you create another instance with CGImage or other methods.
38 | */
39 | @property (nonatomic, assign) SDImageFormat sd_imageFormat;
40 |
41 | /**
42 | A bool value indicating whether the image is during incremental decoding and may not contains full pixels.
43 | */
44 | @property (nonatomic, assign) BOOL sd_isIncremental;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/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 | #pragma mark - Decode
14 | /**
15 | Create and decode a image with the specify image data
16 |
17 | @param data The image data
18 | @return The created image
19 | */
20 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data;
21 |
22 | /**
23 | Create and decode a image with the specify image data and scale
24 |
25 | @param data The image data
26 | @param scale The image scale factor. Should be greater than or equal to 1.0.
27 | @return The created image
28 | */
29 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data scale:(CGFloat)scale;
30 |
31 | /**
32 | Create and decode a image with the specify image data and scale, allow specify animate/static control
33 |
34 | @param data The image data
35 | @param scale The image scale factor. Should be greater than or equal to 1.0.
36 | @param firstFrameOnly Even if the image data is animated image format, decode the first frame only as static image.
37 | @return The created image
38 | */
39 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data scale:(CGFloat)scale firstFrameOnly:(BOOL)firstFrameOnly;
40 |
41 | #pragma mark - Encode
42 | /**
43 | Encode the current image to the data, the image format is unspecified
44 |
45 | @return The encoded data. If can't encode, return nil
46 | */
47 | - (nullable NSData *)sd_imageData;
48 |
49 | /**
50 | Encode the current image to data with the specify image format
51 |
52 | @param imageFormat The specify image format
53 | @return The encoded data. If can't encode, return nil
54 | */
55 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat NS_SWIFT_NAME(sd_imageData(as:));
56 |
57 | /**
58 | Encode the current image to data with the specify image format and compression quality
59 |
60 | @param imageFormat The specify image format
61 | @param compressionQuality The quality of the resulting image data. Value between 0.0-1.0. Some coders may not support compression quality.
62 | @return The encoded data. If can't encode, return nil
63 | */
64 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality NS_SWIFT_NAME(sd_imageData(as:compressionQuality:));
65 |
66 | /**
67 | Encode the current image to data with the specify image format and compression quality, allow specify animate/static control
68 |
69 | @param imageFormat The specify image format
70 | @param compressionQuality The quality of the resulting image data. Value between 0.0-1.0. Some coders may not support compression quality.
71 | @param firstFrameOnly Even if the image is animated image, encode the first frame only as static image.
72 | @return The encoded data. If can't encode, return nil
73 | */
74 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality firstFrameOnly:(BOOL)firstFrameOnly NS_SWIFT_NAME(sd_imageData(as:compressionQuality:firstFrameOnly:));
75 |
76 | @end
77 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.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 "UIImage+MultiFormat.h"
10 | #import "SDImageCodersManager.h"
11 |
12 | @implementation UIImage (MultiFormat)
13 |
14 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data {
15 | return [self sd_imageWithData:data scale:1];
16 | }
17 |
18 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data scale:(CGFloat)scale {
19 | return [self sd_imageWithData:data scale:scale firstFrameOnly:NO];
20 | }
21 |
22 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data scale:(CGFloat)scale firstFrameOnly:(BOOL)firstFrameOnly {
23 | if (!data) {
24 | return nil;
25 | }
26 | if (scale < 1) {
27 | scale = 1;
28 | }
29 | SDImageCoderOptions *options = @{SDImageCoderDecodeScaleFactor : @(scale), SDImageCoderDecodeFirstFrameOnly : @(firstFrameOnly)};
30 | return [[SDImageCodersManager sharedManager] decodedImageWithData:data options:options];
31 | }
32 |
33 | - (nullable NSData *)sd_imageData {
34 | return [self sd_imageDataAsFormat:SDImageFormatUndefined];
35 | }
36 |
37 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat {
38 | return [self sd_imageDataAsFormat:imageFormat compressionQuality:1];
39 | }
40 |
41 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality {
42 | return [self sd_imageDataAsFormat:imageFormat compressionQuality:compressionQuality firstFrameOnly:NO];
43 | }
44 |
45 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality firstFrameOnly:(BOOL)firstFrameOnly {
46 | SDImageCoderOptions *options = @{SDImageCoderEncodeCompressionQuality : @(compressionQuality), SDImageCoderEncodeFirstFrameOnly : @(firstFrameOnly)};
47 | return [[SDImageCodersManager sharedManager] encodedDataWithImage:self format:imageFormat options:options];
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/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 | static NSString * const SDHighlightedImageOperationKey = @"UIImageViewImageOperationHighlighted";
17 |
18 | @implementation UIImageView (HighlightedWebCache)
19 |
20 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url {
21 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil];
22 | }
23 |
24 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options {
25 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil];
26 | }
27 |
28 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options context:(nullable SDWebImageContext *)context {
29 | [self sd_setHighlightedImageWithURL:url options:options context:context progress:nil completed:nil];
30 | }
31 |
32 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url completed:(nullable SDExternalCompletionBlock)completedBlock {
33 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:completedBlock];
34 | }
35 |
36 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options completed:(nullable SDExternalCompletionBlock)completedBlock {
37 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock];
38 | }
39 |
40 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock {
41 | [self sd_setHighlightedImageWithURL:url options:options context:nil progress:progressBlock completed:completedBlock];
42 | }
43 |
44 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
45 | options:(SDWebImageOptions)options
46 | context:(nullable SDWebImageContext *)context
47 | progress:(nullable SDImageLoaderProgressBlock)progressBlock
48 | completed:(nullable SDExternalCompletionBlock)completedBlock {
49 | @weakify(self);
50 | SDWebImageMutableContext *mutableContext;
51 | if (context) {
52 | mutableContext = [context mutableCopy];
53 | } else {
54 | mutableContext = [NSMutableDictionary dictionary];
55 | }
56 | mutableContext[SDWebImageContextSetImageOperationKey] = SDHighlightedImageOperationKey;
57 | [self sd_internalSetImageWithURL:url
58 | placeholderImage:nil
59 | options:options
60 | context:mutableContext
61 | setImageBlock:^(UIImage * _Nullable image, NSData * _Nullable imageData, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
62 | @strongify(self);
63 | self.highlightedImage = image;
64 | }
65 | progress:progressBlock
66 | completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
67 | if (completedBlock) {
68 | completedBlock(image, error, cacheType, imageURL);
69 | }
70 | }];
71 | }
72 |
73 | @end
74 |
75 | #endif
76 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIImageView+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 "UIImageView+WebCache.h"
10 | #import "objc/runtime.h"
11 | #import "UIView+WebCacheOperation.h"
12 | #import "UIView+WebCache.h"
13 |
14 | @implementation UIImageView (WebCache)
15 |
16 | - (void)sd_setImageWithURL:(nullable NSURL *)url {
17 | [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:nil];
18 | }
19 |
20 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder {
21 | [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:nil];
22 | }
23 |
24 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options {
25 | [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil];
26 | }
27 |
28 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options context:(nullable SDWebImageContext *)context {
29 | [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:context progress:nil completed:nil];
30 | }
31 |
32 | - (void)sd_setImageWithURL:(nullable NSURL *)url completed:(nullable SDExternalCompletionBlock)completedBlock {
33 | [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:completedBlock];
34 | }
35 |
36 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder completed:(nullable SDExternalCompletionBlock)completedBlock {
37 | [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:completedBlock];
38 | }
39 |
40 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options completed:(nullable SDExternalCompletionBlock)completedBlock {
41 | [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock];
42 | }
43 |
44 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock {
45 | [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock];
46 | }
47 |
48 | - (void)sd_setImageWithURL:(nullable NSURL *)url
49 | placeholderImage:(nullable UIImage *)placeholder
50 | options:(SDWebImageOptions)options
51 | context:(nullable SDWebImageContext *)context
52 | progress:(nullable SDImageLoaderProgressBlock)progressBlock
53 | completed:(nullable SDExternalCompletionBlock)completedBlock {
54 | [self sd_internalSetImageWithURL:url
55 | placeholderImage:placeholder
56 | options:options
57 | context:context
58 | setImageBlock:nil
59 | progress:progressBlock
60 | completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
61 | if (completedBlock) {
62 | completedBlock(image, error, cacheType, imageURL);
63 | }
64 | }];
65 | }
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/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 | #import "SDWebImageOperation.h"
11 |
12 | // These methods are used to support canceling for UIView image loading, it's designed to be used internal but not external.
13 | // All the stored operations are weak, so it will be dalloced after image loading finished. If you need to store operations, use your own class to keep a strong reference for them.
14 | @interface UIView (WebCacheOperation)
15 |
16 | /**
17 | * Get the image load operation for key
18 | *
19 | * @param key key for identifying the operations
20 | * @return the image load operation
21 | */
22 | - (nullable id)sd_imageLoadOperationForKey:(nullable NSString *)key;
23 |
24 | /**
25 | * Set the image load operation (storage in a UIView based weak map table)
26 | *
27 | * @param operation the operation
28 | * @param key key for storing the operation
29 | */
30 | - (void)sd_setImageLoadOperation:(nullable id)operation forKey:(nullable NSString *)key;
31 |
32 | /**
33 | * Cancel all operations for the current UIView and key
34 | *
35 | * @param key key for identifying the operations
36 | */
37 | - (void)sd_cancelImageLoadOperationWithKey:(nullable NSString *)key;
38 |
39 | /**
40 | * Just remove the operations corresponding to the current UIView and key without cancelling them
41 | *
42 | * @param key key for identifying the operations
43 | */
44 | - (void)sd_removeImageLoadOperationWithKey:(nullable NSString *)key;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import "UIView+WebCacheOperation.h"
10 | #import "objc/runtime.h"
11 |
12 | static char loadOperationKey;
13 |
14 | // key is strong, value is weak because operation instance is retained by SDWebImageManager's runningOperations property
15 | // we should use lock to keep thread-safe because these method may not be acessed from main queue
16 | typedef NSMapTable> SDOperationsDictionary;
17 |
18 | @implementation UIView (WebCacheOperation)
19 |
20 | - (SDOperationsDictionary *)sd_operationDictionary {
21 | @synchronized(self) {
22 | SDOperationsDictionary *operations = objc_getAssociatedObject(self, &loadOperationKey);
23 | if (operations) {
24 | return operations;
25 | }
26 | operations = [[NSMapTable alloc] initWithKeyOptions:NSPointerFunctionsStrongMemory valueOptions:NSPointerFunctionsWeakMemory capacity:0];
27 | objc_setAssociatedObject(self, &loadOperationKey, operations, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
28 | return operations;
29 | }
30 | }
31 |
32 | - (nullable id)sd_imageLoadOperationForKey:(nullable NSString *)key {
33 | id operation;
34 | if (key) {
35 | SDOperationsDictionary *operationDictionary = [self sd_operationDictionary];
36 | @synchronized (self) {
37 | operation = [operationDictionary objectForKey:key];
38 | }
39 | }
40 | return operation;
41 | }
42 |
43 | - (void)sd_setImageLoadOperation:(nullable id)operation forKey:(nullable NSString *)key {
44 | if (key) {
45 | [self sd_cancelImageLoadOperationWithKey:key];
46 | if (operation) {
47 | SDOperationsDictionary *operationDictionary = [self sd_operationDictionary];
48 | @synchronized (self) {
49 | [operationDictionary setObject:operation forKey:key];
50 | }
51 | }
52 | }
53 | }
54 |
55 | - (void)sd_cancelImageLoadOperationWithKey:(nullable NSString *)key {
56 | if (key) {
57 | // Cancel in progress downloader from queue
58 | SDOperationsDictionary *operationDictionary = [self sd_operationDictionary];
59 | id operation;
60 |
61 | @synchronized (self) {
62 | operation = [operationDictionary objectForKey:key];
63 | }
64 | if (operation) {
65 | if ([operation conformsToProtocol:@protocol(SDWebImageOperation)]) {
66 | [operation cancel];
67 | }
68 | @synchronized (self) {
69 | [operationDictionary removeObjectForKey:key];
70 | }
71 | }
72 | }
73 | }
74 |
75 | - (void)sd_removeImageLoadOperationWithKey:(nullable NSString *)key {
76 | if (key) {
77 | SDOperationsDictionary *operationDictionary = [self sd_operationDictionary];
78 | @synchronized (self) {
79 | [operationDictionary removeObjectForKey:key];
80 | }
81 | }
82 | }
83 |
84 | @end
85 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/WebImage/SDWebImage.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | * (c) Florent Vilmart
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 | #if SD_UIKIT
13 | #import
14 | #endif
15 |
16 | //! Project version number for WebImage.
17 | FOUNDATION_EXPORT double WebImageVersionNumber;
18 |
19 | //! Project version string for WebImage.
20 | FOUNDATION_EXPORT const unsigned char WebImageVersionString[];
21 |
22 | // In this header, you should import all the public headers of your framework using statements like #import
23 |
24 | #import
25 | #import
26 | #import
27 | #import
28 | #import
29 | #import
30 | #import
31 | #import
32 | #import
33 | #import
34 | #import
35 | #import
36 | #import
37 | #import
38 | #import
39 | #import
40 | #import
41 | #import
42 | #import
43 | #import
44 | #import
45 | #import
46 | #import
47 | #import
48 | #import
49 | #import
50 | #import
51 | #import
52 | #import
53 | #import
54 | #import
55 | #import
56 | #import
57 | #import
58 | #import
59 | #import
60 | #import
61 | #import
62 | #import
63 | #import
64 | #import
65 | #import
66 | #import
67 | #import
68 | #import
69 |
70 | // Mac
71 | #if __has_include()
72 | #import
73 | #endif
74 | #if __has_include()
75 | #import
76 | #endif
77 | #if __has_include()
78 | #import
79 | #endif
80 |
81 | // MapKit
82 | #if __has_include()
83 | #import
84 | #endif
85 |
--------------------------------------------------------------------------------
/Pods/SDWebImage/WebImage/SDWebImage.modulemap:
--------------------------------------------------------------------------------
1 | framework module SDWebImage {
2 | umbrella header "SDWebImage.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-SDCycleScrollView/Pods-SDCycleScrollView-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## SDWebImage
5 |
6 | Copyright (c) 2009-2018 Olivier Poitrey rs@dailymotion.com
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is furnished
13 | to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in all
16 | copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 |
26 |
27 | Generated by CocoaPods - https://cocoapods.org
28 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-SDCycleScrollView/Pods-SDCycleScrollView-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Copyright (c) 2009-2018 Olivier Poitrey rs@dailymotion.com
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is furnished
24 | to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in all
27 | copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 |
37 |
38 | License
39 | MIT
40 | Title
41 | SDWebImage
42 | Type
43 | PSGroupSpecifier
44 |
45 |
46 | FooterText
47 | Generated by CocoaPods - https://cocoapods.org
48 | Title
49 |
50 | Type
51 | PSGroupSpecifier
52 |
53 |
54 | StringsTable
55 | Acknowledgements
56 | Title
57 | Acknowledgements
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-SDCycleScrollView/Pods-SDCycleScrollView-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_SDCycleScrollView : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_SDCycleScrollView
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-SDCycleScrollView/Pods-SDCycleScrollView.debug.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDWebImage"
3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage"
4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage"
5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"SDWebImage" -framework "ImageIO"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-SDCycleScrollView/Pods-SDCycleScrollView.release.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDWebImage"
3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage"
4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage"
5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"SDWebImage" -framework "ImageIO"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SDWebImage : NSObject
3 | @end
4 | @implementation PodsDummy_SDWebImage
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "SDInternalMacros.h"
14 |
--------------------------------------------------------------------------------
/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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDWebImage"
4 | OTHER_LDFLAGS = -framework "ImageIO"
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SDWebImage
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SDCycleScrollView(新建QQ交流群:185534916、675995250)
2 | ## ☆☆☆ “iOS图片、文字轮播器” ☆☆☆
3 |
4 | ### 字节跳动 iOS 岗位招聘
5 | 北上广深杭大量招人,各种研发岗位都在找,有意向者可以直接点击后面链接投递简历或者联系我 gsdios@126.com https://job.toutiao.com/s/eL91QMm,
6 |
7 | ### 支持pod导入
8 | pod 'SDCycleScrollView','>= 1.82'
9 |
10 |
11 | ### 更改记录:
12 |
13 | 2020.10.31 -- 修复iOS14上系统自带pagecontrol显示不出来bug (已发布到1.82版本)
14 |
15 | 2019.04.10 -- 适配SDWebImage 5.0.0
16 |
17 | 2017.11.26 -- 增加滚动到指定index接口
18 |
19 | 2017.10.28 -- 更新对SDWebImage的版本依赖
20 |
21 | 2017.06.23 -- 1.增加支持轮播自定义cell的代理方法 2.增加禁止拖动手势api
22 |
23 | 2016.05.27 -- 新增纯文字轮播、增加viewController在来回push时候出现的图片卡在中间的解决方案“解决viewWillAppear时出现时轮播图卡在一半的问题,在控制器viewWillAppear时调用 adjustWhenControllerViewWillAppera”
24 |
25 | 2016.04.21 -- 修复自定义图片的pagecontrol刷新图片数据时崩溃bug;设置单张图片时停止轮播
26 |
27 | 2016.03.31 -- 增加垂直方向滚动功能
28 |
29 | 2016.01.21 -- 修复加载时出现item size zero提示问题
30 |
31 | 2016.01.15 -- 兼容assets存放的本地图片
32 |
33 | 2016.01.06 -- 0.图片管理使用SDWebImage;1.优化内存,提升性能;2.添加图片contentmode接口;3.block监听点击接口;4.滚动到某张图片监听;5.增加自定义图片pageControl接口;6.其他等等。其中有一处接口改动:pagecontrol的小圆点自定义接口改为:currentPageDotColor、pageDotColor、currentPageDotImage、pageDotImage。
34 |
35 |
36 | ### 无限循环自动图片轮播器(一步设置即可使用)
37 |
38 | // 网络加载图片的轮播器
39 | SDCycleScrollView *cycleScrollView = [cycleScrollViewWithFrame:frame delegate:delegate placeholderImage:placeholderImage];
40 | cycleScrollView.imageURLStringsGroup = imagesURLStrings;
41 |
42 | // 本地加载图片的轮播器
43 | SDCycleScrollView *cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame: imagesGroup:图片数组];
44 |
45 |
46 | ---------------------------------------------------------------------------------------------------------------
47 |
48 | ## Q&A:
49 | ### 为什么我用这个轮播期会在顶部出现一块空白区域
50 | 以下是本库的使用者给出的一些解决方法放在这里供大家参考:
51 | 在iOS 7以后,controller 会对其中唯一的scrollView或其子类调整内边距,从而导致位置不准确。设置self.automaticallyAdjustsScrollViewInsets = NO;或者controller中放置不止一个scrollView或其子类时,就不会出现这种问题。以上原因是我的猜测,只要我设置了 self.automaticallyAdjustsScrollViewInsets = NO就没有那个问题了。
52 |
53 | #PS:
54 |
55 | 如需更详细的设置,参考如下:
56 |
57 | 1. cycleScrollView.pageControlAliment = SDCycleScrollViewPageContolAlimentRight; // 设置pageControl居右,默认居中
58 |
59 | 2. cycleScrollView.titlesGroup = 标题数组(数组元素个数必须和图片数组元素个数保持一致); // 如果设置title数组,则会在图片下面添加标题
60 |
61 | 3. cycleScrollView.delegate = ; // 如需监听图片点击,请设置代理,实现代理方法
62 |
63 | 4. cycleScrollView.autoScrollTimeInterval = ;// 自定义轮播时间间隔
64 |
65 | 
66 |
67 | 
68 |
--------------------------------------------------------------------------------
/SDCycleScrollView.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 |
3 | s.name = "SDCycleScrollView"
4 | s.version = "1.82"
5 | s.summary = "简单易用的图片无限轮播器. 1.82版本更新内容:修复iOS14上系统自带pagecontrol显示不出来bug"
6 |
7 | s.homepage = "https://github.com/gsdios/SDCycleScrollView"
8 |
9 | s.license = "MIT"
10 |
11 | s.author = { "GSD_iOS" => "gsdios@126.com" }
12 |
13 | s.platform = :ios
14 | s.platform = :ios, "8.0"
15 |
16 |
17 | s.source = { :git => "https://github.com/gsdios/SDCycleScrollView.git", :tag => s.version}
18 |
19 |
20 | s.source_files = "SDCycleScrollView/Lib/SDCycleScrollView/**/*.{h,m}"
21 |
22 |
23 | s.requires_arc = true
24 |
25 |
26 | s.dependency 'SDWebImage', '>= 5.0.0'
27 |
28 | end
29 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/project.xcworkspace/xcshareddata/SDCycleScrollView.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | AE2B2E80-7904-4B88-BA67-B5BBE7203485
9 | IDESourceControlProjectName
10 | SDCycleScrollView
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | FD1D6F72BD49749DB0C6DCC5777E0D807A77ABAF
14 | https://github.com/gsdios/SDCycleScrollView.git
15 |
16 | IDESourceControlProjectPath
17 | SDCycleScrollView.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | FD1D6F72BD49749DB0C6DCC5777E0D807A77ABAF
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/gsdios/SDCycleScrollView.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | FD1D6F72BD49749DB0C6DCC5777E0D807A77ABAF
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | FD1D6F72BD49749DB0C6DCC5777E0D807A77ABAF
36 | IDESourceControlWCCName
37 | SDCycleScrollView
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/aier.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/aier.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/aier.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/gaoshaodong.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/gaoshaodong.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/gsd.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/gsd.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/sky.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/sky.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/xcuserdata/aier.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/xcuserdata/aier.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SDCycleScrollView.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9900D16D1ABEB2490077A6CB
16 |
17 | primary
18 |
19 |
20 | 9900D1861ABEB2490077A6CB
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/xcuserdata/gaoshaodong.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SDCycleScrollView.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9900D16D1ABEB2490077A6CB
16 |
17 | primary
18 |
19 |
20 | 9900D1861ABEB2490077A6CB
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/xcuserdata/gsd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/xcuserdata/gsd.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SDCycleScrollView.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9900D16D1ABEB2490077A6CB
16 |
17 | primary
18 |
19 |
20 | 9900D1861ABEB2490077A6CB
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/xcuserdata/sky.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcodeproj/xcuserdata/sky.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SDCycleScrollView.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9900D16D1ABEB2490077A6CB
16 |
17 | primary
18 |
19 |
20 | 9900D1861ABEB2490077A6CB
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SDCycleScrollView.xcworkspace/xcuserdata/gaoshaodong.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView.xcworkspace/xcuserdata/gaoshaodong.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/SDCycleScrollView.xcworkspace/xcuserdata/gaoshaodong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
20 |
21 |
22 |
24 |
36 |
37 |
38 |
40 |
52 |
53 |
54 |
56 |
68 |
69 |
70 |
72 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/SDCycleScrollView/005.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/005.jpg
--------------------------------------------------------------------------------
/SDCycleScrollView/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // SDCycleScrollView
4 | //
5 | // Created by aier on 15-3-22.
6 | // Copyright (c) 2015年 GSD. All rights reserved.
7 | //
8 |
9 | /*
10 |
11 | *********************************************************************************
12 | *
13 | * 🌟🌟🌟 新建SDCycleScrollView交流QQ群:185534916 🌟🌟🌟
14 | *
15 | * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
16 | * 帮您解决问题。
17 | * 新浪微博:GSD_iOS
18 | * Email : gsdios@126.com
19 | * GitHub: https://github.com/gsdios
20 | *
21 | * 另(我的自动布局库SDAutoLayout):
22 | * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
23 | * 做最简单易用的AutoLayout库。
24 | * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
25 | * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
26 | * GitHub:https://github.com/gsdios/SDAutoLayout
27 | *********************************************************************************
28 |
29 | */
30 |
31 | #import
32 |
33 | @interface AppDelegate : UIResponder
34 |
35 | @property (strong, nonatomic) UIWindow *window;
36 |
37 |
38 | @end
39 |
40 |
--------------------------------------------------------------------------------
/SDCycleScrollView/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // SDCycleScrollView
4 | //
5 | // Created by aier on 15-3-22.
6 | // Copyright (c) 2015年 GSD. All rights reserved.
7 | //
8 |
9 | /*
10 |
11 | *********************************************************************************
12 | *
13 | * 🌟🌟🌟 新建SDCycleScrollView交流QQ群:185534916 🌟🌟🌟
14 | *
15 | * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
16 | * 帮您解决问题。
17 | * 新浪微博:GSD_iOS
18 | * Email : gsdios@126.com
19 | * GitHub: https://github.com/gsdios
20 | *
21 | * 另(我的自动布局库SDAutoLayout):
22 | * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
23 | * 做最简单易用的AutoLayout库。
24 | * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
25 | * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
26 | * GitHub:https://github.com/gsdios/SDAutoLayout
27 | *********************************************************************************
28 |
29 | */
30 |
31 | #import "AppDelegate.h"
32 | #import "ViewController.h"
33 |
34 |
35 | @interface AppDelegate ()
36 |
37 | @end
38 |
39 | @implementation AppDelegate
40 |
41 |
42 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
43 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
44 | self.window.backgroundColor = [UIColor whiteColor];
45 |
46 | self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] init]];
47 |
48 | [self.window makeKeyAndVisible];
49 | return YES;
50 | }
51 |
52 | - (void)applicationWillResignActive:(UIApplication *)application {
53 | // 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.
54 | // 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.
55 | }
56 |
57 | - (void)applicationDidEnterBackground:(UIApplication *)application {
58 | // 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.
59 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
60 | }
61 |
62 | - (void)applicationWillEnterForeground:(UIApplication *)application {
63 | // 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.
64 | }
65 |
66 | - (void)applicationDidBecomeActive:(UIApplication *)application {
67 | // 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.
68 | }
69 |
70 | - (void)applicationWillTerminate:(UIApplication *)application {
71 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
72 | }
73 |
74 | @end
75 |
--------------------------------------------------------------------------------
/SDCycleScrollView/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 |
--------------------------------------------------------------------------------
/SDCycleScrollView/CustomCollectionViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CustomCollectionViewCell.h
3 | // SDCycleScrollView
4 | //
5 | // Created by 高少东 on 2017/6/24.
6 | // Copyright © 2017年 GSD. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CustomCollectionViewCell : UICollectionViewCell
12 |
13 | @property (nonatomic, strong) UIImageView *imageView;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/SDCycleScrollView/CustomCollectionViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CustomCollectionViewCell.m
3 | // SDCycleScrollView
4 | //
5 | // Created by 高少东 on 2017/6/24.
6 | // Copyright © 2017年 GSD. All rights reserved.
7 | //
8 |
9 | #import "CustomCollectionViewCell.h"
10 | #import "UIView+SDExtension.h"
11 |
12 | @implementation CustomCollectionViewCell
13 |
14 | - (instancetype)initWithFrame:(CGRect)frame
15 | {
16 | if (self = [super initWithFrame:frame]) {
17 | [self setupViews];
18 | }
19 | return self;
20 | }
21 |
22 | - (void)setupViews
23 | {
24 | self.contentView.backgroundColor = [UIColor whiteColor];
25 |
26 | _imageView = [UIImageView new];
27 | _imageView.layer.borderColor = [[UIColor redColor] CGColor];
28 | _imageView.layer.borderWidth = 2;
29 | [self.contentView addSubview:_imageView];
30 | }
31 |
32 | - (void)layoutSubviews
33 | {
34 | [super layoutSubviews];
35 |
36 | _imageView.frame = self.bounds;
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/SDCycleScrollView/DemoVC/xib的demo/DemoVCWithXib.h:
--------------------------------------------------------------------------------
1 | //
2 | // DemoVCWithXib.h
3 | // SDCycleScrollView
4 | //
5 | // Created by gsd on 15/12/3.
6 | // Copyright © 2015年 GSD. All rights reserved.
7 | //
8 |
9 | /*
10 |
11 | *********************************************************************************
12 | *
13 | * 🌟🌟🌟 新建SDCycleScrollView交流QQ群:185534916 🌟🌟🌟
14 | *
15 | * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
16 | * 帮您解决问题。
17 | * 新浪微博:GSD_iOS
18 | * Email : gsdios@126.com
19 | * GitHub: https://github.com/gsdios
20 | *
21 | * 另(我的自动布局库SDAutoLayout):
22 | * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
23 | * 做最简单易用的AutoLayout库。
24 | * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
25 | * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
26 | * GitHub:https://github.com/gsdios/SDAutoLayout
27 | *********************************************************************************
28 |
29 | */
30 |
31 | #import
32 |
33 | @interface DemoVCWithXib : UIViewController
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/SDCycleScrollView/DemoVC/xib的demo/DemoVCWithXib.m:
--------------------------------------------------------------------------------
1 | //
2 | // DemoVCWithXib.m
3 | // SDCycleScrollView
4 | //
5 | // Created by gsd on 15/12/3.
6 | // Copyright © 2015年 GSD. All rights reserved.
7 | //
8 |
9 | /*
10 |
11 | *********************************************************************************
12 | *
13 | * 🌟🌟🌟 新建SDCycleScrollView交流QQ群:185534916 🌟🌟🌟
14 | *
15 | * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
16 | * 帮您解决问题。
17 | * 新浪微博:GSD_iOS
18 | * Email : gsdios@126.com
19 | * GitHub: https://github.com/gsdios
20 | *
21 | * 另(我的自动布局库SDAutoLayout):
22 | * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
23 | * 做最简单易用的AutoLayout库。
24 | * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
25 | * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
26 | * GitHub:https://github.com/gsdios/SDAutoLayout
27 | *********************************************************************************
28 |
29 | */
30 |
31 | #import "DemoVCWithXib.h"
32 | #import "SDCycleScrollView.h"
33 |
34 | @interface DemoVCWithXib ()
35 |
36 | @property (weak, nonatomic) IBOutlet SDCycleScrollView *bannerView;
37 | @end
38 |
39 | @implementation DemoVCWithXib
40 |
41 | - (void)viewDidLoad {
42 | [super viewDidLoad];
43 |
44 | self.edgesForExtendedLayout = UIRectEdgeNone;
45 |
46 | NSArray *imagesURLStrings = @[
47 | @"https://ss2.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy/super/whfpf%3D425%2C260%2C50/sign=a4b3d7085dee3d6d2293d48b252b5910/0e2442a7d933c89524cd5cd4d51373f0830200ea.jpg",
48 | @"https://ss0.baidu.com/-Po3dSag_xI4khGko9WTAnF6hhy/super/whfpf%3D425%2C260%2C50/sign=a41eb338dd33c895a62bcb3bb72e47c2/5fdf8db1cb134954a2192ccb524e9258d1094a1e.jpg",
49 | @"http://c.hiphotos.baidu.com/image/w%3D400/sign=c2318ff84334970a4773112fa5c8d1c0/b7fd5266d0160924c1fae5ccd60735fae7cd340d.jpg"
50 | ];
51 |
52 | // 图片配文字
53 | NSArray *titles = @[@"感谢您的支持,如果下载的",
54 | @"如果代码在使用过程中出现问题",
55 | @"您可以发邮件到gsdios@126.com",
56 | @"感谢您的支持"
57 | ];
58 |
59 |
60 | self.bannerView.imageURLStringsGroup = imagesURLStrings;
61 | self.bannerView.pageControlAliment = SDCycleScrollViewPageContolAlimentRight;
62 | self.bannerView.delegate = self;
63 | self.bannerView.titlesGroup = titles;
64 | self.bannerView.currentPageDotColor = [UIColor yellowColor]; // 自定义分页控件小圆标颜色
65 | self.bannerView.placeholderImage = [UIImage imageNamed:@"placeholder"];
66 |
67 |
68 |
69 | SDCycleScrollView *banner2 = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 200, [UIScreen mainScreen].bounds.size.width, 140) delegate:nil placeholderImage:nil];
70 | banner2.pageControlAliment = SDCycleScrollViewPageContolAlimentRight;
71 | banner2.imageURLStringsGroup = imagesURLStrings;
72 | banner2.titlesGroup = titles;
73 | [self.view addSubview:banner2];
74 |
75 | }
76 |
77 |
78 | #pragma mark - SDCycleScrollViewDelegate
79 |
80 | - (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index
81 | {
82 |
83 | }
84 |
85 | - (void)didReceiveMemoryWarning {
86 | [super didReceiveMemoryWarning];
87 | // Dispose of any resources that can be recreated.
88 | }
89 |
90 | - (void)dealloc
91 | {
92 |
93 | }
94 |
95 | @end
96 |
--------------------------------------------------------------------------------
/SDCycleScrollView/DemoVC/xib的demo/DemoVCWithXib.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/SDCycleScrollView/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 | }
--------------------------------------------------------------------------------
/SDCycleScrollView/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/SDCycleScrollView/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "minimum-system-version" : "7.0",
7 | "scale" : "2x"
8 | },
9 | {
10 | "orientation" : "portrait",
11 | "idiom" : "iphone",
12 | "minimum-system-version" : "7.0",
13 | "subtype" : "retina4",
14 | "scale" : "2x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/SDCycleScrollView/Images.xcassets/h6.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "h6@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/SDCycleScrollView/Images.xcassets/h6.imageset/h6@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/Images.xcassets/h6.imageset/h6@2x.png
--------------------------------------------------------------------------------
/SDCycleScrollView/Images.xcassets/h7.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "h7.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/SDCycleScrollView/Images.xcassets/h7.imageset/h7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/Images.xcassets/h7.imageset/h7.png
--------------------------------------------------------------------------------
/SDCycleScrollView/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | -.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | NSAppTransportSecurity
38 |
39 | NSAllowsArbitraryLoads
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/PageControl/TAAbstractDotView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TAAbstractDotView.h
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface TAAbstractDotView : UIView
13 |
14 |
15 | /**
16 | * A method call let view know which state appearance it should take. Active meaning it's current page. Inactive not the current page.
17 | *
18 | * @param active BOOL to tell if view is active or not
19 | */
20 | - (void)changeActivityState:(BOOL)active;
21 |
22 |
23 | @end
24 |
25 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/PageControl/TAAbstractDotView.m:
--------------------------------------------------------------------------------
1 | //
2 | // TAAbstractDotView.m
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import "TAAbstractDotView.h"
10 |
11 |
12 | @implementation TAAbstractDotView
13 |
14 |
15 | - (id)init
16 | {
17 | @throw [NSException exceptionWithName:NSInternalInconsistencyException
18 | reason:[NSString stringWithFormat:@"You must override %@ in %@", NSStringFromSelector(_cmd), self.class]
19 | userInfo:nil];
20 | }
21 |
22 |
23 | - (void)changeActivityState:(BOOL)active
24 | {
25 | @throw [NSException exceptionWithName:NSInternalInconsistencyException
26 | reason:[NSString stringWithFormat:@"You must override %@ in %@", NSStringFromSelector(_cmd), self.class]
27 | userInfo:nil];
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/PageControl/TAAnimatedDotView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TAAnimatedDotView.h
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import "TAAbstractDotView.h"
10 |
11 | @interface TAAnimatedDotView : TAAbstractDotView
12 |
13 | @property (nonatomic, strong) UIColor *dotColor;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/PageControl/TAAnimatedDotView.m:
--------------------------------------------------------------------------------
1 | //
2 | // TAAnimatedDotView.m
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import "TAAnimatedDotView.h"
10 |
11 | static CGFloat const kAnimateDuration = 1;
12 |
13 | @implementation TAAnimatedDotView
14 |
15 | - (instancetype)init
16 | {
17 | self = [super init];
18 | if (self) {
19 | [self initialization];
20 | }
21 |
22 | return self;
23 | }
24 |
25 |
26 | - (id)initWithFrame:(CGRect)frame
27 | {
28 | self = [super initWithFrame:frame];
29 | if (self) {
30 | [self initialization];
31 | }
32 | return self;
33 | }
34 |
35 |
36 | - (id)initWithCoder:(NSCoder *)aDecoder
37 | {
38 | self = [super initWithCoder:aDecoder];
39 | if (self) {
40 | [self initialization];
41 | }
42 |
43 | return self;
44 | }
45 |
46 | - (void)setDotColor:(UIColor *)dotColor
47 | {
48 | _dotColor = dotColor;
49 | self.layer.borderColor = dotColor.CGColor;
50 | }
51 |
52 | - (void)initialization
53 | {
54 | _dotColor = [UIColor whiteColor];
55 | self.backgroundColor = [UIColor clearColor];
56 | self.layer.cornerRadius = CGRectGetWidth(self.frame) / 2;
57 | self.layer.borderColor = [UIColor whiteColor].CGColor;
58 | self.layer.borderWidth = 2;
59 | }
60 |
61 |
62 | - (void)changeActivityState:(BOOL)active
63 | {
64 | if (active) {
65 | [self animateToActiveState];
66 | } else {
67 | [self animateToDeactiveState];
68 | }
69 | }
70 |
71 |
72 | - (void)animateToActiveState
73 | {
74 | [UIView animateWithDuration:kAnimateDuration delay:0 usingSpringWithDamping:.5 initialSpringVelocity:-20 options:UIViewAnimationOptionCurveLinear animations:^{
75 | self.backgroundColor = self->_dotColor;
76 | self.transform = CGAffineTransformMakeScale(1.4, 1.4);
77 | } completion:nil];
78 | }
79 |
80 | - (void)animateToDeactiveState
81 | {
82 | [UIView animateWithDuration:kAnimateDuration delay:0 usingSpringWithDamping:.5 initialSpringVelocity:0 options:UIViewAnimationOptionCurveLinear animations:^{
83 | self.backgroundColor = [UIColor clearColor];
84 | self.transform = CGAffineTransformIdentity;
85 | } completion:nil];
86 | }
87 |
88 | @end
89 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/PageControl/TADotView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TADotView.h
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import "TAAbstractDotView.h"
10 |
11 | @interface TADotView : TAAbstractDotView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/PageControl/TADotView.m:
--------------------------------------------------------------------------------
1 | //
2 | // TADotView.m
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import "TADotView.h"
10 |
11 | @implementation TADotView
12 |
13 |
14 | - (instancetype)init
15 | {
16 | self = [super init];
17 | if (self) {
18 | [self initialization];
19 | }
20 |
21 | return self;
22 | }
23 |
24 |
25 | - (id)initWithFrame:(CGRect)frame
26 | {
27 | self = [super initWithFrame:frame];
28 | if (self) {
29 | [self initialization];
30 | }
31 | return self;
32 | }
33 |
34 |
35 | - (id)initWithCoder:(NSCoder *)aDecoder
36 | {
37 | self = [super initWithCoder:aDecoder];
38 | if (self) {
39 | [self initialization];
40 | }
41 |
42 | return self;
43 | }
44 |
45 | - (void)initialization
46 | {
47 | self.backgroundColor = [UIColor clearColor];
48 | self.layer.cornerRadius = CGRectGetWidth(self.frame) / 2;
49 | self.layer.borderColor = [UIColor whiteColor].CGColor;
50 | self.layer.borderWidth = 2;
51 | }
52 |
53 |
54 | - (void)changeActivityState:(BOOL)active
55 | {
56 | if (active) {
57 | self.backgroundColor = [UIColor whiteColor];
58 | } else {
59 | self.backgroundColor = [UIColor clearColor];
60 | }
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/PageControl/TAPageControl.h:
--------------------------------------------------------------------------------
1 | //
2 | // TAPageControl.h
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-21.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol TAPageControlDelegate;
12 |
13 |
14 | @interface TAPageControl : UIControl
15 |
16 |
17 | /**
18 | * Dot view customization properties
19 | */
20 |
21 | /**
22 | * The Class of your custom UIView, make sure to respect the TAAbstractDotView class.
23 | */
24 | @property (nonatomic) Class dotViewClass;
25 |
26 |
27 | /**
28 | * UIImage to represent a dot.
29 | */
30 | @property (nonatomic) UIImage *dotImage;
31 |
32 |
33 | /**
34 | * UIImage to represent current page dot.
35 | */
36 | @property (nonatomic) UIImage *currentDotImage;
37 |
38 |
39 | /**
40 | * Dot size for dot views. Default is 8 by 8.
41 | */
42 | @property (nonatomic) CGSize dotSize;
43 |
44 |
45 | @property (nonatomic, strong) UIColor *dotColor;
46 |
47 | /**
48 | * Spacing between two dot views. Default is 8.
49 | */
50 | @property (nonatomic) NSInteger spacingBetweenDots;
51 |
52 |
53 | /**
54 | * Page control setup properties
55 | */
56 |
57 |
58 | /**
59 | * Delegate for TAPageControl
60 | */
61 | @property(nonatomic,assign) id delegate;
62 |
63 |
64 | /**
65 | * Number of pages for control. Default is 0.
66 | */
67 | @property (nonatomic) NSInteger numberOfPages;
68 |
69 |
70 | /**
71 | * Current page on which control is active. Default is 0.
72 | */
73 | @property (nonatomic) NSInteger currentPage;
74 |
75 |
76 | /**
77 | * Hide the control if there is only one page. Default is NO.
78 | */
79 | @property (nonatomic) BOOL hidesForSinglePage;
80 |
81 |
82 | /**
83 | * Let the control know if should grow bigger by keeping center, or just get longer (right side expanding). By default YES.
84 | */
85 | @property (nonatomic) BOOL shouldResizeFromCenter;
86 |
87 |
88 | /**
89 | * Return the minimum size required to display control properly for the given page count.
90 | *
91 | * @param pageCount Number of dots that will require display
92 | *
93 | * @return The CGSize being the minimum size required.
94 | */
95 | - (CGSize)sizeForNumberOfPages:(NSInteger)pageCount;
96 |
97 |
98 | @end
99 |
100 |
101 | @protocol TAPageControlDelegate
102 |
103 | @optional
104 | - (void)TAPageControl:(TAPageControl *)pageControl didSelectPageAtIndex:(NSInteger)index;
105 |
106 | @end
107 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/SDCollectionViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // SDCollectionViewCell.h
3 | // SDCycleScrollView
4 | //
5 | // Created by aier on 15-3-22.
6 | // Copyright (c) 2015年 GSD. All rights reserved.
7 | //
8 |
9 | /*
10 |
11 | *********************************************************************************
12 | *
13 | * 🌟🌟🌟 新建SDCycleScrollView交流QQ群:185534916 🌟🌟🌟
14 | *
15 | * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
16 | * 帮您解决问题。
17 | * 新浪微博:GSD_iOS
18 | * Email : gsdios@126.com
19 | * GitHub: https://github.com/gsdios
20 | *
21 | * 另(我的自动布局库SDAutoLayout):
22 | * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
23 | * 做最简单易用的AutoLayout库。
24 | * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
25 | * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
26 | * GitHub:https://github.com/gsdios/SDAutoLayout
27 | *********************************************************************************
28 |
29 | */
30 |
31 |
32 |
33 | #import
34 |
35 | @interface SDCollectionViewCell : UICollectionViewCell
36 |
37 | @property (weak, nonatomic) UIImageView *imageView;
38 | @property (copy, nonatomic) NSString *title;
39 |
40 | @property (nonatomic, strong) UIColor *titleLabelTextColor;
41 | @property (nonatomic, strong) UIFont *titleLabelTextFont;
42 | @property (nonatomic, strong) UIColor *titleLabelBackgroundColor;
43 | @property (nonatomic, assign) CGFloat titleLabelHeight;
44 | @property (nonatomic, assign) NSTextAlignment titleLabelTextAlignment;
45 |
46 | @property (nonatomic, assign) BOOL hasConfigured;
47 |
48 | /** 只展示文字轮播 */
49 | @property (nonatomic, assign) BOOL onlyDisplayText;
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/SDCollectionViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // SDCollectionViewCell.m
3 | // SDCycleScrollView
4 | //
5 | // Created by aier on 15-3-22.
6 | // Copyright (c) 2015年 GSD. All rights reserved.
7 | //
8 |
9 |
10 | /*
11 |
12 | *********************************************************************************
13 | *
14 | * 🌟🌟🌟 新建SDCycleScrollView交流QQ群:185534916 🌟🌟🌟
15 | *
16 | * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
17 | * 帮您解决问题。
18 | * 新浪微博:GSD_iOS
19 | * Email : gsdios@126.com
20 | * GitHub: https://github.com/gsdios
21 | *
22 | * 另(我的自动布局库SDAutoLayout):
23 | * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
24 | * 做最简单易用的AutoLayout库。
25 | * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
26 | * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
27 | * GitHub:https://github.com/gsdios/SDAutoLayout
28 | *********************************************************************************
29 |
30 | */
31 |
32 |
33 | #import "SDCollectionViewCell.h"
34 | #import "UIView+SDExtension.h"
35 |
36 | @implementation SDCollectionViewCell
37 | {
38 | __weak UILabel *_titleLabel;
39 | }
40 |
41 |
42 | - (instancetype)initWithFrame:(CGRect)frame
43 | {
44 | if (self = [super initWithFrame:frame]) {
45 | [self setupImageView];
46 | [self setupTitleLabel];
47 | }
48 |
49 | return self;
50 | }
51 |
52 | - (void)setTitleLabelBackgroundColor:(UIColor *)titleLabelBackgroundColor
53 | {
54 | _titleLabelBackgroundColor = titleLabelBackgroundColor;
55 | _titleLabel.backgroundColor = titleLabelBackgroundColor;
56 | }
57 |
58 | - (void)setTitleLabelTextColor:(UIColor *)titleLabelTextColor
59 | {
60 | _titleLabelTextColor = titleLabelTextColor;
61 | _titleLabel.textColor = titleLabelTextColor;
62 | }
63 |
64 | - (void)setTitleLabelTextFont:(UIFont *)titleLabelTextFont
65 | {
66 | _titleLabelTextFont = titleLabelTextFont;
67 | _titleLabel.font = titleLabelTextFont;
68 | }
69 |
70 | - (void)setupImageView
71 | {
72 | UIImageView *imageView = [[UIImageView alloc] init];
73 | _imageView = imageView;
74 | [self.contentView addSubview:imageView];
75 | }
76 |
77 | - (void)setupTitleLabel
78 | {
79 | UILabel *titleLabel = [[UILabel alloc] init];
80 | _titleLabel = titleLabel;
81 | _titleLabel.hidden = YES;
82 | [self.contentView addSubview:titleLabel];
83 | }
84 |
85 | - (void)setTitle:(NSString *)title
86 | {
87 | _title = [title copy];
88 | _titleLabel.text = [NSString stringWithFormat:@" %@", title];
89 | if (_titleLabel.hidden) {
90 | _titleLabel.hidden = NO;
91 | }
92 | }
93 |
94 | -(void)setTitleLabelTextAlignment:(NSTextAlignment)titleLabelTextAlignment
95 | {
96 | _titleLabelTextAlignment = titleLabelTextAlignment;
97 | _titleLabel.textAlignment = titleLabelTextAlignment;
98 | }
99 |
100 | - (void)layoutSubviews
101 | {
102 | [super layoutSubviews];
103 |
104 | if (self.onlyDisplayText) {
105 | _titleLabel.frame = self.bounds;
106 | } else {
107 | _imageView.frame = self.bounds;
108 | CGFloat titleLabelW = self.sd_width;
109 | CGFloat titleLabelH = _titleLabelHeight;
110 | CGFloat titleLabelX = 0;
111 | CGFloat titleLabelY = self.sd_height - titleLabelH;
112 | _titleLabel.frame = CGRectMake(titleLabelX, titleLabelY, titleLabelW, titleLabelH);
113 | }
114 | }
115 |
116 | @end
117 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/UIView+SDExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+SDExtension.h
3 | // SDRefreshView
4 | //
5 | // Created by aier on 15-2-23.
6 | // Copyright (c) 2015年 GSD. All rights reserved.
7 | //
8 |
9 | /*
10 |
11 | *********************************************************************************
12 | *
13 | * 🌟🌟🌟 新建SDCycleScrollView交流QQ群:185534916 🌟🌟🌟
14 | *
15 | * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
16 | * 帮您解决问题。
17 | * 新浪微博:GSD_iOS
18 | * Email : gsdios@126.com
19 | * GitHub: https://github.com/gsdios
20 | *
21 | * 另(我的自动布局库SDAutoLayout):
22 | * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
23 | * 做最简单易用的AutoLayout库。
24 | * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
25 | * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
26 | * GitHub:https://github.com/gsdios/SDAutoLayout
27 | *********************************************************************************
28 |
29 | */
30 |
31 | #import
32 |
33 | #define SDColorCreater(r, g, b, a) [UIColor colorWithRed:(r / 255.0) green:(g / 255.0) blue:(b / 255.0) alpha:a]
34 |
35 |
36 | @interface UIView (SDExtension)
37 |
38 | @property (nonatomic, assign) CGFloat sd_height;
39 | @property (nonatomic, assign) CGFloat sd_width;
40 |
41 | @property (nonatomic, assign) CGFloat sd_y;
42 | @property (nonatomic, assign) CGFloat sd_x;
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/SDCycleScrollView/Lib/SDCycleScrollView/UIView+SDExtension.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+SDExtension.m
3 | // SDRefreshView
4 | //
5 | // Created by aier on 15-2-23.
6 | // Copyright (c) 2015年 GSD. All rights reserved.
7 | //
8 |
9 | /*
10 |
11 | *********************************************************************************
12 | *
13 | * 🌟🌟🌟 新建SDCycleScrollView交流QQ群:185534916 🌟🌟🌟
14 | *
15 | * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
16 | * 帮您解决问题。
17 | * 新浪微博:GSD_iOS
18 | * Email : gsdios@126.com
19 | * GitHub: https://github.com/gsdios
20 | *
21 | * 另(我的自动布局库SDAutoLayout):
22 | * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
23 | * 做最简单易用的AutoLayout库。
24 | * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
25 | * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
26 | * GitHub:https://github.com/gsdios/SDAutoLayout
27 | *********************************************************************************
28 |
29 | */
30 |
31 | /*
32 |
33 | *********************************************************************************
34 | *
35 | * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
36 | * 帮您解决问题。
37 | * 新浪微博:GSD_iOS
38 | * Email : gsdios@126.com
39 | * GitHub: https://github.com/gsdios
40 | *
41 | * 另(我的自动布局库SDAutoLayout):
42 | * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
43 | * 做最简单易用的AutoLayout库。
44 | * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
45 | * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
46 | * GitHub:https://github.com/gsdios/SDAutoLayout
47 | *********************************************************************************
48 |
49 | */
50 |
51 |
52 | #import "UIView+SDExtension.h"
53 |
54 | @implementation UIView (SDExtension)
55 |
56 | - (CGFloat)sd_height
57 | {
58 | return self.frame.size.height;
59 | }
60 |
61 | - (void)setSd_height:(CGFloat)sd_height
62 | {
63 | CGRect temp = self.frame;
64 | temp.size.height = sd_height;
65 | self.frame = temp;
66 | }
67 |
68 | - (CGFloat)sd_width
69 | {
70 | return self.frame.size.width;
71 | }
72 |
73 | - (void)setSd_width:(CGFloat)sd_width
74 | {
75 | CGRect temp = self.frame;
76 | temp.size.width = sd_width;
77 | self.frame = temp;
78 | }
79 |
80 |
81 | - (CGFloat)sd_y
82 | {
83 | return self.frame.origin.y;
84 | }
85 |
86 | - (void)setSd_y:(CGFloat)sd_y
87 | {
88 | CGRect temp = self.frame;
89 | temp.origin.y = sd_y;
90 | self.frame = temp;
91 | }
92 |
93 | - (CGFloat)sd_x
94 | {
95 | return self.frame.origin.x;
96 | }
97 |
98 | - (void)setSd_x:(CGFloat)sd_x
99 | {
100 | CGRect temp = self.frame;
101 | temp.origin.x = sd_x;
102 | self.frame = temp;
103 | }
104 |
105 |
106 |
107 | @end
108 |
--------------------------------------------------------------------------------
/SDCycleScrollView/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // SDCycleScrollView
4 | //
5 | // Created by aier on 15-3-22.
6 | // Copyright (c) 2015年 GSD. All rights reserved.
7 | //
8 |
9 | /*
10 |
11 | *********************************************************************************
12 | *
13 | * 🌟🌟🌟 新建SDCycleScrollView交流QQ群:185534916 🌟🌟🌟
14 | *
15 | * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
16 | * 帮您解决问题。
17 | * 新浪微博:GSD_iOS
18 | * Email : gsdios@126.com
19 | * GitHub: https://github.com/gsdios
20 | *
21 | * 另(我的自动布局库SDAutoLayout):
22 | * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
23 | * 做最简单易用的AutoLayout库。
24 | * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
25 | * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
26 | * GitHub:https://github.com/gsdios/SDAutoLayout
27 | *********************************************************************************
28 |
29 | */
30 |
31 | #import
32 |
33 | @interface ViewController : UIViewController
34 |
35 |
36 | @end
37 |
38 |
--------------------------------------------------------------------------------
/SDCycleScrollView/h1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/h1.jpg
--------------------------------------------------------------------------------
/SDCycleScrollView/h2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/h2.jpg
--------------------------------------------------------------------------------
/SDCycleScrollView/h3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/h3.jpg
--------------------------------------------------------------------------------
/SDCycleScrollView/h4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/h4.jpg
--------------------------------------------------------------------------------
/SDCycleScrollView/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // SDCycleScrollView
4 | //
5 | // Created by aier on 15-3-22.
6 | // Copyright (c) 2015年 GSD. 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 |
--------------------------------------------------------------------------------
/SDCycleScrollView/pageControlCurrentDot@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/pageControlCurrentDot@2x.png
--------------------------------------------------------------------------------
/SDCycleScrollView/pageControlCurrentDot@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/pageControlCurrentDot@3x.png
--------------------------------------------------------------------------------
/SDCycleScrollView/pageControlDot@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/pageControlDot@2x.png
--------------------------------------------------------------------------------
/SDCycleScrollView/pageControlDot@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/pageControlDot@3x.png
--------------------------------------------------------------------------------
/SDCycleScrollView/placeholder@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/SDCycleScrollView/placeholder@2x.png
--------------------------------------------------------------------------------
/SDCycleScrollViewTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | -.$(PRODUCT_NAME:rfc1034identifier)
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 |
--------------------------------------------------------------------------------
/SDCycleScrollViewTests/SDCycleScrollViewTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SDCycleScrollViewTests.m
3 | // SDCycleScrollViewTests
4 | //
5 | // Created by aier on 15-3-22.
6 | // Copyright (c) 2015年 GSD. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface SDCycleScrollViewTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation SDCycleScrollViewTests
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 |
--------------------------------------------------------------------------------
/qrcode_for_gh_a69e5c4e13c4_430.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gsdios/SDCycleScrollView/f618f4655f69c1d2b455170dc6ef39603f521aee/qrcode_for_gh_a69e5c4e13c4_430.jpg
--------------------------------------------------------------------------------