├── Pods ├── Target Support Files │ ├── Alamofire │ │ ├── Alamofire.modulemap │ │ ├── Alamofire-dummy.m │ │ ├── Alamofire-prefix.pch │ │ ├── Alamofire-umbrella.h │ │ ├── Alamofire.xcconfig │ │ ├── Info.plist │ │ └── Alamofire-Info.plist │ ├── SDWebImage │ │ ├── SDWebImage.modulemap │ │ ├── SDWebImage-dummy.m │ │ ├── SDWebImage-prefix.pch │ │ ├── SDWebImage.xcconfig │ │ ├── Info.plist │ │ ├── SDWebImage-Info.plist │ │ └── SDWebImage-umbrella.h │ ├── SwiftyJSON │ │ ├── SwiftyJSON.modulemap │ │ ├── SwiftyJSON-dummy.m │ │ ├── SwiftyJSON-prefix.pch │ │ ├── SwiftyJSON-umbrella.h │ │ ├── SwiftyJSON.xcconfig │ │ ├── Info.plist │ │ └── SwiftyJSON-Info.plist │ ├── ColorThiefSwift │ │ ├── ColorThiefSwift.modulemap │ │ ├── ColorThiefSwift-dummy.m │ │ ├── ColorThiefSwift-prefix.pch │ │ ├── ColorThiefSwift-umbrella.h │ │ ├── ColorThiefSwift.xcconfig │ │ ├── Info.plist │ │ └── ColorThiefSwift-Info.plist │ └── Pods-WhatFlower │ │ ├── Pods-WhatFlower.modulemap │ │ ├── Pods-WhatFlower-dummy.m │ │ ├── Pods-WhatFlower-umbrella.h │ │ ├── Info.plist │ │ ├── Pods-WhatFlower-Info.plist │ │ ├── Pods-WhatFlower.debug.xcconfig │ │ └── Pods-WhatFlower.release.xcconfig ├── SDWebImage │ ├── SDWebImage │ │ ├── Private │ │ │ ├── SDInternalMacros.m │ │ │ ├── SDDeviceHelper.h │ │ │ ├── UIColor+HexString.h │ │ │ ├── SDWeakProxy.h │ │ │ ├── SDImageIOAnimatedCoderInternal.h │ │ │ ├── SDAsyncBlockOperation.h │ │ │ ├── SDImageCachesManagerOperation.h │ │ │ ├── NSBezierPath+RoundedCorners.h │ │ │ ├── SDImageHEICCoderInternal.h │ │ │ ├── SDDeviceHelper.m │ │ │ ├── SDImageAssetManager.h │ │ │ ├── SDDisplayLink.h │ │ │ ├── UIColor+HexString.m │ │ │ ├── SDInternalMacros.h │ │ │ ├── SDAsyncBlockOperation.m │ │ │ ├── SDWeakProxy.m │ │ │ ├── NSBezierPath+RoundedCorners.m │ │ │ └── SDImageCachesManagerOperation.m │ │ └── Core │ │ │ ├── SDWebImageError.m │ │ │ ├── SDWebImageCompat.m │ │ │ ├── SDWebImageOperation.h │ │ │ ├── UIImage+GIF.m │ │ │ ├── SDImageAPNGCoder.h │ │ │ ├── SDImageCoder.m │ │ │ ├── SDImageFrame.m │ │ │ ├── UIImage+GIF.h │ │ │ ├── SDWebImageCacheKeyFilter.m │ │ │ ├── SDImageGIFCoder.h │ │ │ ├── SDWebImageCacheKeyFilter.h │ │ │ ├── SDWebImageCacheSerializer.m │ │ │ ├── SDWebImageDownloaderRequestModifier.m │ │ │ ├── SDImageHEICCoder.h │ │ │ ├── SDWebImageDownloaderResponseModifier.m │ │ │ ├── SDAnimatedImageRep.h │ │ │ ├── SDImageLoadersManager.h │ │ │ ├── SDImageFrame.h │ │ │ ├── SDWebImageCacheSerializer.h │ │ │ ├── SDImageIOCoder.h │ │ │ ├── UIImage+MemoryCacheCost.h │ │ │ ├── UIImage+ForceDecode.m │ │ │ ├── SDImageGraphics.h │ │ │ ├── SDImageGIFCoder.m │ │ │ ├── UIImage+MemoryCacheCost.m │ │ │ ├── UIImage+ForceDecode.h │ │ │ ├── SDWebImageDownloaderRequestModifier.h │ │ │ ├── SDWebImageDownloaderConfig.m │ │ │ ├── SDWebImageDownloaderResponseModifier.h │ │ │ ├── SDWebImageOptionsProcessor.m │ │ │ ├── UIView+WebCacheOperation.h │ │ │ ├── SDWebImageError.h │ │ │ ├── SDWebImageDownloaderDecryptor.m │ │ │ ├── NSData+ImageContentType.h │ │ │ ├── UIImage+MultiFormat.m │ │ │ ├── UIImage+Metadata.h │ │ │ ├── SDWebImageDownloaderDecryptor.h │ │ │ ├── SDImageAPNGCoder.m │ │ │ ├── SDImageCodersManager.h │ │ │ ├── SDWebImageCompat.h │ │ │ ├── SDImageCacheConfig.m │ │ │ ├── SDImageIOAnimatedCoder.h │ │ │ ├── SDWebImageOptionsProcessor.h │ │ │ ├── NSImage+Compatibility.h │ │ │ ├── SDMemoryCache.h │ │ │ ├── SDImageCachesManager.h │ │ │ ├── UIView+WebCacheOperation.m │ │ │ ├── SDImageCacheDefine.m │ │ │ ├── UIImage+MultiFormat.h │ │ │ ├── NSImage+Compatibility.m │ │ │ ├── UIImageView+WebCache.m │ │ │ ├── UIImageView+HighlightedWebCache.m │ │ │ ├── SDImageLoadersManager.m │ │ │ ├── SDWebImageIndicator.h │ │ │ ├── SDImageGraphics.m │ │ │ ├── SDAnimatedImageView+WebCache.m │ │ │ ├── SDWebImageDownloaderConfig.h │ │ │ ├── UIImage+Metadata.m │ │ │ ├── SDImageCodersManager.m │ │ │ ├── SDWebImageTransition.h │ │ │ └── SDDiskCache.h │ ├── LICENSE │ └── WebImage │ │ └── SDWebImage.h ├── Manifest.lock ├── ColorThiefSwift │ ├── LICENSE │ └── README.md ├── SwiftyJSON │ └── LICENSE └── Alamofire │ ├── LICENSE │ └── Source │ ├── DispatchQueue+Alamofire.swift │ └── Notifications.swift ├── WhatFlower ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Icon-1024.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-57x57@1x.png │ │ ├── Icon-App-57x57@2x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-72x72@1x.png │ │ ├── Icon-App-72x72@2x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ ├── Icon-Small-50x50@1x.png │ │ ├── Icon-Small-50x50@2x.png │ │ ├── Icon-App-83.5x83.5@2x.png │ │ └── Contents.json ├── Info.plist ├── Base.lproj │ └── LaunchScreen.storyboard └── AppDelegate.swift ├── WhatFlower.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Podfile └── Podfile.lock /Pods/Target Support Files/Alamofire/Alamofire.modulemap: -------------------------------------------------------------------------------- 1 | framework module Alamofire { 2 | umbrella header "Alamofire-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/SDWebImage.modulemap: -------------------------------------------------------------------------------- 1 | framework module SDWebImage { 2 | umbrella header "SDWebImage-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SwiftyJSON/SwiftyJSON.modulemap: -------------------------------------------------------------------------------- 1 | framework module SwiftyJSON { 2 | umbrella header "SwiftyJSON-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-1024.png -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Alamofire-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Alamofire : NSObject 3 | @end 4 | @implementation PodsDummy_Alamofire 5 | @end 6 | -------------------------------------------------------------------------------- /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/SwiftyJSON/SwiftyJSON-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SwiftyJSON : NSObject 3 | @end 4 | @implementation PodsDummy_SwiftyJSON 5 | @end 6 | -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Pods/Target Support Files/ColorThiefSwift/ColorThiefSwift.modulemap: -------------------------------------------------------------------------------- 1 | framework module ColorThiefSwift { 2 | umbrella header "ColorThiefSwift-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WhatFlower/Pods-WhatFlower.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_WhatFlower { 2 | umbrella header "Pods-WhatFlower-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appbrewery/WhatFlower-Completed-iOS13/HEAD/WhatFlower/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Pods/Target Support Files/ColorThiefSwift/ColorThiefSwift-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ColorThiefSwift : NSObject 3 | @end 4 | @implementation PodsDummy_ColorThiefSwift 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WhatFlower/Pods-WhatFlower-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_WhatFlower : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_WhatFlower 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Alamofire-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ColorThiefSwift/ColorThiefSwift-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 | -------------------------------------------------------------------------------- /WhatFlower.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WhatFlower.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '13.0' 3 | 4 | target 'WhatFlower' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for WhatFlower 9 | 10 | pod 'Alamofire' 11 | pod 'SwiftyJSON' 12 | pod 'SDWebImage' 13 | pod 'ColorThiefSwift' 14 | 15 | 16 | end 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Alamofire-umbrella.h: -------------------------------------------------------------------------------- 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 | 14 | FOUNDATION_EXPORT double AlamofireVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SwiftyJSON/SwiftyJSON-umbrella.h: -------------------------------------------------------------------------------- 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 | 14 | FOUNDATION_EXPORT double SwiftyJSONVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SwiftyJSONVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /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/Target Support Files/ColorThiefSwift/ColorThiefSwift-umbrella.h: -------------------------------------------------------------------------------- 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 | 14 | FOUNDATION_EXPORT double ColorThiefSwiftVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char ColorThiefSwiftVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WhatFlower/Pods-WhatFlower-umbrella.h: -------------------------------------------------------------------------------- 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 | 14 | FOUNDATION_EXPORT double Pods_WhatFlowerVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_WhatFlowerVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Private/SDDeviceHelper.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 SDDeviceHelper : NSObject 13 | 14 | + (NSUInteger)totalMemory; 15 | + (NSUInteger)freeMemory; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/Core/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/Target Support Files/Alamofire/Alamofire.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SwiftyJSON/SwiftyJSON.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftyJSON 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /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/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/Core/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 | /// A protocol represents cancelable operation. 12 | @protocol SDWebImageOperation 13 | 14 | - (void)cancel; 15 | 16 | @end 17 | 18 | /// NSOperation conform to `SDWebImageOperation`. 19 | @interface NSOperation (SDWebImageOperation) 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Private/SDImageIOAnimatedCoderInternal.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 "SDImageIOAnimatedCoder.h" 11 | 12 | @interface SDImageIOAnimatedCoder () 13 | 14 | + (NSTimeInterval)frameDurationAtIndex:(NSUInteger)index source:(nonnull CGImageSourceRef)source; 15 | + (NSUInteger)imageLoopCountWithSource:(nonnull CGImageSourceRef)source; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ColorThiefSwift/ColorThiefSwift.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ColorThiefSwift 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_LDFLAGS = $(inherited) -framework "UIKit" 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 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}/ColorThiefSwift 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 12 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/Core/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 "SDImageIOAnimatedCoder.h" 11 | 12 | /** 13 | Built in coder using ImageIO that supports APNG encoding/decoding 14 | */ 15 | @interface SDImageAPNGCoder : SDImageIOAnimatedCoder 16 | 17 | @property (nonatomic, class, readonly, nonnull) SDImageAPNGCoder *sharedCoder; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage 2 | DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_LDFLAGS = $(inherited) -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 | SUPPORTS_MACCATALYST = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /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/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/Core/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 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.9.1) 3 | - ColorThiefSwift (0.4.0) 4 | - SDWebImage (5.3.0): 5 | - SDWebImage/Core (= 5.3.0) 6 | - SDWebImage/Core (5.3.0) 7 | - SwiftyJSON (5.0.0) 8 | 9 | DEPENDENCIES: 10 | - Alamofire 11 | - ColorThiefSwift 12 | - SDWebImage 13 | - SwiftyJSON 14 | 15 | SPEC REPOS: 16 | trunk: 17 | - Alamofire 18 | - ColorThiefSwift 19 | - SDWebImage 20 | - SwiftyJSON 21 | 22 | SPEC CHECKSUMS: 23 | Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18 24 | ColorThiefSwift: 643bcd1364b4736ebcd190259646918ca17e8802 25 | SDWebImage: f1afa74b86587c2c63f4e80dfd39b21e3c17b45b 26 | SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7 27 | 28 | PODFILE CHECKSUM: 9e1d9642b0156b16defcb2c8308fff4daf869dd0 29 | 30 | COCOAPODS: 1.8.4 31 | -------------------------------------------------------------------------------- /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/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.9.1) 3 | - ColorThiefSwift (0.4.0) 4 | - SDWebImage (5.3.0): 5 | - SDWebImage/Core (= 5.3.0) 6 | - SDWebImage/Core (5.3.0) 7 | - SwiftyJSON (5.0.0) 8 | 9 | DEPENDENCIES: 10 | - Alamofire 11 | - ColorThiefSwift 12 | - SDWebImage 13 | - SwiftyJSON 14 | 15 | SPEC REPOS: 16 | trunk: 17 | - Alamofire 18 | - ColorThiefSwift 19 | - SDWebImage 20 | - SwiftyJSON 21 | 22 | SPEC CHECKSUMS: 23 | Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18 24 | ColorThiefSwift: 643bcd1364b4736ebcd190259646918ca17e8802 25 | SDWebImage: f1afa74b86587c2c63f4e80dfd39b21e3c17b45b 26 | SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7 27 | 28 | PODFILE CHECKSUM: 9e1d9642b0156b16defcb2c8308fff4daf869dd0 29 | 30 | COCOAPODS: 1.8.4 31 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/Core/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 | /** 13 | This category is just use as a convenience method. For more detail control, use methods in `UIImage+MultiFormat.h` or directlly use `SDImageCoder`. 14 | */ 15 | @interface UIImage (GIF) 16 | 17 | /** 18 | Creates an animated UIImage from an NSData. 19 | This will create animated image if the data is Animated GIF. And will create a static image is the data is Static GIF. 20 | 21 | @param data The GIF data 22 | @return The created image 23 | */ 24 | + (nullable UIImage *)sd_imageWithGIFData:(nullable NSData *)data; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Private/SDImageHEICCoderInternal.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 "SDImageHEICCoder.h" 11 | 12 | // AVFileTypeHEIC/AVFileTypeHEIF is defined in AVFoundation via iOS 11, we use this without import AVFoundation 13 | #define kSDUTTypeHEIC ((__bridge CFStringRef)@"public.heic") 14 | #define kSDUTTypeHEIF ((__bridge CFStringRef)@"public.heif") 15 | // HEIC Sequence (Animated Image) 16 | #define kSDUTTypeHEICS ((__bridge CFStringRef)@"public.heics") 17 | 18 | @interface SDImageHEICCoder () 19 | 20 | + (BOOL)canDecodeFromHEICFormat; 21 | + (BOOL)canDecodeFromHEIFFormat; 22 | + (BOOL)canEncodeToHEICFormat; 23 | + (BOOL)canEncodeToHEIFFormat; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 4.7.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 4.4.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SwiftyJSON/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 4.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ColorThiefSwift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.3.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WhatFlower/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Alamofire/Alamofire-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 4.9.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/SDWebImage-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 5.3.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SwiftyJSON/SwiftyJSON-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 5.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ColorThiefSwift/ColorThiefSwift-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.4.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WhatFlower/Pods-WhatFlower-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Private/SDDeviceHelper.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 "SDDeviceHelper.h" 10 | #import 11 | 12 | @implementation SDDeviceHelper 13 | 14 | + (NSUInteger)totalMemory { 15 | return (NSUInteger)[[NSProcessInfo processInfo] physicalMemory]; 16 | } 17 | 18 | + (NSUInteger)freeMemory { 19 | mach_port_t host_port = mach_host_self(); 20 | mach_msg_type_number_t host_size = sizeof(vm_statistics_data_t) / sizeof(integer_t); 21 | vm_size_t page_size; 22 | vm_statistics_data_t vm_stat; 23 | kern_return_t kern; 24 | 25 | kern = host_page_size(host_port, &page_size); 26 | if (kern != KERN_SUCCESS) return 0; 27 | kern = host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size); 28 | if (kern != KERN_SUCCESS) return 0; 29 | return vm_stat.free_count * page_size; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /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/Core/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/ColorThiefSwift/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 Kazuki Ohara 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pods/SwiftyJSON/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Ruoyu Fu 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 13 | all 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 21 | THE SOFTWARE. 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/Private/SDDisplayLink.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 | // Cross-platform display link wrapper. Do not retain the target 13 | // Use `CADisplayLink` on iOS/tvOS, `CVDisplayLink` on macOS, `NSTimer` on watchOS 14 | 15 | @interface SDDisplayLink : NSObject 16 | 17 | @property (readonly, nonatomic, weak, nullable) id target; 18 | @property (readonly, nonatomic, assign, nonnull) SEL selector; 19 | @property (readonly, nonatomic) CFTimeInterval duration; 20 | @property (readonly, nonatomic) BOOL isRunning; 21 | 22 | + (nonnull instancetype)displayLinkWithTarget:(nonnull id)target selector:(nonnull SEL)sel; 23 | 24 | - (void)addToRunLoop:(nonnull NSRunLoop *)runloop forMode:(nonnull NSRunLoopMode)mode; 25 | - (void)removeFromRunLoop:(nonnull NSRunLoop *)runloop forMode:(nonnull NSRunLoopMode)mode; 26 | 27 | - (void)start; 28 | - (void)stop; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/Alamofire/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 "SDImageIOAnimatedCoder.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 : SDImageIOAnimatedCoder 19 | 20 | @property (nonatomic, class, readonly, nonnull) SDImageGIFCoder *sharedCoder; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 15 | This is the protocol for cache key filter. 16 | 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. 17 | */ 18 | @protocol SDWebImageCacheKeyFilter 19 | 20 | - (nullable NSString *)cacheKeyForURL:(nonnull NSURL *)url; 21 | 22 | @end 23 | 24 | /** 25 | A cache key filter class with block. 26 | */ 27 | @interface SDWebImageCacheKeyFilter : NSObject 28 | 29 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageCacheKeyFilterBlock)block; 30 | + (nonnull instancetype)cacheKeyFilterWithBlock:(nonnull SDWebImageCacheKeyFilterBlock)block; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/Core/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/Core/SDImageHEICCoder.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 "SDImageIOAnimatedCoder.h" 11 | 12 | /** 13 | This coder is used for HEIC (HEIF with HEVC container codec) image format. 14 | Image/IO provide the static HEIC (.heic) support in iOS 11/macOS 10.13/tvOS 11/watchOS 4+. 15 | Image/IO provide the animated HEIC (.heics) support in iOS 13/macOS 10.15/tvOS 13/watchOS 6+. 16 | See https://nokiatech.github.io/heif/technical.html for the standard. 17 | @note This coder is not in the default coder list for now, since HEIC animated image is really rare, and Apple's implementation still contains performance issues. You can enable if you need this. 18 | @note If you need to support lower firmware version for HEIF, you can have a try at https://github.com/SDWebImage/SDWebImageHEIFCoder 19 | */ 20 | @interface SDImageHEICCoder : SDImageIOAnimatedCoder 21 | 22 | @property (nonatomic, class, readonly, nonnull) SDImageHEICCoder *sharedCoder; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /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/Target Support Files/Pods-WhatFlower/Pods-WhatFlower.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/ColorThiefSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ColorThiefSwift/ColorThiefSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "ColorThiefSwift" -framework "ImageIO" -framework "SDWebImage" -framework "SwiftyJSON" -framework "UIKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-WhatFlower/Pods-WhatFlower.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/ColorThiefSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ColorThiefSwift/ColorThiefSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "ColorThiefSwift" -framework "ImageIO" -framework "SDWebImage" -framework "SwiftyJSON" -framework "UIKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderResponseModifier.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 | 10 | #import "SDWebImageDownloaderResponseModifier.h" 11 | 12 | @interface SDWebImageDownloaderResponseModifier () 13 | 14 | @property (nonatomic, copy, nonnull) SDWebImageDownloaderResponseModifierBlock block; 15 | 16 | @end 17 | 18 | @implementation SDWebImageDownloaderResponseModifier 19 | 20 | - (instancetype)initWithBlock:(SDWebImageDownloaderResponseModifierBlock)block { 21 | self = [super init]; 22 | if (self) { 23 | self.block = block; 24 | } 25 | return self; 26 | } 27 | 28 | + (instancetype)responseModifierWithBlock:(SDWebImageDownloaderResponseModifierBlock)block { 29 | SDWebImageDownloaderResponseModifier *responseModifier = [[SDWebImageDownloaderResponseModifier alloc] initWithBlock:block]; 30 | return responseModifier; 31 | } 32 | 33 | - (nullable NSURLResponse *)modifiedResponseWithResponse:(nonnull NSURLResponse *)response { 34 | if (!self.block) { 35 | return nil; 36 | } 37 | return self.block(response); 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 14 | A subclass of `NSBitmapImageRep` to fix that GIF duration issue because `NSBitmapImageRep` will reset `NSImageCurrentFrameDuration` by using `kCGImagePropertyGIFDelayTime` but not `kCGImagePropertyGIFUnclampedDelayTime`. 15 | This also fix the GIF loop count issue, which will use the Netscape standard (See http://www6.uniovi.es/gifanim/gifabout.htm) to only place once when the `kCGImagePropertyGIFLoopCount` is nil. This is what modern browser's behavior. 16 | 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. 17 | This also support APNG format using `SDImageAPNGCoder`. Which provide full alpha-channel support and the correct duration match the `kCGImagePropertyAPNGUnclampedDelayTime`. 18 | */ 19 | @interface SDAnimatedImageRep : NSBitmapImageRep 20 | 21 | @end 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 12 | A loaders manager to manage multiple loaders 13 | */ 14 | @interface SDImageLoadersManager : NSObject 15 | 16 | /** 17 | Returns the global shared loaders manager instance. By default we will set [`SDWebImageDownloader.sharedDownloader`] into the loaders array. 18 | */ 19 | @property (nonatomic, class, readonly, nonnull) SDImageLoadersManager *sharedManager; 20 | 21 | /** 22 | All image loaders in manager. The loaders array is a priority queue, which means the later added loader will have the highest priority 23 | */ 24 | @property (nonatomic, copy, nullable) NSArray>* loaders; 25 | 26 | /** 27 | Add a new image loader to the end of loaders array. Which has the highest priority. 28 | 29 | @param loader loader 30 | */ 31 | - (void)addLoader:(nonnull id)loader; 32 | 33 | /** 34 | Remove a image loader in the loaders array. 35 | 36 | @param loader loader 37 | */ 38 | - (void)removeLoader:(nonnull id)loader; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 13 | This class is used for creating animated images via `animatedImageWithFrames` in `SDImageCoderHelper`. 14 | @note If you need to specify animated images loop count, use `sd_imageLoopCount` property in `UIImage+Metadata.h`. 15 | */ 16 | @interface SDImageFrame : NSObject 17 | 18 | /** 19 | The image of current frame. You should not set an animated image. 20 | */ 21 | @property (nonatomic, strong, readonly, nonnull) UIImage *image; 22 | /** 23 | The duration of current frame to be displayed. The number is seconds but not milliseconds. You should not set this to zero. 24 | */ 25 | @property (nonatomic, readonly, assign) NSTimeInterval duration; 26 | 27 | /** 28 | Create a frame instance with specify image and duration 29 | 30 | @param image current frame's image 31 | @param duration current frame's duration 32 | @return frame instance 33 | */ 34 | + (instancetype _Nonnull)frameWithImage:(UIImage * _Nonnull)image duration:(NSTimeInterval)duration; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 15 | This is the protocol for cache serializer. 16 | 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. 17 | */ 18 | @protocol SDWebImageCacheSerializer 19 | 20 | - (nullable NSData *)cacheDataWithImage:(nonnull UIImage *)image originalData:(nullable NSData *)data imageURL:(nullable NSURL *)imageURL; 21 | 22 | @end 23 | 24 | /** 25 | A cache serializer class with block. 26 | */ 27 | @interface SDWebImageCacheSerializer : NSObject 28 | 29 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageCacheSerializerBlock)block; 30 | + (nonnull instancetype)cacheSerializerWithBlock:(nonnull SDWebImageCacheSerializerBlock)block; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/Core/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 | /** 12 | UIImage category for memory cache cost. 13 | */ 14 | @interface UIImage (MemoryCacheCost) 15 | 16 | /** 17 | The memory cache cost for specify image used by image cache. The cost function is the bytes size held in memory. 18 | If you set some associated object to `UIImage`, you can set the custom value to indicate the memory cost. 19 | 20 | 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. 21 | For `NSImage`, this method return the single frame bytes size because `NSImage` does not store all frames in memory. 22 | @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. 23 | @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. 24 | */ 25 | @property (assign, nonatomic) NSUInteger sd_memoryCost; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | + (nullable UIImage *)sd_decodedImageWithImage:(nullable UIImage *)image { 25 | if (!image) { 26 | return nil; 27 | } 28 | return [SDImageCoderHelper decodedImageWithImage:image]; 29 | } 30 | 31 | + (nullable UIImage *)sd_decodedAndScaledDownImageWithImage:(nullable UIImage *)image { 32 | return [self sd_decodedAndScaledDownImageWithImage:image limitBytes:0]; 33 | } 34 | 35 | + (nullable UIImage *)sd_decodedAndScaledDownImageWithImage:(nullable 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/Core/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 | 18 | /// Returns the current graphics context. 19 | FOUNDATION_EXPORT CGContextRef __nullable SDGraphicsGetCurrentContext(void) CF_RETURNS_NOT_RETAINED; 20 | /// Creates a bitmap-based graphics context and makes it the current context. 21 | FOUNDATION_EXPORT void SDGraphicsBeginImageContext(CGSize size); 22 | /// Creates a bitmap-based graphics context with the specified options. 23 | FOUNDATION_EXPORT void SDGraphicsBeginImageContextWithOptions(CGSize size, BOOL opaque, CGFloat scale); 24 | /// Removes the current bitmap-based graphics context from the top of the stack. 25 | FOUNDATION_EXPORT void SDGraphicsEndImageContext(void); 26 | /// Returns an image based on the contents of the current bitmap-based graphics context. 27 | FOUNDATION_EXPORT UIImage * __nullable SDGraphicsGetImageFromCurrentImageContext(void); 28 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDImageGIFCoder.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 "SDImageGIFCoder.h" 10 | #if SD_MAC 11 | #import 12 | #else 13 | #import 14 | #endif 15 | 16 | @implementation SDImageGIFCoder 17 | 18 | + (instancetype)sharedCoder { 19 | static SDImageGIFCoder *coder; 20 | static dispatch_once_t onceToken; 21 | dispatch_once(&onceToken, ^{ 22 | coder = [[SDImageGIFCoder alloc] init]; 23 | }); 24 | return coder; 25 | } 26 | 27 | #pragma mark - Subclass Override 28 | 29 | + (SDImageFormat)imageFormat { 30 | return SDImageFormatGIF; 31 | } 32 | 33 | + (NSString *)imageUTType { 34 | return (__bridge NSString *)kUTTypeGIF; 35 | } 36 | 37 | + (NSString *)dictionaryProperty { 38 | return (__bridge NSString *)kCGImagePropertyGIFDictionary; 39 | } 40 | 41 | + (NSString *)unclampedDelayTimeProperty { 42 | return (__bridge NSString *)kCGImagePropertyGIFUnclampedDelayTime; 43 | } 44 | 45 | + (NSString *)delayTimeProperty { 46 | return (__bridge NSString *)kCGImagePropertyGIFDelayTime; 47 | } 48 | 49 | + (NSString *)loopCountProperty { 50 | return (__bridge NSString *)kCGImagePropertyGIFLoopCount; 51 | } 52 | 53 | + (NSUInteger)defaultLoopCount { 54 | return 1; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/Core/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 | /** 12 | UIImage category about force decode feature (avoid Image/IO's lazy decoding during rendering behavior). 13 | */ 14 | @interface UIImage (ForceDecode) 15 | 16 | /** 17 | A bool value indicating whether the image has already been decoded. This can help to avoid extra force decode. 18 | */ 19 | @property (nonatomic, assign) BOOL sd_isDecoded; 20 | 21 | /** 22 | Decode the provided image. This is useful if you want to force decode the image before rendering to improve performance. 23 | 24 | @param image The image to be decoded 25 | @return The decoded image 26 | */ 27 | + (nullable UIImage *)sd_decodedImageWithImage:(nullable UIImage *)image; 28 | 29 | /** 30 | Decode and scale down the provided image 31 | 32 | @param image The image to be decoded 33 | @return The decoded and scaled down image 34 | */ 35 | + (nullable UIImage *)sd_decodedAndScaledDownImageWithImage:(nullable UIImage *)image; 36 | 37 | /** 38 | Decode and scale down the provided image with limit bytes 39 | 40 | @param image The image to be decoded 41 | @param bytes The limit bytes size. Provide 0 to use the build-in limit. 42 | @return The decoded and scaled down image 43 | */ 44 | + (nullable UIImage *)sd_decodedAndScaledDownImageWithImage:(nullable UIImage *)image limitBytes:(NSUInteger)bytes; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 15 | This is the protocol for downloader request modifier. 16 | 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. 17 | */ 18 | @protocol SDWebImageDownloaderRequestModifier 19 | 20 | /// Modify the original URL request and return a new one instead. You can modify the HTTP header, cachePolicy, etc for this URL. 21 | /// @param request The original URL request for image loading 22 | /// @note If return nil, the URL request will be cancelled. 23 | - (nullable NSURLRequest *)modifiedRequestWithRequest:(nonnull NSURLRequest *)request; 24 | 25 | @end 26 | 27 | /** 28 | A downloader request modifier class with block. 29 | */ 30 | @interface SDWebImageDownloaderRequestModifier : NSObject 31 | 32 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageDownloaderRequestModifierBlock)block; 33 | + (nonnull instancetype)requestModifierWithBlock:(nonnull SDWebImageDownloaderRequestModifierBlock)block; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/Core/SDWebImageDownloaderResponseModifier.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 NSURLResponse * _Nullable (^SDWebImageDownloaderResponseModifierBlock)(NSURLResponse * _Nonnull response); 13 | 14 | /** 15 | This is the protocol for downloader response modifier. 16 | We can use a block to specify the downloader response 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. 17 | */ 18 | @protocol SDWebImageDownloaderResponseModifier 19 | 20 | /// Modify the original URL response and return a new response. You can use this to check MIME-Type, mock server response, etc. 21 | /// @param response The original URL response, note for HTTP request it's actually a `NSHTTPURLResponse` instance 22 | /// @note If nil is returned, the image download will marked as cancelled with error `SDWebImageErrorInvalidDownloadResponse` 23 | - (nullable NSURLResponse *)modifiedResponseWithResponse:(nonnull NSURLResponse *)response; 24 | 25 | @end 26 | 27 | /** 28 | A downloader response modifier class with block. 29 | */ 30 | @interface SDWebImageDownloaderResponseModifier : NSObject 31 | 32 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageDownloaderResponseModifierBlock)block; 33 | + (nonnull instancetype)responseModifierWithBlock:(nonnull SDWebImageDownloaderResponseModifierBlock)block; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /WhatFlower/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | NSCameraUsageDescription 24 | Need cam 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UIRequiresFullScreen 34 | 35 | UIStatusBarHidden 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | UIViewControllerBasedStatusBarAppearance 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDWebImageOptionsProcessor.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 "SDWebImageOptionsProcessor.h" 10 | 11 | @interface SDWebImageOptionsResult () 12 | 13 | @property (nonatomic, assign) SDWebImageOptions options; 14 | @property (nonatomic, copy, nullable) SDWebImageContext *context; 15 | 16 | @end 17 | 18 | @implementation SDWebImageOptionsResult 19 | 20 | - (instancetype)initWithOptions:(SDWebImageOptions)options context:(SDWebImageContext *)context { 21 | self = [super init]; 22 | if (self) { 23 | self.options = options; 24 | self.context = context; 25 | } 26 | return self; 27 | } 28 | 29 | @end 30 | 31 | @interface SDWebImageOptionsProcessor () 32 | 33 | @property (nonatomic, copy, nonnull) SDWebImageOptionsProcessorBlock block; 34 | 35 | @end 36 | 37 | @implementation SDWebImageOptionsProcessor 38 | 39 | - (instancetype)initWithBlock:(SDWebImageOptionsProcessorBlock)block { 40 | self = [super init]; 41 | if (self) { 42 | self.block = block; 43 | } 44 | return self; 45 | } 46 | 47 | + (instancetype)optionsProcessorWithBlock:(SDWebImageOptionsProcessorBlock)block { 48 | SDWebImageOptionsProcessor *optionsProcessor = [[SDWebImageOptionsProcessor alloc] initWithBlock:block]; 49 | return optionsProcessor; 50 | } 51 | 52 | - (SDWebImageOptionsResult *)processedResultForURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context { 53 | if (!self.block) { 54 | return nil; 55 | } 56 | return self.block(url, options, context); 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 13 | These methods are used to support canceling for UIView image loading, it's designed to be used internal but not external. 14 | 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. 15 | */ 16 | @interface UIView (WebCacheOperation) 17 | 18 | /** 19 | * Get the image load operation for key 20 | * 21 | * @param key key for identifying the operations 22 | * @return the image load operation 23 | */ 24 | - (nullable id)sd_imageLoadOperationForKey:(nullable NSString *)key; 25 | 26 | /** 27 | * Set the image load operation (storage in a UIView based weak map table) 28 | * 29 | * @param operation the operation 30 | * @param key key for storing the operation 31 | */ 32 | - (void)sd_setImageLoadOperation:(nullable id)operation forKey:(nullable NSString *)key; 33 | 34 | /** 35 | * Cancel all operations for the current UIView and key 36 | * 37 | * @param key key for identifying the operations 38 | */ 39 | - (void)sd_cancelImageLoadOperationWithKey:(nullable NSString *)key; 40 | 41 | /** 42 | * Just remove the operations corresponding to the current UIView and key without cancelling them 43 | * 44 | * @param key key for identifying the operations 45 | */ 46 | - (void)sd_removeImageLoadOperationWithKey:(nullable NSString *)key; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /WhatFlower/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /// The HTTP status code for invalid download response (NSNumber *) 15 | FOUNDATION_EXPORT NSErrorUserInfoKey const _Nonnull SDWebImageErrorDownloadStatusCodeKey; 16 | 17 | /// SDWebImage error domain and codes 18 | typedef NS_ERROR_ENUM(SDWebImageErrorDomain, SDWebImageError) { 19 | SDWebImageErrorInvalidURL = 1000, // The URL is invalid, such as nil URL or corrupted URL 20 | SDWebImageErrorBadImageData = 1001, // The image data can not be decoded to image, or the image data is empty 21 | 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` 22 | SDWebImageErrorInvalidDownloadOperation = 2000, // The image download operation is invalid, such as nil operation or unexpected error occur when operation initialized 23 | SDWebImageErrorInvalidDownloadStatusCode = 2001, // The image download response a invalid status code. You can check the status code in error's userInfo under `SDWebImageErrorDownloadStatusCodeKey` 24 | SDWebImageErrorCancelled = 2002, // The image loading operation is cancelled before finished, during either async disk cache query, or waiting before actual network request. For actual network request error, check `NSURLErrorDomain` error domain and code. 25 | SDWebImageErrorInvalidDownloadResponse = 2003, // When using response modifier, the modified download response is nil and marked as cancelled. 26 | }; 27 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderDecryptor.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 "SDWebImageDownloaderDecryptor.h" 10 | 11 | @interface SDWebImageDownloaderDecryptor () 12 | 13 | @property (nonatomic, copy, nonnull) SDWebImageDownloaderDecryptorBlock block; 14 | 15 | @end 16 | 17 | @implementation SDWebImageDownloaderDecryptor 18 | 19 | - (instancetype)initWithBlock:(SDWebImageDownloaderDecryptorBlock)block { 20 | self = [super init]; 21 | if (self) { 22 | self.block = block; 23 | } 24 | return self; 25 | } 26 | 27 | + (instancetype)decryptorWithBlock:(SDWebImageDownloaderDecryptorBlock)block { 28 | SDWebImageDownloaderDecryptor *decryptor = [[SDWebImageDownloaderDecryptor alloc] initWithBlock:block]; 29 | return decryptor; 30 | } 31 | 32 | - (nullable NSData *)decryptedDataWithData:(nonnull NSData *)data response:(nullable NSURLResponse *)response { 33 | if (!self.block) { 34 | return nil; 35 | } 36 | return self.block(data, response); 37 | } 38 | 39 | @end 40 | 41 | @implementation SDWebImageDownloaderDecryptor (Conveniences) 42 | 43 | + (SDWebImageDownloaderDecryptor *)base64Decryptor { 44 | static SDWebImageDownloaderDecryptor *decryptor; 45 | static dispatch_once_t onceToken; 46 | dispatch_once(&onceToken, ^{ 47 | decryptor = [SDWebImageDownloaderDecryptor decryptorWithBlock:^NSData * _Nullable(NSData * _Nonnull data, NSURLResponse * _Nullable response) { 48 | NSData *modifiedData = [[NSData alloc] initWithBase64EncodedData:data options:NSDataBase64DecodingIgnoreUnknownCharacters]; 49 | return modifiedData; 50 | }]; 51 | }); 52 | return decryptor; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /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 SD_OPTIONS_CONTAINS 21 | #define SD_OPTIONS_CONTAINS(options, value) (((options) & (value)) == (value)) 22 | #endif 23 | 24 | #ifndef weakify 25 | #define weakify(...) \ 26 | sd_keywordify \ 27 | metamacro_foreach_cxt(sd_weakify_,, __weak, __VA_ARGS__) 28 | #endif 29 | 30 | #ifndef strongify 31 | #define strongify(...) \ 32 | sd_keywordify \ 33 | _Pragma("clang diagnostic push") \ 34 | _Pragma("clang diagnostic ignored \"-Wshadow\"") \ 35 | metamacro_foreach(sd_strongify_,, __VA_ARGS__) \ 36 | _Pragma("clang diagnostic pop") 37 | #endif 38 | 39 | #define sd_weakify_(INDEX, CONTEXT, VAR) \ 40 | CONTEXT __typeof__(VAR) metamacro_concat(VAR, _weak_) = (VAR); 41 | 42 | #define sd_strongify_(INDEX, VAR) \ 43 | __strong __typeof__(VAR) VAR = metamacro_concat(VAR, _weak_); 44 | 45 | #if DEBUG 46 | #define sd_keywordify autoreleasepool {} 47 | #else 48 | #define sd_keywordify try {} @catch (...) {} 49 | #endif 50 | 51 | #ifndef onExit 52 | #define onExit \ 53 | sd_keywordify \ 54 | __strong sd_cleanupBlock_t metamacro_concat(sd_exitBlock_, __LINE__) __attribute__((cleanup(sd_executeCleanupBlock), unused)) = ^ 55 | #endif 56 | 57 | typedef void (^sd_cleanupBlock_t)(void); 58 | 59 | #if defined(__cplusplus) 60 | extern "C" { 61 | #endif 62 | void sd_executeCleanupBlock (__strong sd_cleanupBlock_t *block); 63 | #if defined(__cplusplus) 64 | } 65 | #endif 66 | -------------------------------------------------------------------------------- /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/Alamofire/Source/DispatchQueue+Alamofire.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DispatchQueue+Alamofire.swift 3 | // 4 | // Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Dispatch 26 | import Foundation 27 | 28 | extension DispatchQueue { 29 | static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } 30 | static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) } 31 | static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) } 32 | static var background: DispatchQueue { return DispatchQueue.global(qos: .background) } 33 | 34 | func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { 35 | asyncAfter(deadline: .now() + delay, execute: closure) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /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/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/ColorThiefSwift/README.md: -------------------------------------------------------------------------------- 1 | # ColorThiefSwift 2 | 3 | Grabs the dominant color or a representative color palette from an image. 4 | A Swift port of Sven Woltmann's Java implementation. 5 | 6 | ![screen shot](https://github.com/yamoridon/ColorThiefSwift/blob/master/screenshot.png?raw=true "screen shot") 7 | 8 | [![Build Status](https://app.bitrise.io/app/36bdb92c783ae764/status.svg?token=XE0zz2NQ9YgDskIP61QTaA&branch=bitrise)](https://app.bitrise.io/app/36bdb92c783ae764) 9 | [![Version](https://img.shields.io/cocoapods/v/ColorThiefSwift.svg?style=flat)](http://cocoapods.org/pods/ColorThiefSwift) 10 | [![License](https://img.shields.io/cocoapods/l/ColorThiefSwift.svg?style=flat)](http://cocoapods.org/pods/ColorThiefSwift) 11 | [![Platform](https://img.shields.io/cocoapods/p/ColorThiefSwift.svg?style=flat)](http://cocoapods.org/pods/ColorThiefSwift) 12 | 13 | ## Example 14 | 15 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 16 | 17 | ## Requirements 18 | 19 | - Xcode 10.2 20 | - Swift 5 21 | - iOS 9 22 | 23 | ## Installation 24 | 25 | ### CocoaPods 26 | 27 | ColorThiefSwift is available through [CocoaPods](http://cocoapods.org). To install 28 | it, simply add the following line to your Podfile: 29 | 30 | ```ruby 31 | pod 'ColorThiefSwift', '>= 0.4.0' 32 | ``` 33 | 34 | ### Carthage 35 | 36 | Add this to Cartfile 37 | 38 | ``` 39 | github "yamoridon/ColorThiefSwift" ~> 0.4.0 40 | ``` 41 | 42 | ``` 43 | $ carthage update 44 | ``` 45 | 46 | ## Author 47 | 48 | Kazuki Ohara kazuki.ohara@gmail.com 49 | 50 | ## License 51 | 52 | ColorThiefSwift is available under the MIT license. See the LICENSE file for more info. 53 | 54 | ## Thanks 55 | 56 | - Sven Woltmann - for the Java Implementation. ColorThiefSwift is a port of this. 57 | - https://github.com/SvenWoltmann/color-thief-java 58 | - Lokesh Dhakar - for the original JavaScript version. 59 | - http://lokeshdhakar.com/projects/color-thief/ 60 | - https://github.com/lokesh/color-thief/ 61 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 28 | NSData category about the image content type and UTI. 29 | */ 30 | @interface NSData (ImageContentType) 31 | 32 | /** 33 | * Return image format 34 | * 35 | * @param data the input image data 36 | * 37 | * @return the image format as `SDImageFormat` (enum) 38 | */ 39 | + (SDImageFormat)sd_imageFormatForImageData:(nullable NSData *)data; 40 | 41 | /** 42 | * Convert SDImageFormat to UTType 43 | * 44 | * @param format Format as SDImageFormat 45 | * @return The UTType as CFStringRef 46 | */ 47 | + (nonnull CFStringRef)sd_UTTypeFromImageFormat:(SDImageFormat)format CF_RETURNS_NOT_RETAINED NS_SWIFT_NAME(sd_UTType(from:)); 48 | 49 | /** 50 | * Convert UTTyppe to SDImageFormat 51 | * 52 | * @param uttype The UTType as CFStringRef 53 | * @return The Format as SDImageFormat 54 | */ 55 | + (SDImageFormat)sd_imageFormatFromUTType:(nonnull CFStringRef)uttype; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | SDImageCoderOptions *options = @{SDImageCoderDecodeScaleFactor : @(MAX(scale, 1)), SDImageCoderDecodeFirstFrameOnly : @(firstFrameOnly)}; 27 | return [[SDImageCodersManager sharedManager] decodedImageWithData:data options:options]; 28 | } 29 | 30 | - (nullable NSData *)sd_imageData { 31 | return [self sd_imageDataAsFormat:SDImageFormatUndefined]; 32 | } 33 | 34 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat { 35 | return [self sd_imageDataAsFormat:imageFormat compressionQuality:1]; 36 | } 37 | 38 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality { 39 | return [self sd_imageDataAsFormat:imageFormat compressionQuality:compressionQuality firstFrameOnly:NO]; 40 | } 41 | 42 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality firstFrameOnly:(BOOL)firstFrameOnly { 43 | SDImageCoderOptions *options = @{SDImageCoderEncodeCompressionQuality : @(compressionQuality), SDImageCoderEncodeFirstFrameOnly : @(firstFrameOnly)}; 44 | return [[SDImageCodersManager sharedManager] encodedDataWithImage:self format:imageFormat options:options]; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 13 | UIImage category for image metadata, including animation, loop count, format, incremental, etc. 14 | */ 15 | @interface UIImage (Metadata) 16 | 17 | /** 18 | * UIKit: 19 | * For static image format, this value is always 0. 20 | * For animated image format, 0 means infinite looping. 21 | * 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. 22 | * AppKit: 23 | * NSImage currently only support animated via GIF imageRep unlike UIImage. 24 | * The getter of this property will get the loop count from GIF imageRep 25 | * The setter of this property will set the loop count from GIF imageRep 26 | */ 27 | @property (nonatomic, assign) NSUInteger sd_imageLoopCount; 28 | 29 | /** 30 | * UIKit: 31 | * Check the `images` array property 32 | * AppKit: 33 | * NSImage currently only support animated via GIF imageRep unlike UIImage. It will check the imageRep's frame count. 34 | */ 35 | @property (nonatomic, assign, readonly) BOOL sd_isAnimated; 36 | 37 | /** 38 | * The image format represent the original compressed image data format. 39 | * 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. 40 | * @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. 41 | */ 42 | @property (nonatomic, assign) SDImageFormat sd_imageFormat; 43 | 44 | /** 45 | A bool value indicating whether the image is during incremental decoding and may not contains full pixels. 46 | */ 47 | @property (nonatomic, assign) BOOL sd_isIncremental; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderDecryptor.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 (^SDWebImageDownloaderDecryptorBlock)(NSData * _Nonnull data, NSURLResponse * _Nullable response); 13 | 14 | /** 15 | This is the protocol for downloader decryptor. Which decrypt the original encrypted data before decoding. Note progressive decoding is not compatible for decryptor. 16 | We can use a block to specify the downloader decryptor. 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. 17 | */ 18 | @protocol SDWebImageDownloaderDecryptor 19 | 20 | /// Decrypt the original download data and return a new data. You can use this to decrypt the data using your perfereed algorithm. 21 | /// @param data The original download data 22 | /// @param response The URL response for data. If you modifiy the original URL response via response modifier, the modified version will be here. This arg is nullable. 23 | /// @note If nil is returned, the image download will be marked as failed with error `SDWebImageErrorBadImageData` 24 | - (nullable NSData *)decryptedDataWithData:(nonnull NSData *)data response:(nullable NSURLResponse *)response; 25 | 26 | @end 27 | 28 | /** 29 | A downloader response modifier class with block. 30 | */ 31 | @interface SDWebImageDownloaderDecryptor : NSObject 32 | 33 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageDownloaderDecryptorBlock)block; 34 | + (nonnull instancetype)decryptorWithBlock:(nonnull SDWebImageDownloaderDecryptorBlock)block; 35 | 36 | @end 37 | 38 | /// Convenience way to create decryptor for common data encryption. 39 | @interface SDWebImageDownloaderDecryptor (Conveniences) 40 | 41 | /// Base64 Encoded image data decryptor 42 | @property (class, readonly, nonnull) SDWebImageDownloaderDecryptor *base64Decryptor; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDImageAPNGCoder.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 "SDImageAPNGCoder.h" 10 | #if SD_MAC 11 | #import 12 | #else 13 | #import 14 | #endif 15 | 16 | // iOS 8 Image/IO framework binary does not contains these APNG contants, so we define them. Thanks Apple :) 17 | // We can not use runtime @available check for this issue, because it's a global symbol and should be loaded during launch time by dyld. So hack if the min deployment target version < iOS 9.0, whatever it running on iOS 9+ or not. 18 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0) 19 | const CFStringRef kCGImagePropertyAPNGLoopCount = (__bridge CFStringRef)@"LoopCount"; 20 | const CFStringRef kCGImagePropertyAPNGDelayTime = (__bridge CFStringRef)@"DelayTime"; 21 | const CFStringRef kCGImagePropertyAPNGUnclampedDelayTime = (__bridge CFStringRef)@"UnclampedDelayTime"; 22 | #endif 23 | 24 | @implementation SDImageAPNGCoder 25 | 26 | + (instancetype)sharedCoder { 27 | static SDImageAPNGCoder *coder; 28 | static dispatch_once_t onceToken; 29 | dispatch_once(&onceToken, ^{ 30 | coder = [[SDImageAPNGCoder alloc] init]; 31 | }); 32 | return coder; 33 | } 34 | 35 | #pragma mark - Subclass Override 36 | 37 | + (SDImageFormat)imageFormat { 38 | return SDImageFormatPNG; 39 | } 40 | 41 | + (NSString *)imageUTType { 42 | return (__bridge NSString *)kUTTypePNG; 43 | } 44 | 45 | + (NSString *)dictionaryProperty { 46 | return (__bridge NSString *)kCGImagePropertyPNGDictionary; 47 | } 48 | 49 | + (NSString *)unclampedDelayTimeProperty { 50 | return (__bridge NSString *)kCGImagePropertyAPNGUnclampedDelayTime; 51 | } 52 | 53 | + (NSString *)delayTimeProperty { 54 | return (__bridge NSString *)kCGImagePropertyAPNGDelayTime; 55 | } 56 | 57 | + (NSString *)loopCountProperty { 58 | return (__bridge NSString *)kCGImagePropertyAPNGLoopCount; 59 | } 60 | 61 | + (NSUInteger)defaultLoopCount { 62 | return 0; 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /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 | #import "SDInternalMacros.h" 11 | 12 | @implementation SDImageCachesManagerOperation 13 | { 14 | dispatch_semaphore_t _pendingCountLock; 15 | } 16 | 17 | @synthesize executing = _executing; 18 | @synthesize finished = _finished; 19 | @synthesize cancelled = _cancelled; 20 | @synthesize pendingCount = _pendingCount; 21 | 22 | - (instancetype)init { 23 | if (self = [super init]) { 24 | _pendingCountLock = dispatch_semaphore_create(1); 25 | _pendingCount = 0; 26 | } 27 | return self; 28 | } 29 | 30 | - (void)beginWithTotalCount:(NSUInteger)totalCount { 31 | self.executing = YES; 32 | self.finished = NO; 33 | _pendingCount = totalCount; 34 | } 35 | 36 | - (NSUInteger)pendingCount { 37 | SD_LOCK(_pendingCountLock); 38 | NSUInteger pendingCount = _pendingCount; 39 | SD_UNLOCK(_pendingCountLock); 40 | return pendingCount; 41 | } 42 | 43 | - (void)completeOne { 44 | SD_LOCK(_pendingCountLock); 45 | _pendingCount = _pendingCount > 0 ? _pendingCount - 1 : 0; 46 | SD_UNLOCK(_pendingCountLock); 47 | } 48 | 49 | - (void)cancel { 50 | self.cancelled = YES; 51 | [self reset]; 52 | } 53 | 54 | - (void)done { 55 | self.finished = YES; 56 | self.executing = NO; 57 | [self reset]; 58 | } 59 | 60 | - (void)reset { 61 | SD_LOCK(_pendingCountLock); 62 | _pendingCount = 0; 63 | SD_UNLOCK(_pendingCountLock); 64 | } 65 | 66 | - (void)setFinished:(BOOL)finished { 67 | [self willChangeValueForKey:@"isFinished"]; 68 | _finished = finished; 69 | [self didChangeValueForKey:@"isFinished"]; 70 | } 71 | 72 | - (void)setExecuting:(BOOL)executing { 73 | [self willChangeValueForKey:@"isExecuting"]; 74 | _executing = executing; 75 | [self didChangeValueForKey:@"isExecuting"]; 76 | } 77 | 78 | - (void)setCancelled:(BOOL)cancelled { 79 | [self willChangeValueForKey:@"isCancelled"]; 80 | _cancelled = cancelled; 81 | [self didChangeValueForKey:@"isCancelled"]; 82 | } 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /WhatFlower/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // WhatFlower 4 | // 5 | // Created by Angela Yu on 01/07/2017. 6 | // Copyright © 2017 Angela Yu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/Target Support Files/SDWebImage/SDWebImage-umbrella.h: -------------------------------------------------------------------------------- 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 "NSButton+WebCache.h" 14 | #import "NSData+ImageContentType.h" 15 | #import "NSImage+Compatibility.h" 16 | #import "SDAnimatedImage.h" 17 | #import "SDAnimatedImagePlayer.h" 18 | #import "SDAnimatedImageRep.h" 19 | #import "SDAnimatedImageView+WebCache.h" 20 | #import "SDAnimatedImageView.h" 21 | #import "SDDiskCache.h" 22 | #import "SDImageAPNGCoder.h" 23 | #import "SDImageCache.h" 24 | #import "SDImageCacheConfig.h" 25 | #import "SDImageCacheDefine.h" 26 | #import "SDImageCachesManager.h" 27 | #import "SDImageCoder.h" 28 | #import "SDImageCoderHelper.h" 29 | #import "SDImageCodersManager.h" 30 | #import "SDImageFrame.h" 31 | #import "SDImageGIFCoder.h" 32 | #import "SDImageGraphics.h" 33 | #import "SDImageHEICCoder.h" 34 | #import "SDImageIOAnimatedCoder.h" 35 | #import "SDImageIOCoder.h" 36 | #import "SDImageLoader.h" 37 | #import "SDImageLoadersManager.h" 38 | #import "SDImageTransformer.h" 39 | #import "SDMemoryCache.h" 40 | #import "SDWebImageCacheKeyFilter.h" 41 | #import "SDWebImageCacheSerializer.h" 42 | #import "SDWebImageCompat.h" 43 | #import "SDWebImageDefine.h" 44 | #import "SDWebImageDownloader.h" 45 | #import "SDWebImageDownloaderConfig.h" 46 | #import "SDWebImageDownloaderDecryptor.h" 47 | #import "SDWebImageDownloaderOperation.h" 48 | #import "SDWebImageDownloaderRequestModifier.h" 49 | #import "SDWebImageDownloaderResponseModifier.h" 50 | #import "SDWebImageError.h" 51 | #import "SDWebImageIndicator.h" 52 | #import "SDWebImageManager.h" 53 | #import "SDWebImageOperation.h" 54 | #import "SDWebImageOptionsProcessor.h" 55 | #import "SDWebImagePrefetcher.h" 56 | #import "SDWebImageTransition.h" 57 | #import "UIButton+WebCache.h" 58 | #import "UIImage+ForceDecode.h" 59 | #import "UIImage+GIF.h" 60 | #import "UIImage+MemoryCacheCost.h" 61 | #import "UIImage+Metadata.h" 62 | #import "UIImage+MultiFormat.h" 63 | #import "UIImage+Transform.h" 64 | #import "UIImageView+HighlightedWebCache.h" 65 | #import "UIImageView+WebCache.h" 66 | #import "UIView+WebCache.h" 67 | #import "UIView+WebCacheOperation.h" 68 | #import "SDWebImage.h" 69 | 70 | FOUNDATION_EXPORT double SDWebImageVersionNumber; 71 | FOUNDATION_EXPORT const unsigned char SDWebImageVersionString[]; 72 | 73 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/Core/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/Core/SDImageIOAnimatedCoder.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 11 | #import "SDImageCoder.h" 12 | 13 | /** 14 | This is the abstract class for all animated coder, which use the Image/IO API. You can not use this directly as real coders. A exception will be raised if you use this class. 15 | All of the properties need the subclass to implment and works as expceted. 16 | For Image/IO, See Apple's documentation: https://developer.apple.com/documentation/imageio 17 | */ 18 | @interface SDImageIOAnimatedCoder : NSObject 19 | 20 | #pragma mark - Subclass Override 21 | /** 22 | The supported animated image format. Such as `SDImageFormatGIF`. 23 | @note Subclass override. 24 | */ 25 | @property (class, readonly) SDImageFormat imageFormat; 26 | /** 27 | The supported image format UTI Type. Such as `kUTTypeGIF`. 28 | This can be used for cases when we can not detect `SDImageFormat. Such as progressive decoding's hint format `kCGImageSourceTypeIdentifierHint`. 29 | @note Subclass override. 30 | */ 31 | @property (class, readonly, nonnull) NSString *imageUTType; 32 | /** 33 | The image container property key used in Image/IO API. Such as `kCGImagePropertyGIFDictionary`. 34 | @note Subclass override. 35 | */ 36 | @property (class, readonly, nonnull) NSString *dictionaryProperty; 37 | /** 38 | The image unclamped deply time property key used in Image/IO API. Such as `kCGImagePropertyGIFUnclampedDelayTime` 39 | @note Subclass override. 40 | */ 41 | @property (class, readonly, nonnull) NSString *unclampedDelayTimeProperty; 42 | /** 43 | The image delay time property key used in Image/IO API. Such as `kCGImagePropertyGIFDelayTime`. 44 | @note Subclass override. 45 | */ 46 | @property (class, readonly, nonnull) NSString *delayTimeProperty; 47 | /** 48 | The image loop count property key used in Image/IO API. Such as `kCGImagePropertyGIFLoopCount`. 49 | @note Subclass override. 50 | */ 51 | @property (class, readonly, nonnull) NSString *loopCountProperty; 52 | /** 53 | The default loop count when there are no any loop count information inside image container metadata. 54 | For example, for GIF format, the standard use 1 (play once). For APNG format, the standard use 0 (infinity loop). 55 | @note Subclass override. 56 | */ 57 | @property (class, readonly) NSUInteger defaultLoopCount; 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDWebImageOptionsProcessor.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 | #import "SDWebImageDefine.h" 12 | 13 | @class SDWebImageOptionsResult; 14 | 15 | typedef SDWebImageOptionsResult * _Nullable(^SDWebImageOptionsProcessorBlock)(NSURL * _Nullable url, SDWebImageOptions options, SDWebImageContext * _Nullable context); 16 | 17 | /** 18 | The options result contains both options and context. 19 | */ 20 | @interface SDWebImageOptionsResult : NSObject 21 | 22 | /** 23 | WebCache options. 24 | */ 25 | @property (nonatomic, assign, readonly) SDWebImageOptions options; 26 | 27 | /** 28 | Context options. 29 | */ 30 | @property (nonatomic, copy, readonly, nullable) SDWebImageContext *context; 31 | 32 | /** 33 | Create a new options result. 34 | 35 | @param options options 36 | @param context context 37 | @return The options result contains both options and context. 38 | */ 39 | - (nonnull instancetype)initWithOptions:(SDWebImageOptions)options context:(nullable SDWebImageContext *)context; 40 | 41 | @end 42 | 43 | /** 44 | This is the protocol for options processor. 45 | Options processor can be used, to control the final result for individual image request's `SDWebImageOptions` and `SDWebImageContext` 46 | Implements the protocol to have a global control for each indivadual image request's option. 47 | */ 48 | @protocol SDWebImageOptionsProcessor 49 | 50 | /** 51 | Return the processed options result for specify image URL, with its options and context 52 | 53 | @param url The URL to the image 54 | @param options A mask to specify options to use for this request 55 | @param context A context contains different options to perform specify changes or processes, see `SDWebImageContextOption`. This hold the extra objects which `options` enum can not hold. 56 | @return The processed result, contains both options and context 57 | */ 58 | - (nullable SDWebImageOptionsResult *)processedResultForURL:(nullable NSURL *)url 59 | options:(SDWebImageOptions)options 60 | context:(nullable SDWebImageContext *)context; 61 | 62 | @end 63 | 64 | /** 65 | A options processor class with block. 66 | */ 67 | @interface SDWebImageOptionsProcessor : NSObject 68 | 69 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageOptionsProcessorBlock)block; 70 | + (nonnull instancetype)optionsProcessorWithBlock:(nonnull SDWebImageOptionsProcessorBlock)block; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | #if SD_MAC 12 | 13 | /** 14 | This category is provided to easily write cross-platform(AppKit/UIKit) code. For common usage, see `UIImage+Metadata.h`. 15 | */ 16 | @interface NSImage (Compatibility) 17 | 18 | /** 19 | The underlying Core Graphics image object. This will actually use `CGImageForProposedRect` with the image size. 20 | */ 21 | @property (nonatomic, readonly, nullable) CGImageRef CGImage; 22 | /** 23 | 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. 24 | */ 25 | @property (nonatomic, readonly) CGFloat scale; 26 | 27 | // 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. 28 | 29 | /** 30 | Returns an image object with the scale factor and orientation. The representation is created from the Core Graphics image object. 31 | @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. 32 | @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. 33 | 34 | @param cgImage A Core Graphics image object 35 | @param scale The image scale factor 36 | @param orientation The orientation of the image data 37 | @return The image object 38 | */ 39 | - (nonnull instancetype)initWithCGImage:(nonnull CGImageRef)cgImage scale:(CGFloat)scale orientation:(CGImagePropertyOrientation)orientation; 40 | 41 | /** 42 | Returns an image object with the scale factor. The representation is created from the image data. 43 | @note The difference between these this and `initWithData:` is that `initWithData:` will always use `backingScaleFactor` as scale factor. 44 | 45 | @param data The image data 46 | @param scale The image scale factor 47 | @return The image object 48 | */ 49 | - (nullable instancetype)initWithData:(nonnull NSData *)data scale:(CGFloat)scale; 50 | 51 | @end 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 13 | A protocol to allow custom memory cache used in SDImageCache. 14 | */ 15 | @protocol SDMemoryCache 16 | 17 | @required 18 | /** 19 | Create a new memory cache instance with the specify cache config. You can check `maxMemoryCost` and `maxMemoryCount` used for memory cache. 20 | 21 | @param config The cache config to be used to create the cache. 22 | @return The new memory cache instance. 23 | */ 24 | - (nonnull instancetype)initWithConfig:(nonnull SDImageCacheConfig *)config; 25 | 26 | /** 27 | Returns the value associated with a given key. 28 | 29 | @param key An object identifying the value. If nil, just return nil. 30 | @return The value associated with key, or nil if no value is associated with key. 31 | */ 32 | - (nullable id)objectForKey:(nonnull id)key; 33 | 34 | /** 35 | Sets the value of the specified key in the cache (0 cost). 36 | 37 | @param object The object to be stored in the cache. If nil, it calls `removeObjectForKey:`. 38 | @param key The key with which to associate the value. If nil, this method has no effect. 39 | @discussion Unlike an NSMutableDictionary object, a cache does not copy the key 40 | objects that are put into it. 41 | */ 42 | - (void)setObject:(nullable id)object forKey:(nonnull id)key; 43 | 44 | /** 45 | Sets the value of the specified key in the cache, and associates the key-value 46 | pair with the specified cost. 47 | 48 | @param object The object to store in the cache. If nil, it calls `removeObjectForKey`. 49 | @param key The key with which to associate the value. If nil, this method has no effect. 50 | @param cost The cost with which to associate the key-value pair. 51 | @discussion Unlike an NSMutableDictionary object, a cache does not copy the key 52 | objects that are put into it. 53 | */ 54 | - (void)setObject:(nullable id)object forKey:(nonnull id)key cost:(NSUInteger)cost; 55 | 56 | /** 57 | Removes the value of the specified key in the cache. 58 | 59 | @param key The key identifying the value to be removed. If nil, this method has no effect. 60 | */ 61 | - (void)removeObjectForKey:(nonnull id)key; 62 | 63 | /** 64 | Empties the cache immediately. 65 | */ 66 | - (void)removeAllObjects; 67 | 68 | @end 69 | 70 | /** 71 | A memory cache which auto purge the cache on memory warning and support weak cache. 72 | */ 73 | @interface SDMemoryCache : NSCache 74 | 75 | @property (nonatomic, strong, nonnull, readonly) SDImageCacheConfig *config; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /Pods/Alamofire/Source/Notifications.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Notifications.swift 3 | // 4 | // Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | 27 | extension Notification.Name { 28 | /// Used as a namespace for all `URLSessionTask` related notifications. 29 | public struct Task { 30 | /// Posted when a `URLSessionTask` is resumed. The notification `object` contains the resumed `URLSessionTask`. 31 | public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume") 32 | 33 | /// Posted when a `URLSessionTask` is suspended. The notification `object` contains the suspended `URLSessionTask`. 34 | public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend") 35 | 36 | /// Posted when a `URLSessionTask` is cancelled. The notification `object` contains the cancelled `URLSessionTask`. 37 | public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel") 38 | 39 | /// Posted when a `URLSessionTask` is completed. The notification `object` contains the completed `URLSessionTask`. 40 | public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete") 41 | } 42 | } 43 | 44 | // MARK: - 45 | 46 | extension Notification { 47 | /// Used as a namespace for all `Notification` user info dictionary keys. 48 | public struct Key { 49 | /// User info dictionary key representing the `URLSessionTask` associated with the notification. 50 | public static let Task = "org.alamofire.notification.key.task" 51 | 52 | /// User info dictionary key representing the responseData associated with the notification. 53 | public static let ResponseData = "org.alamofire.notification.key.responseData" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /// Policy for cache operation 13 | typedef NS_ENUM(NSUInteger, SDImageCachesManagerOperationPolicy) { 14 | SDImageCachesManagerOperationPolicySerial, // process all caches serially (from the highest priority to the lowest priority cache by order) 15 | SDImageCachesManagerOperationPolicyConcurrent, // process all caches concurrently 16 | SDImageCachesManagerOperationPolicyHighestOnly, // process the highest priority cache only 17 | SDImageCachesManagerOperationPolicyLowestOnly // process the lowest priority cache only 18 | }; 19 | 20 | /** 21 | A caches manager to manage multiple caches. 22 | */ 23 | @interface SDImageCachesManager : NSObject 24 | 25 | /** 26 | Returns the global shared caches manager instance. By default we will set [`SDImageCache.sharedImageCache`] into the caches array. 27 | */ 28 | @property (nonatomic, class, readonly, nonnull) SDImageCachesManager *sharedManager; 29 | 30 | // These are op policy for cache manager. 31 | 32 | /** 33 | Operation policy for query op. 34 | Defaults to `Serial`, means query all caches serially (one completion called then next begin) until one cache query success (`image` != nil). 35 | */ 36 | @property (nonatomic, assign) SDImageCachesManagerOperationPolicy queryOperationPolicy; 37 | 38 | /** 39 | Operation policy for store op. 40 | Defaults to `HighestOnly`, means store to the highest priority cache only. 41 | */ 42 | @property (nonatomic, assign) SDImageCachesManagerOperationPolicy storeOperationPolicy; 43 | 44 | /** 45 | Operation policy for remove op. 46 | Defaults to `Concurrent`, means remove all caches concurrently. 47 | */ 48 | @property (nonatomic, assign) SDImageCachesManagerOperationPolicy removeOperationPolicy; 49 | 50 | /** 51 | Operation policy for contains op. 52 | Defaults to `Serial`, means check all caches serially (one completion called then next begin) until one cache check success (`containsCacheType` != None). 53 | */ 54 | @property (nonatomic, assign) SDImageCachesManagerOperationPolicy containsOperationPolicy; 55 | 56 | /** 57 | Operation policy for clear op. 58 | Defaults to `Concurrent`, means clear all caches concurrently. 59 | */ 60 | @property (nonatomic, assign) SDImageCachesManagerOperationPolicy clearOperationPolicy; 61 | 62 | /** 63 | All caches in caches manager. The caches array is a priority queue, which means the later added cache will have the highest priority 64 | */ 65 | @property (nonatomic, copy, nullable) NSArray> *caches; 66 | 67 | /** 68 | Add a new cache to the end of caches array. Which has the highest priority. 69 | 70 | @param cache cache 71 | */ 72 | - (void)addCache:(nonnull id)cache; 73 | 74 | /** 75 | Remove a cache in the caches array. 76 | 77 | @param cache cache 78 | */ 79 | - (void)removeCache:(nonnull id)cache; 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/SDWebImage/Core/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 | #import "SDInternalMacros.h" 15 | 16 | UIImage * _Nullable SDImageCacheDecodeImageData(NSData * _Nonnull imageData, NSString * _Nonnull cacheKey, SDWebImageOptions options, SDWebImageContext * _Nullable context) { 17 | UIImage *image; 18 | BOOL decodeFirstFrame = SD_OPTIONS_CONTAINS(options, SDWebImageDecodeFirstFrameOnly); 19 | NSNumber *scaleValue = context[SDWebImageContextImageScaleFactor]; 20 | CGFloat scale = scaleValue.doubleValue >= 1 ? scaleValue.doubleValue : SDImageScaleFactorForKey(cacheKey); 21 | SDImageCoderOptions *coderOptions = @{SDImageCoderDecodeFirstFrameOnly : @(decodeFirstFrame), SDImageCoderDecodeScaleFactor : @(scale)}; 22 | if (context) { 23 | SDImageCoderMutableOptions *mutableCoderOptions = [coderOptions mutableCopy]; 24 | [mutableCoderOptions setValue:context forKey:SDImageCoderWebImageContext]; 25 | coderOptions = [mutableCoderOptions copy]; 26 | } 27 | 28 | if (!decodeFirstFrame) { 29 | Class animatedImageClass = context[SDWebImageContextAnimatedImageClass]; 30 | // check whether we should use `SDAnimatedImage` 31 | if ([animatedImageClass isSubclassOfClass:[UIImage class]] && [animatedImageClass conformsToProtocol:@protocol(SDAnimatedImage)]) { 32 | image = [[animatedImageClass alloc] initWithData:imageData scale:scale options:coderOptions]; 33 | if (image) { 34 | // Preload frames if supported 35 | if (options & SDWebImagePreloadAllFrames && [image respondsToSelector:@selector(preloadAllFrames)]) { 36 | [((id)image) preloadAllFrames]; 37 | } 38 | } else { 39 | // Check image class matching 40 | if (options & SDWebImageMatchAnimatedImageClass) { 41 | return nil; 42 | } 43 | } 44 | } 45 | } 46 | if (!image) { 47 | image = [[SDImageCodersManager sharedManager] decodedImageWithData:imageData options:coderOptions]; 48 | } 49 | if (image) { 50 | BOOL shouldDecode = !SD_OPTIONS_CONTAINS(options, SDWebImageAvoidDecodeImage); 51 | if ([image.class conformsToProtocol:@protocol(SDAnimatedImage)]) { 52 | // `SDAnimatedImage` do not decode 53 | shouldDecode = NO; 54 | } else if (image.sd_isAnimated) { 55 | // animated image do not decode 56 | shouldDecode = NO; 57 | } 58 | if (shouldDecode) { 59 | BOOL shouldScaleDown = SD_OPTIONS_CONTAINS(options, SDWebImageScaleDownLargeImages); 60 | if (shouldScaleDown) { 61 | image = [SDImageCoderHelper decodedAndScaledDownImageWithImage:image limitBytes:0]; 62 | } else { 63 | image = [SDImageCoderHelper decodedImageWithImage:image]; 64 | } 65 | } 66 | } 67 | 68 | return image; 69 | } 70 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 13 | UIImage category for convenient image format decoding/encoding. 14 | */ 15 | @interface UIImage (MultiFormat) 16 | #pragma mark - Decode 17 | /** 18 | Create and decode a image with the specify image data 19 | 20 | @param data The image data 21 | @return The created image 22 | */ 23 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data; 24 | 25 | /** 26 | Create and decode a image with the specify image data and scale 27 | 28 | @param data The image data 29 | @param scale The image scale factor. Should be greater than or equal to 1.0. 30 | @return The created image 31 | */ 32 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data scale:(CGFloat)scale; 33 | 34 | /** 35 | Create and decode a image with the specify image data and scale, allow specify animate/static control 36 | 37 | @param data The image data 38 | @param scale The image scale factor. Should be greater than or equal to 1.0. 39 | @param firstFrameOnly Even if the image data is animated image format, decode the first frame only as static image. 40 | @return The created image 41 | */ 42 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data scale:(CGFloat)scale firstFrameOnly:(BOOL)firstFrameOnly; 43 | 44 | #pragma mark - Encode 45 | /** 46 | Encode the current image to the data, the image format is unspecified 47 | 48 | @return The encoded data. If can't encode, return nil 49 | */ 50 | - (nullable NSData *)sd_imageData; 51 | 52 | /** 53 | Encode the current image to data with the specify image format 54 | 55 | @param imageFormat The specify image format 56 | @return The encoded data. If can't encode, return nil 57 | */ 58 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat NS_SWIFT_NAME(sd_imageData(as:)); 59 | 60 | /** 61 | Encode the current image to data with the specify image format and compression quality 62 | 63 | @param imageFormat The specify image format 64 | @param compressionQuality The quality of the resulting image data. Value between 0.0-1.0. Some coders may not support compression quality. 65 | @return The encoded data. If can't encode, return nil 66 | */ 67 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality NS_SWIFT_NAME(sd_imageData(as:compressionQuality:)); 68 | 69 | /** 70 | Encode the current image to data with the specify image format and compression quality, allow specify animate/static control 71 | 72 | @param imageFormat The specify image format 73 | @param compressionQuality The quality of the resulting image data. Value between 0.0-1.0. Some coders may not support compression quality. 74 | @param firstFrameOnly Even if the image is animated image, encode the first frame only as static image. 75 | @return The encoded data. If can't encode, return nil 76 | */ 77 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality firstFrameOnly:(BOOL)firstFrameOnly NS_SWIFT_NAME(sd_imageData(as:compressionQuality:firstFrameOnly:)); 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | - (nullable 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:(nonnull 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:(nonnull 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/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 | #import 70 | #import 71 | #import 72 | #import 73 | #import 74 | #import 75 | 76 | // Mac 77 | #if __has_include() 78 | #import 79 | #endif 80 | #if __has_include() 81 | #import 82 | #endif 83 | #if __has_include() 84 | #import 85 | #endif 86 | 87 | // MapKit 88 | #if __has_include() 89 | #import 90 | #endif 91 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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/Core/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 | #import "SDInternalMacros.h" 16 | 17 | static NSString * const SDHighlightedImageOperationKey = @"UIImageViewImageOperationHighlighted"; 18 | 19 | @implementation UIImageView (HighlightedWebCache) 20 | 21 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url { 22 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil]; 23 | } 24 | 25 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options { 26 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil]; 27 | } 28 | 29 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options context:(nullable SDWebImageContext *)context { 30 | [self sd_setHighlightedImageWithURL:url options:options context:context progress:nil completed:nil]; 31 | } 32 | 33 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url completed:(nullable SDExternalCompletionBlock)completedBlock { 34 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:completedBlock]; 35 | } 36 | 37 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options completed:(nullable SDExternalCompletionBlock)completedBlock { 38 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock]; 39 | } 40 | 41 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { 42 | [self sd_setHighlightedImageWithURL:url options:options context:nil progress:progressBlock completed:completedBlock]; 43 | } 44 | 45 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url 46 | options:(SDWebImageOptions)options 47 | context:(nullable SDWebImageContext *)context 48 | progress:(nullable SDImageLoaderProgressBlock)progressBlock 49 | completed:(nullable SDExternalCompletionBlock)completedBlock { 50 | @weakify(self); 51 | SDWebImageMutableContext *mutableContext; 52 | if (context) { 53 | mutableContext = [context mutableCopy]; 54 | } else { 55 | mutableContext = [NSMutableDictionary dictionary]; 56 | } 57 | mutableContext[SDWebImageContextSetImageOperationKey] = SDHighlightedImageOperationKey; 58 | [self sd_internalSetImageWithURL:url 59 | placeholderImage:nil 60 | options:options 61 | context:mutableContext 62 | setImageBlock:^(UIImage * _Nullable image, NSData * _Nullable imageData, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { 63 | @strongify(self); 64 | self.highlightedImage = image; 65 | } 66 | progress:progressBlock 67 | completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) { 68 | if (completedBlock) { 69 | completedBlock(image, error, cacheType, imageURL); 70 | } 71 | }]; 72 | } 73 | 74 | @end 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | #import "SDInternalMacros.h" 12 | 13 | @interface SDImageLoadersManager () 14 | 15 | @property (nonatomic, strong, nonnull) dispatch_semaphore_t loadersLock; 16 | 17 | @end 18 | 19 | @implementation SDImageLoadersManager 20 | { 21 | NSMutableArray>* _imageLoaders; 22 | } 23 | 24 | + (SDImageLoadersManager *)sharedManager { 25 | static dispatch_once_t onceToken; 26 | static SDImageLoadersManager *manager; 27 | dispatch_once(&onceToken, ^{ 28 | manager = [[SDImageLoadersManager alloc] init]; 29 | }); 30 | return manager; 31 | } 32 | 33 | - (instancetype)init { 34 | self = [super init]; 35 | if (self) { 36 | // initialize with default image loaders 37 | _imageLoaders = [NSMutableArray arrayWithObject:[SDWebImageDownloader sharedDownloader]]; 38 | _loadersLock = dispatch_semaphore_create(1); 39 | } 40 | return self; 41 | } 42 | 43 | - (NSArray> *)loaders { 44 | SD_LOCK(self.loadersLock); 45 | NSArray>* loaders = [_imageLoaders copy]; 46 | SD_UNLOCK(self.loadersLock); 47 | return loaders; 48 | } 49 | 50 | - (void)setLoaders:(NSArray> *)loaders { 51 | SD_LOCK(self.loadersLock); 52 | [_imageLoaders removeAllObjects]; 53 | if (loaders.count) { 54 | [_imageLoaders addObjectsFromArray:loaders]; 55 | } 56 | SD_UNLOCK(self.loadersLock); 57 | } 58 | 59 | #pragma mark - Loader Property 60 | 61 | - (void)addLoader:(id)loader { 62 | if (![loader conformsToProtocol:@protocol(SDImageLoader)]) { 63 | return; 64 | } 65 | SD_LOCK(self.loadersLock); 66 | [_imageLoaders addObject:loader]; 67 | SD_UNLOCK(self.loadersLock); 68 | } 69 | 70 | - (void)removeLoader:(id)loader { 71 | if (![loader conformsToProtocol:@protocol(SDImageLoader)]) { 72 | return; 73 | } 74 | SD_LOCK(self.loadersLock); 75 | [_imageLoaders removeObject:loader]; 76 | SD_UNLOCK(self.loadersLock); 77 | } 78 | 79 | #pragma mark - SDImageLoader 80 | 81 | - (BOOL)canRequestImageForURL:(nullable NSURL *)url { 82 | NSArray> *loaders = self.loaders; 83 | for (id loader in loaders.reverseObjectEnumerator) { 84 | if ([loader canRequestImageForURL:url]) { 85 | return YES; 86 | } 87 | } 88 | return NO; 89 | } 90 | 91 | - (id)requestImageWithURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDImageLoaderCompletedBlock)completedBlock { 92 | if (!url) { 93 | return nil; 94 | } 95 | NSArray> *loaders = self.loaders; 96 | for (id loader in loaders.reverseObjectEnumerator) { 97 | if ([loader canRequestImageForURL:url]) { 98 | return [loader requestImageWithURL:url options:options context:context progress:progressBlock completed:completedBlock]; 99 | } 100 | } 101 | return nil; 102 | } 103 | 104 | - (BOOL)shouldBlockFailedURLWithURL:(NSURL *)url error:(NSError *)error { 105 | NSArray> *loaders = self.loaders; 106 | for (id loader in loaders.reverseObjectEnumerator) { 107 | if ([loader canRequestImageForURL:url]) { 108 | return [loader shouldBlockFailedURLWithURL:url error:error]; 109 | } 110 | } 111 | return NO; 112 | } 113 | 114 | @end 115 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /** 14 | A protocol to custom the indicator during the image loading. 15 | All of these methods are called from main queue. 16 | */ 17 | @protocol SDWebImageIndicator 18 | 19 | @required 20 | /** 21 | The view associate to the indicator. 22 | 23 | @return The indicator view 24 | */ 25 | @property (nonatomic, strong, readonly, nonnull) UIView *indicatorView; 26 | 27 | /** 28 | Start the animating for indicator. 29 | */ 30 | - (void)startAnimatingIndicator; 31 | 32 | /** 33 | Stop the animating for indicator. 34 | */ 35 | - (void)stopAnimatingIndicator; 36 | 37 | @optional 38 | /** 39 | Update the loading progress (0-1.0) for indicator. Optional 40 | 41 | @param progress The progress, value between 0 and 1.0 42 | */ 43 | - (void)updateIndicatorProgress:(double)progress; 44 | 45 | @end 46 | 47 | #pragma mark - Activity Indicator 48 | 49 | /** 50 | Activity indicator class. 51 | for UIKit(macOS), it use a `UIActivityIndicatorView`. 52 | for AppKit(macOS), it use a `NSProgressIndicator` with the spinning style. 53 | */ 54 | @interface SDWebImageActivityIndicator : NSObject 55 | 56 | #if SD_UIKIT 57 | @property (nonatomic, strong, readonly, nonnull) UIActivityIndicatorView *indicatorView; 58 | #else 59 | @property (nonatomic, strong, readonly, nonnull) NSProgressIndicator *indicatorView; 60 | #endif 61 | 62 | @end 63 | 64 | /** 65 | Convenience way to use activity indicator. 66 | */ 67 | @interface SDWebImageActivityIndicator (Conveniences) 68 | 69 | /// These indicator use the fixed color without dark mode support 70 | /// gray-style activity indicator 71 | @property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *grayIndicator; 72 | /// large gray-style activity indicator 73 | @property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *grayLargeIndicator; 74 | /// white-style activity indicator 75 | @property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *whiteIndicator; 76 | /// large white-style activity indicator 77 | @property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *whiteLargeIndicator; 78 | /// These indicator use the system style, supports dark mode if available (iOS 13+/macOS 10.14+) 79 | /// large activity indicator 80 | @property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *largeIndicator; 81 | /// medium activity indicator 82 | @property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *mediumIndicator; 83 | 84 | @end 85 | 86 | #pragma mark - Progress Indicator 87 | 88 | /** 89 | Progress indicator class. 90 | for UIKit(macOS), it use a `UIProgressView`. 91 | for AppKit(macOS), it use a `NSProgressIndicator` with the bar style. 92 | */ 93 | @interface SDWebImageProgressIndicator : NSObject 94 | 95 | #if SD_UIKIT 96 | @property (nonatomic, strong, readonly, nonnull) UIProgressView *indicatorView; 97 | #else 98 | @property (nonatomic, strong, readonly, nonnull) NSProgressIndicator *indicatorView; 99 | #endif 100 | 101 | @end 102 | 103 | /** 104 | Convenience way to create progress indicator. Remember to specify the indicator width or use layout constraint if need. 105 | */ 106 | @interface SDWebImageProgressIndicator (Conveniences) 107 | 108 | /// default-style progress indicator 109 | @property (nonatomic, class, nonnull, readonly) SDWebImageProgressIndicator *defaultIndicator; 110 | /// bar-style progress indicator 111 | @property (nonatomic, class, nonnull, readonly) SDWebImageProgressIndicator *barIndicator API_UNAVAILABLE(macos, tvos); 112 | 113 | @end 114 | 115 | #endif 116 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDImageGraphics.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 "SDImageGraphics.h" 10 | #import "NSImage+Compatibility.h" 11 | #import "objc/runtime.h" 12 | 13 | #if SD_MAC 14 | static void *kNSGraphicsContextScaleFactorKey; 15 | 16 | static CGContextRef SDCGContextCreateBitmapContext(CGSize size, BOOL opaque, CGFloat scale) { 17 | if (scale == 0) { 18 | // Match `UIGraphicsBeginImageContextWithOptions`, reset to the scale factor of the device’s main screen if scale is 0. 19 | scale = [NSScreen mainScreen].backingScaleFactor; 20 | } 21 | size_t width = ceil(size.width * scale); 22 | size_t height = ceil(size.height * scale); 23 | if (width < 1 || height < 1) return NULL; 24 | 25 | //pre-multiplied BGRA for non-opaque, BGRX for opaque, 8-bits per component, as Apple's doc 26 | CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); 27 | CGImageAlphaInfo alphaInfo = kCGBitmapByteOrder32Host | (opaque ? kCGImageAlphaNoneSkipFirst : kCGImageAlphaPremultipliedFirst); 28 | CGContextRef context = CGBitmapContextCreate(NULL, width, height, 8, 0, space, kCGBitmapByteOrderDefault | alphaInfo); 29 | CGColorSpaceRelease(space); 30 | if (!context) { 31 | return NULL; 32 | } 33 | CGContextScaleCTM(context, scale, scale); 34 | 35 | return context; 36 | } 37 | #endif 38 | 39 | CGContextRef SDGraphicsGetCurrentContext(void) { 40 | #if SD_UIKIT || SD_WATCH 41 | return UIGraphicsGetCurrentContext(); 42 | #else 43 | return NSGraphicsContext.currentContext.CGContext; 44 | #endif 45 | } 46 | 47 | void SDGraphicsBeginImageContext(CGSize size) { 48 | #if SD_UIKIT || SD_WATCH 49 | UIGraphicsBeginImageContext(size); 50 | #else 51 | SDGraphicsBeginImageContextWithOptions(size, NO, 1.0); 52 | #endif 53 | } 54 | 55 | void SDGraphicsBeginImageContextWithOptions(CGSize size, BOOL opaque, CGFloat scale) { 56 | #if SD_UIKIT || SD_WATCH 57 | UIGraphicsBeginImageContextWithOptions(size, opaque, scale); 58 | #else 59 | CGContextRef context = SDCGContextCreateBitmapContext(size, opaque, scale); 60 | if (!context) { 61 | return; 62 | } 63 | NSGraphicsContext *graphicsContext = [NSGraphicsContext graphicsContextWithCGContext:context flipped:NO]; 64 | objc_setAssociatedObject(graphicsContext, &kNSGraphicsContextScaleFactorKey, @(scale), OBJC_ASSOCIATION_RETAIN); 65 | CGContextRelease(context); 66 | [NSGraphicsContext saveGraphicsState]; 67 | NSGraphicsContext.currentContext = graphicsContext; 68 | #endif 69 | } 70 | 71 | void SDGraphicsEndImageContext(void) { 72 | #if SD_UIKIT || SD_WATCH 73 | UIGraphicsEndImageContext(); 74 | #else 75 | [NSGraphicsContext restoreGraphicsState]; 76 | #endif 77 | } 78 | 79 | UIImage * SDGraphicsGetImageFromCurrentImageContext(void) { 80 | #if SD_UIKIT || SD_WATCH 81 | return UIGraphicsGetImageFromCurrentImageContext(); 82 | #else 83 | NSGraphicsContext *context = NSGraphicsContext.currentContext; 84 | CGContextRef contextRef = context.CGContext; 85 | if (!contextRef) { 86 | return nil; 87 | } 88 | CGImageRef imageRef = CGBitmapContextCreateImage(contextRef); 89 | if (!imageRef) { 90 | return nil; 91 | } 92 | CGFloat scale = 0; 93 | NSNumber *scaleFactor = objc_getAssociatedObject(context, &kNSGraphicsContextScaleFactorKey); 94 | if ([scaleFactor isKindOfClass:[NSNumber class]]) { 95 | scale = scaleFactor.doubleValue; 96 | } 97 | if (!scale) { 98 | // reset to the scale factor of the device’s main screen if scale is 0. 99 | scale = [NSScreen mainScreen].backingScaleFactor; 100 | } 101 | NSImage *image = [[NSImage alloc] initWithCGImage:imageRef scale:scale orientation:kCGImagePropertyOrientationUp]; 102 | CGImageRelease(imageRef); 103 | return image; 104 | #endif 105 | } 106 | -------------------------------------------------------------------------------- /WhatFlower/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "57x57", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-57x57@1x.png", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "size" : "57x57", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-57x57@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "60x60", 59 | "idiom" : "iphone", 60 | "filename" : "Icon-App-60x60@2x.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "60x60", 65 | "idiom" : "iphone", 66 | "filename" : "Icon-App-60x60@3x.png", 67 | "scale" : "3x" 68 | }, 69 | { 70 | "size" : "20x20", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-20x20@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "20x20", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-20x20@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "29x29", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-29x29@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "29x29", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-29x29@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "40x40", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-40x40@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "40x40", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-40x40@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "50x50", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-Small-50x50@1x.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "50x50", 113 | "idiom" : "ipad", 114 | "filename" : "Icon-Small-50x50@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "72x72", 119 | "idiom" : "ipad", 120 | "filename" : "Icon-App-72x72@1x.png", 121 | "scale" : "1x" 122 | }, 123 | { 124 | "size" : "72x72", 125 | "idiom" : "ipad", 126 | "filename" : "Icon-App-72x72@2x.png", 127 | "scale" : "2x" 128 | }, 129 | { 130 | "size" : "76x76", 131 | "idiom" : "ipad", 132 | "filename" : "Icon-App-76x76@1x.png", 133 | "scale" : "1x" 134 | }, 135 | { 136 | "size" : "76x76", 137 | "idiom" : "ipad", 138 | "filename" : "Icon-App-76x76@2x.png", 139 | "scale" : "2x" 140 | }, 141 | { 142 | "size" : "83.5x83.5", 143 | "idiom" : "ipad", 144 | "filename" : "Icon-App-83.5x83.5@2x.png", 145 | "scale" : "2x" 146 | }, 147 | { 148 | "size" : "1024x1024", 149 | "idiom" : "ios-marketing", 150 | "filename" : "Icon-1024.png", 151 | "scale" : "1x" 152 | } 153 | ], 154 | "info" : { 155 | "version" : 1, 156 | "author" : "xcode" 157 | } 158 | } -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView+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 "SDAnimatedImageView+WebCache.h" 10 | 11 | #if SD_UIKIT || SD_MAC 12 | 13 | #import "UIView+WebCache.h" 14 | #import "SDAnimatedImage.h" 15 | 16 | @implementation SDAnimatedImageView (WebCache) 17 | 18 | - (void)sd_setImageWithURL:(nullable NSURL *)url { 19 | [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:nil]; 20 | } 21 | 22 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder { 23 | [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:nil]; 24 | } 25 | 26 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options { 27 | [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil]; 28 | } 29 | 30 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options context:(nullable SDWebImageContext *)context { 31 | [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:context progress:nil completed:nil]; 32 | } 33 | 34 | - (void)sd_setImageWithURL:(nullable NSURL *)url completed:(nullable SDExternalCompletionBlock)completedBlock { 35 | [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:completedBlock]; 36 | } 37 | 38 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder completed:(nullable SDExternalCompletionBlock)completedBlock { 39 | [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:completedBlock]; 40 | } 41 | 42 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options completed:(nullable SDExternalCompletionBlock)completedBlock { 43 | [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; 44 | } 45 | 46 | - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { 47 | [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock]; 48 | } 49 | 50 | - (void)sd_setImageWithURL:(nullable NSURL *)url 51 | placeholderImage:(nullable UIImage *)placeholder 52 | options:(SDWebImageOptions)options 53 | context:(nullable SDWebImageContext *)context 54 | progress:(nullable SDImageLoaderProgressBlock)progressBlock 55 | completed:(nullable SDExternalCompletionBlock)completedBlock { 56 | Class animatedImageClass = [SDAnimatedImage class]; 57 | SDWebImageMutableContext *mutableContext; 58 | if (context) { 59 | mutableContext = [context mutableCopy]; 60 | } else { 61 | mutableContext = [NSMutableDictionary dictionary]; 62 | } 63 | mutableContext[SDWebImageContextAnimatedImageClass] = animatedImageClass; 64 | [self sd_internalSetImageWithURL:url 65 | placeholderImage:placeholder 66 | options:options 67 | context:mutableContext 68 | setImageBlock:nil 69 | progress:progressBlock 70 | completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) { 71 | if (completedBlock) { 72 | completedBlock(image, error, cacheType, imageURL); 73 | } 74 | }]; 75 | } 76 | 77 | @end 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/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 | /// Operation execution order 13 | typedef NS_ENUM(NSInteger, SDWebImageDownloaderExecutionOrder) { 14 | /** 15 | * Default value. All download operations will execute in queue style (first-in-first-out). 16 | */ 17 | SDWebImageDownloaderFIFOExecutionOrder, 18 | 19 | /** 20 | * All download operations will execute in stack style (last-in-first-out). 21 | */ 22 | SDWebImageDownloaderLIFOExecutionOrder 23 | }; 24 | 25 | /** 26 | The class contains all the config for image downloader 27 | @note This class conform to NSCopying, make sure to add the property in `copyWithZone:` as well. 28 | */ 29 | @interface SDWebImageDownloaderConfig : NSObject 30 | 31 | /** 32 | Gets the default downloader config used for shared instance or initialization when it does not provide any downloader config. Such as `SDWebImageDownloader.sharedDownloader`. 33 | @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. 34 | */ 35 | @property (nonatomic, class, readonly, nonnull) SDWebImageDownloaderConfig *defaultDownloaderConfig; 36 | 37 | /** 38 | * The maximum number of concurrent downloads. 39 | * Defaults to 6. 40 | */ 41 | @property (nonatomic, assign) NSInteger maxConcurrentDownloads; 42 | 43 | /** 44 | * The timeout value (in seconds) for each download operation. 45 | * Defaults to 15.0. 46 | */ 47 | @property (nonatomic, assign) NSTimeInterval downloadTimeout; 48 | 49 | /** 50 | * 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. 51 | * The value should be 0.0-1.0. 52 | * @note If you're using progressive decoding feature, this will also effect the image refresh rate. 53 | * @note This value may enhance the performance if you don't want progress callback too frequently. 54 | * Defaults to 0, which means each time we receive the new data from URLSession, we callback the progressBlock immediately. 55 | */ 56 | @property (nonatomic, assign) double minimumProgressInterval; 57 | 58 | /** 59 | * The custom session configuration in use by NSURLSession. If you don't provide one, we will use `defaultSessionConfiguration` instead. 60 | * Defatuls to nil. 61 | * @note This property does not support dynamic changes, means it's immutable after the downloader instance initialized. 62 | */ 63 | @property (nonatomic, strong, nullable) NSURLSessionConfiguration *sessionConfiguration; 64 | 65 | /** 66 | * Gets/Sets a subclass of `SDWebImageDownloaderOperation` as the default 67 | * `NSOperation` to be used each time SDWebImage constructs a request 68 | * operation to download an image. 69 | * Defaults to nil. 70 | * @note Passing `NSOperation` to set as default. Passing `nil` will revert to `SDWebImageDownloaderOperation`. 71 | */ 72 | @property (nonatomic, assign, nullable) Class operationClass; 73 | 74 | /** 75 | * Changes download operations execution order. 76 | * Defaults to `SDWebImageDownloaderFIFOExecutionOrder`. 77 | */ 78 | @property (nonatomic, assign) SDWebImageDownloaderExecutionOrder executionOrder; 79 | 80 | /** 81 | * Set the default URL credential to be set for request operations. 82 | * Defaults to nil. 83 | */ 84 | @property (nonatomic, copy, nullable) NSURLCredential *urlCredential; 85 | 86 | /** 87 | * Set username using for HTTP Basic authentication. 88 | * Defaults to nil. 89 | */ 90 | @property (nonatomic, copy, nullable) NSString *username; 91 | 92 | /** 93 | * Set password using for HTTP Basic authentication. 94 | * Defautls to nil. 95 | */ 96 | @property (nonatomic, copy, nullable) NSString *password; 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/UIImage+Metadata.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+Metadata.h" 10 | #import "NSImage+Compatibility.h" 11 | #import "objc/runtime.h" 12 | 13 | @implementation UIImage (Metadata) 14 | 15 | #if SD_UIKIT || SD_WATCH 16 | 17 | - (NSUInteger)sd_imageLoopCount { 18 | NSUInteger imageLoopCount = 0; 19 | NSNumber *value = objc_getAssociatedObject(self, @selector(sd_imageLoopCount)); 20 | if ([value isKindOfClass:[NSNumber class]]) { 21 | imageLoopCount = value.unsignedIntegerValue; 22 | } 23 | return imageLoopCount; 24 | } 25 | 26 | - (void)setSd_imageLoopCount:(NSUInteger)sd_imageLoopCount { 27 | NSNumber *value = @(sd_imageLoopCount); 28 | objc_setAssociatedObject(self, @selector(sd_imageLoopCount), value, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 29 | } 30 | 31 | - (BOOL)sd_isAnimated { 32 | return (self.images != nil); 33 | } 34 | 35 | #else 36 | 37 | - (NSUInteger)sd_imageLoopCount { 38 | NSUInteger imageLoopCount = 0; 39 | NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height); 40 | NSImageRep *imageRep = [self bestRepresentationForRect:imageRect context:nil hints:nil]; 41 | NSBitmapImageRep *bitmapImageRep; 42 | if ([imageRep isKindOfClass:[NSBitmapImageRep class]]) { 43 | bitmapImageRep = (NSBitmapImageRep *)imageRep; 44 | } 45 | if (bitmapImageRep) { 46 | imageLoopCount = [[bitmapImageRep valueForProperty:NSImageLoopCount] unsignedIntegerValue]; 47 | } 48 | return imageLoopCount; 49 | } 50 | 51 | - (void)setSd_imageLoopCount:(NSUInteger)sd_imageLoopCount { 52 | NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height); 53 | NSImageRep *imageRep = [self bestRepresentationForRect:imageRect context:nil hints:nil]; 54 | NSBitmapImageRep *bitmapImageRep; 55 | if ([imageRep isKindOfClass:[NSBitmapImageRep class]]) { 56 | bitmapImageRep = (NSBitmapImageRep *)imageRep; 57 | } 58 | if (bitmapImageRep) { 59 | [bitmapImageRep setProperty:NSImageLoopCount withValue:@(sd_imageLoopCount)]; 60 | } 61 | } 62 | 63 | - (BOOL)sd_isAnimated { 64 | BOOL isGIF = NO; 65 | NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height); 66 | NSImageRep *imageRep = [self bestRepresentationForRect:imageRect context:nil hints:nil]; 67 | NSBitmapImageRep *bitmapImageRep; 68 | if ([imageRep isKindOfClass:[NSBitmapImageRep class]]) { 69 | bitmapImageRep = (NSBitmapImageRep *)imageRep; 70 | } 71 | if (bitmapImageRep) { 72 | NSUInteger frameCount = [[bitmapImageRep valueForProperty:NSImageFrameCount] unsignedIntegerValue]; 73 | isGIF = frameCount > 1 ? YES : NO; 74 | } 75 | return isGIF; 76 | } 77 | 78 | #endif 79 | 80 | - (SDImageFormat)sd_imageFormat { 81 | SDImageFormat imageFormat = SDImageFormatUndefined; 82 | NSNumber *value = objc_getAssociatedObject(self, @selector(sd_imageFormat)); 83 | if ([value isKindOfClass:[NSNumber class]]) { 84 | imageFormat = value.integerValue; 85 | return imageFormat; 86 | } 87 | // Check CGImage's UTType, may return nil for non-Image/IO based image 88 | if (@available(iOS 9.0, tvOS 9.0, macOS 10.11, watchOS 2.0, *)) { 89 | CFStringRef uttype = CGImageGetUTType(self.CGImage); 90 | imageFormat = [NSData sd_imageFormatFromUTType:uttype]; 91 | } 92 | return imageFormat; 93 | } 94 | 95 | - (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat { 96 | objc_setAssociatedObject(self, @selector(sd_imageFormat), @(sd_imageFormat), OBJC_ASSOCIATION_RETAIN_NONATOMIC); 97 | } 98 | 99 | - (void)setSd_isIncremental:(BOOL)sd_isIncremental { 100 | objc_setAssociatedObject(self, @selector(sd_isIncremental), @(sd_isIncremental), OBJC_ASSOCIATION_RETAIN_NONATOMIC); 101 | } 102 | 103 | - (BOOL)sd_isIncremental { 104 | NSNumber *value = objc_getAssociatedObject(self, @selector(sd_isIncremental)); 105 | return value.boolValue; 106 | } 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDImageCodersManager.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 "SDImageCodersManager.h" 10 | #import "SDImageIOCoder.h" 11 | #import "SDImageGIFCoder.h" 12 | #import "SDImageAPNGCoder.h" 13 | #import "SDImageHEICCoder.h" 14 | #import "SDInternalMacros.h" 15 | 16 | @interface SDImageCodersManager () 17 | 18 | @property (nonatomic, strong, nonnull) dispatch_semaphore_t codersLock; 19 | 20 | @end 21 | 22 | @implementation SDImageCodersManager 23 | { 24 | NSMutableArray> *_imageCoders; 25 | } 26 | 27 | + (nonnull instancetype)sharedManager { 28 | static dispatch_once_t once; 29 | static id instance; 30 | dispatch_once(&once, ^{ 31 | instance = [self new]; 32 | }); 33 | return instance; 34 | } 35 | 36 | - (instancetype)init { 37 | if (self = [super init]) { 38 | // initialize with default coders 39 | _imageCoders = [NSMutableArray arrayWithArray:@[[SDImageIOCoder sharedCoder], [SDImageGIFCoder sharedCoder], [SDImageAPNGCoder sharedCoder]]]; 40 | _codersLock = dispatch_semaphore_create(1); 41 | } 42 | return self; 43 | } 44 | 45 | - (NSArray> *)coders 46 | { 47 | SD_LOCK(self.codersLock); 48 | NSArray> *coders = [_imageCoders copy]; 49 | SD_UNLOCK(self.codersLock); 50 | return coders; 51 | } 52 | 53 | - (void)setCoders:(NSArray> *)coders 54 | { 55 | SD_LOCK(self.codersLock); 56 | [_imageCoders removeAllObjects]; 57 | if (coders.count) { 58 | [_imageCoders addObjectsFromArray:coders]; 59 | } 60 | SD_UNLOCK(self.codersLock); 61 | } 62 | 63 | #pragma mark - Coder IO operations 64 | 65 | - (void)addCoder:(nonnull id)coder { 66 | if (![coder conformsToProtocol:@protocol(SDImageCoder)]) { 67 | return; 68 | } 69 | SD_LOCK(self.codersLock); 70 | [_imageCoders addObject:coder]; 71 | SD_UNLOCK(self.codersLock); 72 | } 73 | 74 | - (void)removeCoder:(nonnull id)coder { 75 | if (![coder conformsToProtocol:@protocol(SDImageCoder)]) { 76 | return; 77 | } 78 | SD_LOCK(self.codersLock); 79 | [_imageCoders removeObject:coder]; 80 | SD_UNLOCK(self.codersLock); 81 | } 82 | 83 | #pragma mark - SDImageCoder 84 | - (BOOL)canDecodeFromData:(NSData *)data { 85 | NSArray> *coders = self.coders; 86 | for (id coder in coders.reverseObjectEnumerator) { 87 | if ([coder canDecodeFromData:data]) { 88 | return YES; 89 | } 90 | } 91 | return NO; 92 | } 93 | 94 | - (BOOL)canEncodeToFormat:(SDImageFormat)format { 95 | NSArray> *coders = self.coders; 96 | for (id coder in coders.reverseObjectEnumerator) { 97 | if ([coder canEncodeToFormat:format]) { 98 | return YES; 99 | } 100 | } 101 | return NO; 102 | } 103 | 104 | - (UIImage *)decodedImageWithData:(NSData *)data options:(nullable SDImageCoderOptions *)options { 105 | if (!data) { 106 | return nil; 107 | } 108 | UIImage *image; 109 | NSArray> *coders = self.coders; 110 | for (id coder in coders.reverseObjectEnumerator) { 111 | if ([coder canDecodeFromData:data]) { 112 | image = [coder decodedImageWithData:data options:options]; 113 | break; 114 | } 115 | } 116 | 117 | return image; 118 | } 119 | 120 | - (NSData *)encodedDataWithImage:(UIImage *)image format:(SDImageFormat)format options:(nullable SDImageCoderOptions *)options { 121 | if (!image) { 122 | return nil; 123 | } 124 | NSArray> *coders = self.coders; 125 | for (id coder in coders.reverseObjectEnumerator) { 126 | if ([coder canEncodeToFormat:format]) { 127 | return [coder encodedDataWithImage:image format:format options:options]; 128 | } 129 | } 130 | return nil; 131 | } 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDWebImageTransition.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 | #import "SDImageCache.h" 13 | 14 | #if SD_UIKIT 15 | typedef UIViewAnimationOptions SDWebImageAnimationOptions; 16 | #else 17 | typedef NS_OPTIONS(NSUInteger, SDWebImageAnimationOptions) { 18 | SDWebImageAnimationOptionAllowsImplicitAnimation = 1 << 0, // specify `allowsImplicitAnimation` for the `NSAnimationContext` 19 | }; 20 | #endif 21 | 22 | typedef void (^SDWebImageTransitionPreparesBlock)(__kindof UIView * _Nonnull view, UIImage * _Nullable image, NSData * _Nullable imageData, SDImageCacheType cacheType, NSURL * _Nullable imageURL); 23 | typedef void (^SDWebImageTransitionAnimationsBlock)(__kindof UIView * _Nonnull view, UIImage * _Nullable image); 24 | typedef void (^SDWebImageTransitionCompletionBlock)(BOOL finished); 25 | 26 | /** 27 | This class is used to provide a transition animation after the view category load image finished. Use this on `sd_imageTransition` in UIView+WebCache.h 28 | for UIKit(iOS & tvOS), we use `+[UIView transitionWithView:duration:options:animations:completion]` for transition animation. 29 | for AppKit(macOS), we use `+[NSAnimationContext runAnimationGroup:completionHandler:]` for transition animation. You can call `+[NSAnimationContext currentContext]` to grab the context during animations block. 30 | @note These transition are provided for basic usage. If you need complicated animation, consider to directly use Core Animation or use `SDWebImageAvoidAutoSetImage` and implement your own after image load finished. 31 | */ 32 | @interface SDWebImageTransition : NSObject 33 | 34 | /** 35 | By default, we set the image to the view at the beginning of the animtions. You can disable this and provide custom set image process 36 | */ 37 | @property (nonatomic, assign) BOOL avoidAutoSetImage; 38 | /** 39 | The duration of the transition animation, measured in seconds. Defaults to 0.5. 40 | */ 41 | @property (nonatomic, assign) NSTimeInterval duration; 42 | /** 43 | The timing function used for all animations within this transition animation (macOS). 44 | */ 45 | @property (nonatomic, strong, nullable) CAMediaTimingFunction *timingFunction API_UNAVAILABLE(ios, tvos, watchos); 46 | /** 47 | A mask of options indicating how you want to perform the animations. 48 | */ 49 | @property (nonatomic, assign) SDWebImageAnimationOptions animationOptions; 50 | /** 51 | A block object to be executed before the animation sequence starts. 52 | */ 53 | @property (nonatomic, copy, nullable) SDWebImageTransitionPreparesBlock prepares; 54 | /** 55 | A block object that contains the changes you want to make to the specified view. 56 | */ 57 | @property (nonatomic, copy, nullable) SDWebImageTransitionAnimationsBlock animations; 58 | /** 59 | A block object to be executed when the animation sequence ends. 60 | */ 61 | @property (nonatomic, copy, nullable) SDWebImageTransitionCompletionBlock completion; 62 | 63 | @end 64 | 65 | /** 66 | Convenience way to create transition. Remember to specify the duration if needed. 67 | for UIKit, these transition just use the correspond `animationOptions`. By default we enable `UIViewAnimationOptionAllowUserInteraction` to allow user interaction during transition. 68 | for AppKit, these transition use Core Animation in `animations`. So your view must be layer-backed. Set `wantsLayer = YES` before you apply it. 69 | */ 70 | @interface SDWebImageTransition (Conveniences) 71 | 72 | /// Fade transition. 73 | @property (nonatomic, class, nonnull, readonly) SDWebImageTransition *fadeTransition; 74 | /// Flip from left transition. 75 | @property (nonatomic, class, nonnull, readonly) SDWebImageTransition *flipFromLeftTransition; 76 | /// Flip from right transition. 77 | @property (nonatomic, class, nonnull, readonly) SDWebImageTransition *flipFromRightTransition; 78 | /// Flip from top transition. 79 | @property (nonatomic, class, nonnull, readonly) SDWebImageTransition *flipFromTopTransition; 80 | /// Flip from bottom transition. 81 | @property (nonatomic, class, nonnull, readonly) SDWebImageTransition *flipFromBottomTransition; 82 | /// Curl up transition. 83 | @property (nonatomic, class, nonnull, readonly) SDWebImageTransition *curlUpTransition; 84 | /// Curl down transition. 85 | @property (nonatomic, class, nonnull, readonly) SDWebImageTransition *curlDownTransition; 86 | 87 | @end 88 | 89 | #endif 90 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDDiskCache.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 | /** 13 | A protocol to allow custom disk cache used in SDImageCache. 14 | */ 15 | @protocol SDDiskCache 16 | 17 | // All of these method are called from the same global queue to avoid blocking on main queue and thread-safe problem. But it's also recommend to ensure thread-safe yourself using lock or other ways. 18 | @required 19 | /** 20 | Create a new disk cache based on the specified path. You can check `maxDiskSize` and `maxDiskAge` used for disk cache. 21 | 22 | @param cachePath Full path of a directory in which the cache will write data. 23 | Once initialized you should not read and write to this directory. 24 | @param config The cache config to be used to create the cache. 25 | 26 | @return A new cache object, or nil if an error occurs. 27 | */ 28 | - (nullable instancetype)initWithCachePath:(nonnull NSString *)cachePath config:(nonnull SDImageCacheConfig *)config; 29 | 30 | /** 31 | Returns a boolean value that indicates whether a given key is in cache. 32 | This method may blocks the calling thread until file read finished. 33 | 34 | @param key A string identifying the data. If nil, just return NO. 35 | @return Whether the key is in cache. 36 | */ 37 | - (BOOL)containsDataForKey:(nonnull NSString *)key; 38 | 39 | /** 40 | Returns the data associated with a given key. 41 | This method may blocks the calling thread until file read finished. 42 | 43 | @param key A string identifying the data. If nil, just return nil. 44 | @return The value associated with key, or nil if no value is associated with key. 45 | */ 46 | - (nullable NSData *)dataForKey:(nonnull NSString *)key; 47 | 48 | /** 49 | Sets the value of the specified key in the cache. 50 | This method may blocks the calling thread until file write finished. 51 | 52 | @param data The data to be stored in the cache. 53 | @param key The key with which to associate the value. If nil, this method has no effect. 54 | */ 55 | - (void)setData:(nullable NSData *)data forKey:(nonnull NSString *)key; 56 | 57 | /** 58 | Removes the value of the specified key in the cache. 59 | This method may blocks the calling thread until file delete finished. 60 | 61 | @param key The key identifying the value to be removed. If nil, this method has no effect. 62 | */ 63 | - (void)removeDataForKey:(nonnull NSString *)key; 64 | 65 | /** 66 | Empties the cache. 67 | This method may blocks the calling thread until file delete finished. 68 | */ 69 | - (void)removeAllData; 70 | 71 | /** 72 | Removes the expired data from the cache. You can choose the data to remove base on `ageLimit`, `countLimit` and `sizeLimit` options. 73 | */ 74 | - (void)removeExpiredData; 75 | 76 | /** 77 | The cache path for key 78 | 79 | @param key A string identifying the value 80 | @return The cache path for key. Or nil if the key can not associate to a path 81 | */ 82 | - (nullable NSString *)cachePathForKey:(nonnull NSString *)key; 83 | 84 | /** 85 | Returns the number of data in this cache. 86 | This method may blocks the calling thread until file read finished. 87 | 88 | @return The total data count. 89 | */ 90 | - (NSUInteger)totalCount; 91 | 92 | /** 93 | Returns the total size (in bytes) of data in this cache. 94 | This method may blocks the calling thread until file read finished. 95 | 96 | @return The total data size in bytes. 97 | */ 98 | - (NSUInteger)totalSize; 99 | 100 | @end 101 | 102 | /** 103 | The built-in disk cache. 104 | */ 105 | @interface SDDiskCache : NSObject 106 | /** 107 | Cache Config object - storing all kind of settings. 108 | */ 109 | @property (nonatomic, strong, readonly, nonnull) SDImageCacheConfig *config; 110 | 111 | - (nonnull instancetype)init NS_UNAVAILABLE; 112 | 113 | /** 114 | Move the cache directory from old location to new location, the old location will be removed after finish. 115 | If the old location does not exist, does nothing. 116 | If the new location does not exist, only do a movement of directory. 117 | If the new location does exist, will move and merge the files from old location. 118 | If the new location does exist, but is not a directory, will remove it and do a movement of directory. 119 | 120 | @param srcPath old location of cache directory 121 | @param dstPath new location of cache directory 122 | */ 123 | - (void)moveCacheDirectoryFromPath:(nonnull NSString *)srcPath toPath:(nonnull NSString *)dstPath; 124 | 125 | @end 126 | --------------------------------------------------------------------------------