├── Pods ├── Headers │ ├── Private │ │ ├── SDWebImage │ │ │ ├── SDWebImage.h │ │ │ ├── SDDiskCache.h │ │ │ ├── SDImageCache.h │ │ │ ├── SDImageCoder.h │ │ │ ├── SDImageFrame.h │ │ │ ├── SDImageLoader.h │ │ │ ├── SDMemoryCache.h │ │ │ ├── SDWeakProxy.h │ │ │ ├── UIImage+GIF.h │ │ │ ├── SDAnimatedImage.h │ │ │ ├── SDDeviceHelper.h │ │ │ ├── SDDisplayLink.h │ │ │ ├── SDImageGIFCoder.h │ │ │ ├── SDImageGraphics.h │ │ │ ├── SDImageIOCoder.h │ │ │ ├── SDWebImageError.h │ │ │ ├── SDmetamacros.h │ │ │ ├── UIView+WebCache.h │ │ │ ├── NSButton+WebCache.h │ │ │ ├── SDAnimatedImageRep.h │ │ │ ├── SDImageAPNGCoder.h │ │ │ ├── SDImageCacheConfig.h │ │ │ ├── SDImageCacheDefine.h │ │ │ ├── SDImageCoderHelper.h │ │ │ ├── SDImageHEICCoder.h │ │ │ ├── SDImageTransformer.h │ │ │ ├── SDInternalMacros.h │ │ │ ├── SDWebImageCompat.h │ │ │ ├── SDWebImageDefine.h │ │ │ ├── SDWebImageManager.h │ │ │ ├── UIButton+WebCache.h │ │ │ ├── UIImage+Metadata.h │ │ │ ├── UIImage+Transform.h │ │ │ ├── SDAnimatedImageView.h │ │ │ ├── SDAssociatedObject.h │ │ │ ├── SDImageAssetManager.h │ │ │ ├── SDImageCachesManager.h │ │ │ ├── SDImageCodersManager.h │ │ │ ├── SDWebImageDownloader.h │ │ │ ├── SDWebImageIndicator.h │ │ │ ├── SDWebImageOperation.h │ │ │ ├── SDWebImagePrefetcher.h │ │ │ ├── SDWebImageTransition.h │ │ │ ├── UIColor+SDHexString.h │ │ │ ├── UIImage+ForceDecode.h │ │ │ ├── UIImage+MultiFormat.h │ │ │ ├── UIImageView+WebCache.h │ │ │ ├── NSData+ImageContentType.h │ │ │ ├── NSImage+Compatibility.h │ │ │ ├── SDAnimatedImagePlayer.h │ │ │ ├── SDAsyncBlockOperation.h │ │ │ ├── SDFileAttributeHelper.h │ │ │ ├── SDGraphicsImageRenderer.h │ │ │ ├── SDImageIOAnimatedCoder.h │ │ │ ├── SDImageLoadersManager.h │ │ │ ├── UIImage+MemoryCacheCost.h │ │ │ ├── SDImageHEICCoderInternal.h │ │ │ ├── SDWebImageCacheKeyFilter.h │ │ │ ├── SDWebImageCacheSerializer.h │ │ │ ├── UIImage+ExtendedCacheData.h │ │ │ ├── UIView+WebCacheOperation.h │ │ │ ├── SDAnimatedImageView+WebCache.h │ │ │ ├── SDWebImageDownloaderConfig.h │ │ │ ├── SDWebImageOptionsProcessor.h │ │ │ ├── NSBezierPath+SDRoundedCorners.h │ │ │ ├── SDImageCachesManagerOperation.h │ │ │ ├── SDWebImageDownloaderDecryptor.h │ │ │ ├── SDWebImageDownloaderOperation.h │ │ │ ├── SDWebImageTransitionInternal.h │ │ │ ├── SDImageIOAnimatedCoderInternal.h │ │ │ ├── UIImageView+HighlightedWebCache.h │ │ │ ├── SDWebImageDownloaderRequestModifier.h │ │ │ └── SDWebImageDownloaderResponseModifier.h │ │ └── AFNetworking │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFImageDownloader.h │ │ │ ├── AFURLSessionManager.h │ │ │ ├── AFCompatibilityMacros.h │ │ │ ├── UIKit+AFNetworking.h │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── UIButton+AFNetworking.h │ │ │ ├── WKWebView+AFNetworking.h │ │ │ ├── AFAutoPurgingImageCache.h │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── UIImageView+AFNetworking.h │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ └── UIActivityIndicatorView+AFNetworking.h │ └── Public │ │ ├── SDWebImage │ │ ├── SDWebImage.h │ │ ├── SDDiskCache.h │ │ ├── UIImage+GIF.h │ │ ├── SDImageCache.h │ │ ├── SDImageCoder.h │ │ ├── SDImageFrame.h │ │ ├── SDImageLoader.h │ │ ├── SDMemoryCache.h │ │ ├── SDAnimatedImage.h │ │ ├── SDImageAPNGCoder.h │ │ ├── SDImageGIFCoder.h │ │ ├── SDImageGraphics.h │ │ ├── SDImageHEICCoder.h │ │ ├── SDImageIOCoder.h │ │ ├── SDWebImageCompat.h │ │ ├── SDWebImageDefine.h │ │ ├── SDWebImageError.h │ │ ├── UIImage+Metadata.h │ │ ├── UIView+WebCache.h │ │ ├── NSButton+WebCache.h │ │ ├── SDAnimatedImageRep.h │ │ ├── SDImageCacheConfig.h │ │ ├── SDImageCacheDefine.h │ │ ├── SDImageCoderHelper.h │ │ ├── SDImageTransformer.h │ │ ├── SDWebImageManager.h │ │ ├── UIButton+WebCache.h │ │ ├── UIImage+Transform.h │ │ ├── NSImage+Compatibility.h │ │ ├── SDAnimatedImagePlayer.h │ │ ├── SDAnimatedImageView.h │ │ ├── SDImageCachesManager.h │ │ ├── SDImageCodersManager.h │ │ ├── SDImageLoadersManager.h │ │ ├── SDWebImageDownloader.h │ │ ├── SDWebImageIndicator.h │ │ ├── SDWebImageOperation.h │ │ ├── SDWebImagePrefetcher.h │ │ ├── SDWebImageTransition.h │ │ ├── UIImage+ForceDecode.h │ │ ├── UIImage+MultiFormat.h │ │ ├── UIImageView+WebCache.h │ │ ├── NSData+ImageContentType.h │ │ ├── SDGraphicsImageRenderer.h │ │ ├── SDImageIOAnimatedCoder.h │ │ ├── UIImage+MemoryCacheCost.h │ │ ├── SDWebImageCacheKeyFilter.h │ │ ├── SDWebImageCacheSerializer.h │ │ ├── SDWebImageDownloaderConfig.h │ │ ├── SDWebImageOptionsProcessor.h │ │ ├── UIImage+ExtendedCacheData.h │ │ ├── UIView+WebCacheOperation.h │ │ ├── SDAnimatedImageView+WebCache.h │ │ ├── SDWebImageDownloaderDecryptor.h │ │ ├── SDWebImageDownloaderOperation.h │ │ ├── UIImageView+HighlightedWebCache.h │ │ ├── SDWebImageDownloaderRequestModifier.h │ │ └── SDWebImageDownloaderResponseModifier.h │ │ └── AFNetworking │ │ ├── AFNetworking.h │ │ ├── AFSecurityPolicy.h │ │ ├── AFHTTPSessionManager.h │ │ ├── AFImageDownloader.h │ │ ├── AFURLSessionManager.h │ │ ├── AFCompatibilityMacros.h │ │ ├── UIKit+AFNetworking.h │ │ ├── AFURLRequestSerialization.h │ │ ├── UIButton+AFNetworking.h │ │ ├── WKWebView+AFNetworking.h │ │ ├── AFAutoPurgingImageCache.h │ │ ├── AFNetworkReachabilityManager.h │ │ ├── AFURLResponseSerialization.h │ │ ├── UIImageView+AFNetworking.h │ │ ├── UIProgressView+AFNetworking.h │ │ ├── UIRefreshControl+AFNetworking.h │ │ ├── AFNetworkActivityIndicatorManager.h │ │ └── UIActivityIndicatorView+AFNetworking.h ├── Target Support Files │ ├── SDWebImage │ │ ├── SDWebImage-dummy.m │ │ ├── SDWebImage-prefix.pch │ │ ├── SDWebImage.xcconfig │ │ ├── SDWebImage.debug.xcconfig │ │ └── SDWebImage.release.xcconfig │ ├── AFNetworking │ │ ├── AFNetworking-dummy.m │ │ ├── AFNetworking-prefix.pch │ │ ├── AFNetworking.debug.xcconfig │ │ └── AFNetworking.release.xcconfig │ └── Pods-ZBNetworkingDemo │ │ ├── Pods-ZBNetworkingDemo-dummy.m │ │ ├── Pods-ZBNetworkingDemo.debug.xcconfig │ │ └── Pods-ZBNetworkingDemo.release.xcconfig ├── SDWebImage │ ├── SDWebImage │ │ ├── Private │ │ │ ├── SDInternalMacros.m │ │ │ ├── SDDeviceHelper.h │ │ │ ├── UIColor+SDHexString.h │ │ │ ├── SDAssociatedObject.h │ │ │ ├── SDWeakProxy.h │ │ │ ├── SDWebImageTransitionInternal.h │ │ │ ├── SDImageCachesManagerOperation.h │ │ │ ├── NSBezierPath+SDRoundedCorners.h │ │ │ ├── SDAsyncBlockOperation.h │ │ │ ├── SDImageIOAnimatedCoderInternal.h │ │ │ ├── SDImageHEICCoderInternal.h │ │ │ ├── SDAssociatedObject.m │ │ │ ├── SDDeviceHelper.m │ │ │ ├── SDDisplayLink.h │ │ │ ├── SDImageAssetManager.h │ │ │ ├── SDFileAttributeHelper.h │ │ │ ├── UIColor+SDHexString.m │ │ │ ├── SDWeakProxy.m │ │ │ ├── NSBezierPath+SDRoundedCorners.m │ │ │ ├── SDInternalMacros.h │ │ │ ├── SDImageCachesManagerOperation.m │ │ │ └── SDAsyncBlockOperation.m │ │ └── Core │ │ │ ├── SDWebImageOperation.m │ │ │ ├── SDWebImageError.m │ │ │ ├── SDWebImageCompat.m │ │ │ ├── SDWebImageOperation.h │ │ │ ├── UIImage+GIF.m │ │ │ ├── SDImageAPNGCoder.h │ │ │ ├── UIImage+ExtendedCacheData.m │ │ │ ├── SDImageFrame.m │ │ │ ├── UIImage+GIF.h │ │ │ ├── SDWebImageCacheKeyFilter.m │ │ │ ├── SDImageGIFCoder.h │ │ │ ├── SDWebImageCacheKeyFilter.h │ │ │ ├── SDWebImageCacheSerializer.m │ │ │ ├── SDImageHEICCoder.h │ │ │ ├── SDImageCoder.m │ │ │ ├── SDAnimatedImageRep.h │ │ │ ├── SDImageLoadersManager.h │ │ │ ├── SDImageFrame.h │ │ │ ├── SDImageIOCoder.h │ │ │ ├── UIImage+ExtendedCacheData.h │ │ │ ├── UIImage+MemoryCacheCost.h │ │ │ ├── UIImage+ForceDecode.m │ │ │ ├── SDImageGIFCoder.m │ │ │ ├── UIImage+MemoryCacheCost.m │ │ │ ├── SDWebImageCacheSerializer.h │ │ │ ├── UIImage+ForceDecode.h │ │ │ ├── SDImageGraphics.h │ │ │ ├── SDWebImageDownloaderConfig.m │ │ │ ├── SDWebImageOptionsProcessor.m │ │ │ ├── UIView+WebCacheOperation.h │ │ │ ├── SDWebImageDownloaderDecryptor.m │ │ │ ├── SDWebImageError.h │ │ │ ├── UIImage+MultiFormat.m │ │ │ ├── SDImageAPNGCoder.m │ │ │ ├── NSData+ImageContentType.h │ │ │ ├── SDWebImageDownloaderDecryptor.h │ │ │ ├── SDImageCodersManager.h │ │ │ ├── UIImage+Metadata.h │ │ │ ├── SDWebImageDownloaderRequestModifier.m │ │ │ ├── SDWebImageCompat.h │ │ │ └── SDImageCacheConfig.m │ └── LICENSE ├── Pods.xcodeproj │ └── xcuserdata │ │ ├── nquec.xcuserdatad │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ ├── SDWebImage.xcscheme │ │ │ ├── AFNetworking.xcscheme │ │ │ └── Pods-ZBNetworkingDemo.xcscheme │ │ └── suzhibin.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ ├── SDWebImage.xcscheme │ │ ├── AFNetworking.xcscheme │ │ └── Pods-ZBNetworkingDemo.xcscheme ├── Manifest.lock └── AFNetworking │ ├── LICENSE │ ├── AFNetworking │ ├── AFNetworking.h │ └── AFCompatibilityMacros.h │ └── UIKit+AFNetworking │ ├── UIKit+AFNetworking.h │ ├── UIActivityIndicatorView+AFNetworking.h │ └── UIRefreshControl+AFNetworking.h ├── ZBNetworkingDemo ├── Assets.xcassets │ ├── Contents.json │ ├── h1.imageset │ │ ├── h1.jpg │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── APMModel.m ├── ViewController.h ├── HomeViewController.h ├── SettingViewController.h ├── CustomTabBarController.h ├── MethodViewController.h ├── DetailViewController.h ├── AppDelegate.h ├── main.m ├── PlayerViewController.h ├── offlineDownloadViewController.h ├── DetailsModel.m ├── ViewController.m ├── HomeModel.m ├── RequestTool.h ├── DetailsModel.h ├── DataManager.h ├── DataManager.m ├── RootViewController.h ├── HomeModel.h ├── Info.plist ├── Base.lproj │ └── Main.storyboard ├── PlayerViewController.m ├── APMModel.h └── CustomTabBarController.m ├── ZBNetworkingDemo.xcodeproj ├── xcuserdata │ ├── nquec.xcuserdatad │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── suzhibin.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.xcworkspace │ ├── xcuserdata │ ├── nquec.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ └── suzhibin.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Podfile ├── ZBNetworkingDemo.xcworkspace ├── xcuserdata │ ├── nquec.xcuserdatad │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ └── UserInterfaceState.xcuserstate │ └── suzhibin.xcuserdatad │ │ └── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── ZBNetworking ├── ZBNetworking.h ├── NSString+ZBURLEncoding.h └── NSString+ZBURLEncoding.m ├── ZBNetworkingDemoTests ├── Info.plist └── ZBNetworkingDemoTests.m ├── ZBNetworkingDemoUITests ├── Info.plist └── ZBNetworkingDemoUITests.m ├── Podfile.lock ├── LICENSE ├── ZBNetworking.podspec ├── .gitignore └── CHANGELOG /Pods/Headers/Private/SDWebImage/SDWebImage.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/WebImage/SDWebImage.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImage.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/WebImage/SDWebImage.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDDiskCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDDiskCache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIImage+GIF.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+GIF.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDDiskCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDDiskCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageFrame.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageFrame.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageLoader.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageLoader.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDMemoryCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDMemoryCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWeakProxy.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDWeakProxy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIImage+GIF.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+GIF.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageFrame.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageFrame.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageLoader.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageLoader.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDMemoryCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDMemoryCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDAnimatedImage.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDAnimatedImage.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDDeviceHelper.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDDeviceHelper.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDDisplayLink.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDDisplayLink.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageGIFCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageGIFCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageGraphics.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageGraphics.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageIOCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageIOCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageError.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageError.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDmetamacros.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDmetamacros.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIView+WebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDAnimatedImage.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDAnimatedImage.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageAPNGCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageAPNGCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageGIFCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageGIFCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageGraphics.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageGraphics.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageHEICCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageHEICCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageIOCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageIOCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageCompat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageCompat.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageDefine.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDefine.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageError.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageError.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIImage+Metadata.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+Metadata.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIView+WebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/NSButton+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/NSButton+WebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDAnimatedImageRep.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDAnimatedImageRep.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageAPNGCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageAPNGCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageCacheConfig.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCacheConfig.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageCacheDefine.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCacheDefine.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageCoderHelper.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCoderHelper.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageHEICCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageHEICCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageTransformer.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageTransformer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDInternalMacros.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDInternalMacros.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageCompat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageCompat.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageDefine.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDefine.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIButton+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIButton+WebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIImage+Metadata.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+Metadata.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIImage+Transform.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+Transform.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/NSButton+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/NSButton+WebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDAnimatedImageRep.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDAnimatedImageRep.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageCacheConfig.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCacheConfig.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageCacheDefine.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCacheDefine.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageCoderHelper.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCoderHelper.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageTransformer.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageTransformer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIButton+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIButton+WebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIImage+Transform.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+Transform.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDAnimatedImageView.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDAnimatedImageView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDAssociatedObject.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDAssociatedObject.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageAssetManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDImageAssetManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageCachesManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCachesManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageCodersManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCodersManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloader.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageIndicator.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageIndicator.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageOperation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImagePrefetcher.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageTransition.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageTransition.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIColor+SDHexString.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/UIColor+SDHexString.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIImage+ForceDecode.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+ForceDecode.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+MultiFormat.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImageView+WebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/NSImage+Compatibility.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/NSImage+Compatibility.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDAnimatedImagePlayer.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDAnimatedImagePlayer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDAnimatedImageView.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDAnimatedImageView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageCachesManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCachesManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageCodersManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageCodersManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageLoadersManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageLoadersManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloader.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageIndicator.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageIndicator.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageOperation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImagePrefetcher.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageTransition.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageTransition.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIImage+ForceDecode.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+ForceDecode.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+MultiFormat.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImageView+WebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFCompatibilityMacros.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFCompatibilityMacros.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/NSData+ImageContentType.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/NSImage+Compatibility.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/NSImage+Compatibility.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDAnimatedImagePlayer.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDAnimatedImagePlayer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDAsyncBlockOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDFileAttributeHelper.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDFileAttributeHelper.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDGraphicsImageRenderer.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDGraphicsImageRenderer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageIOAnimatedCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageIOAnimatedCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageLoadersManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageLoadersManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIImage+MemoryCacheCost.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+MemoryCacheCost.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFCompatibilityMacros.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFCompatibilityMacros.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/NSData+ImageContentType.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDGraphicsImageRenderer.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDGraphicsImageRenderer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDImageIOAnimatedCoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDImageIOAnimatedCoder.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIImage+MemoryCacheCost.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+MemoryCacheCost.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/WKWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/WKWebView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageHEICCoderInternal.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDImageHEICCoderInternal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageCacheKeyFilter.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageCacheKeyFilter.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageCacheSerializer.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageCacheSerializer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIImage+ExtendedCacheData.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+ExtendedCacheData.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIView+WebCacheOperation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/WKWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/WKWebView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageCacheKeyFilter.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageCacheKeyFilter.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageCacheSerializer.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageCacheSerializer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageDownloaderConfig.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloaderConfig.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageOptionsProcessor.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageOptionsProcessor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIImage+ExtendedCacheData.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImage+ExtendedCacheData.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIView+WebCacheOperation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDAnimatedImageView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDAnimatedImageView+WebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageDownloaderConfig.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloaderConfig.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageOptionsProcessor.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageOptionsProcessor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDAnimatedImageView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDAnimatedImageView+WebCache.h -------------------------------------------------------------------------------- /ZBNetworkingDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/NSBezierPath+SDRoundedCorners.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/NSBezierPath+SDRoundedCorners.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageCachesManagerOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDImageCachesManagerOperation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageDownloaderDecryptor.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloaderDecryptor.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloaderOperation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageTransitionInternal.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDWebImageTransitionInternal.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageDownloaderDecryptor.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloaderDecryptor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloaderOperation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImageView+HighlightedWebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDImageIOAnimatedCoderInternal.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Private/SDImageIOAnimatedCoderInternal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/UIImageView+HighlightedWebCache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageDownloaderRequestModifier.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloaderRequestModifier.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageDownloaderRequestModifier.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloaderRequestModifier.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SDWebImage/SDWebImageDownloaderResponseModifier.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloaderResponseModifier.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SDWebImage/SDWebImageDownloaderResponseModifier.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/Core/SDWebImageDownloaderResponseModifier.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /ZBNetworkingDemo/Assets.xcassets/h1.imageset/h1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suzhibin/ZBNetworking/HEAD/ZBNetworkingDemo/Assets.xcassets/h1.imageset/h1.jpg -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SDWebImage : NSObject 3 | @end 4 | @implementation PodsDummy_SDWebImage 5 | @end 6 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcodeproj/xcuserdata/nquec.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | inhibit_all_warnings! #解决忽略引入库的所有警告 3 | platform:ios,'9.0' 4 | target :'ZBNetworkingDemo' do 5 | pod 'SDWebImage' 6 | pod 'AFNetworking' 7 | end 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking 5 | @end 6 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcworkspace/xcuserdata/nquec.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcworkspace/xcuserdata/nquec.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suzhibin/ZBNetworking/HEAD/ZBNetworkingDemo.xcworkspace/xcuserdata/nquec.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ZBNetworkingDemo/Pods-ZBNetworkingDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ZBNetworkingDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ZBNetworkingDemo 5 | @end 6 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcodeproj/project.xcworkspace/xcuserdata/nquec.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suzhibin/ZBNetworking/HEAD/ZBNetworkingDemo.xcodeproj/project.xcworkspace/xcuserdata/nquec.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcodeproj/project.xcworkspace/xcuserdata/suzhibin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suzhibin/ZBNetworking/HEAD/ZBNetworkingDemo.xcodeproj/project.xcworkspace/xcuserdata/suzhibin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ZBNetworkingDemo/APMModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // APMModel.m 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2022/1/14. 6 | // Copyright © 2022 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "APMModel.h" 10 | 11 | @implementation APMModel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AFNetworking/AFNetworking-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 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/8/8. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/HomeViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HomeViewController.h 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/8/24. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | 11 | @interface HomeViewController : RootViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/SettingViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SettingViewController.h 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/8/24. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | 11 | @interface SettingViewController : RootViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/CustomTabBarController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CustomTabBarController.h 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2018/10/12. 6 | // Copyright © 2018年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CustomTabBarController : UITabBarController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/MethodViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MethodViewController.h 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2018/10/12. 6 | // Copyright © 2018年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | 11 | @interface MethodViewController : RootViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/DetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.h 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/8/24. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | 11 | @interface DetailViewController : RootViewController 12 | @property (nonatomic,copy)NSString *wid; 13 | @end 14 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/8/8. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/8/8. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/PlayerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlayerViewController.h 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2020/11/10. 6 | // Copyright © 2020 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface PlayerViewController : UIViewController 14 | @property(nonatomic,copy)NSString *videoUrl; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /ZBNetworking/ZBNetworking.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZBNetworking.h 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/8/8. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #ifndef ZBNetworking_h 10 | #define ZBNetworking_h 11 | 12 | #import "ZBRequestConst.h" 13 | #import "ZBRequestEngine.h" 14 | #import "ZBRequestManager.h" 15 | #import "ZBURLRequest.h" 16 | #import "ZBCacheManager.h" 17 | #endif /* ZBNetworking_h */ 18 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/Assets.xcassets/h1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "h1.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDInternalMacros.h" 10 | 11 | void sd_executeCleanupBlock (__strong sd_cleanupBlock_t *block) { 12 | (*block)(); 13 | } 14 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/SDWebImageOperation.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 "SDWebImageOperation.h" 10 | 11 | /// NSOperation conform to `SDWebImageOperation`. 12 | @implementation NSOperation (SDWebImageOperation) 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/offlineDownloadViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // offlineDownloadViewController.h 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/9/21. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | @protocol offlineDelegate 11 | - (void)downloadWithArray:(NSMutableArray *)offlineArray; 12 | @end 13 | 14 | @interface offlineDownloadViewController : RootViewController 15 | @property (nonatomic,weak)iddelegate; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /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 | /// Device information helper methods 13 | @interface SDDeviceHelper : NSObject 14 | 15 | + (NSUInteger)totalMemory; 16 | + (NSUInteger)freeMemory; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/DetailsModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // DetailsModel.m 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/6/21. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "DetailsModel.h" 10 | 11 | @implementation DetailsModel 12 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key{ 13 | // NSLog(@"undefinedKey:%@",key); 14 | } 15 | 16 | -(instancetype)initWithDict:(NSDictionary *)dict{ 17 | if (self=[super init]) { 18 | [self setValuesForKeysWithDictionary:dict]; 19 | } 20 | return self; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /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/SDWebImage/SDWebImage/Private/UIColor+SDHexString.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 (SDHexString) 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/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 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/8/8. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view, typically from a nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Private/SDAssociatedObject.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 | /// Copy the associated object from source image to target image. The associated object including all the category read/write properties. 12 | /// @param source source 13 | /// @param target target 14 | FOUNDATION_EXPORT void SDImageCopyAssociatedObject(UIImage * _Nullable source, UIImage * _Nullable target); 15 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/HomeModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // HomeModel.m 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2018/10/12. 6 | // Copyright © 2018年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "HomeModel.h" 10 | 11 | @implementation HomeModel 12 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key{ 13 | // NSLog(@"undefinedKey:%@",key); 14 | // if ([key isEqualToString:@"id"]) { 15 | // self.wid=value; 16 | // } 17 | } 18 | -(instancetype)initWithDict:(NSDictionary *)dict{ 19 | if (self=[super init]) { 20 | [self setValuesForKeysWithDictionary:dict]; 21 | } 22 | return self; 23 | } 24 | @end 25 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/RequestTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // RequestTool.h 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2020/6/2. 6 | // Copyright © 2020 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | //#define server_URL @"http://api.dotaly.com" 11 | #define url_server @"http://h5.jp.51wnl.com/" 12 | //#define list_URL @"/lol/api/v1/authors" 13 | #define url_path @"wnl/tag/page" 14 | //#define details_URL @"/lol/api/v1/shipin/latest" 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | @interface RequestTool : NSObject 19 | + (instancetype)sharedInstance; 20 | - (void)setupPublicParameters; 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/DetailsModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // DetailsModel.h 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/6/21. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DetailsModel : NSObject 12 | @property (nonatomic,copy)NSString *author; 13 | @property (nonatomic,copy)NSString *date; 14 | @property (nonatomic,copy)NSString *thumb; 15 | @property (nonatomic,copy)NSString *time; 16 | @property (nonatomic,copy)NSString *title; 17 | @property (nonatomic,copy)NSString *wid; 18 | @property (nonatomic,copy)NSString *weburl; 19 | 20 | -(instancetype)initWithDict:(NSDictionary *)dict; 21 | @end 22 | -------------------------------------------------------------------------------- /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/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 | /// A weak proxy which forward all the message to the target 13 | @interface SDWeakProxy : NSProxy 14 | 15 | @property (nonatomic, weak, readonly, nullable) id target; 16 | 17 | - (nonnull instancetype)initWithTarget:(nonnull id)target; 18 | + (nonnull instancetype)proxyWithTarget:(nonnull id)target; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDWebImage" 4 | OTHER_LDFLAGS = -framework "ImageIO" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SDWebImage 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AFNetworking/AFNetworking.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 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}/AFNetworking 8 | PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AFNetworking/AFNetworking.release.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 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}/AFNetworking 8 | PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Private/SDWebImageTransitionInternal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageCompat.h" 10 | 11 | #if SD_MAC 12 | 13 | #import 14 | 15 | /// Helper method for Core Animation transition 16 | FOUNDATION_EXPORT CAMediaTimingFunction * _Nullable SDTimingFunctionFromAnimationOptions(SDWebImageAnimationOptions options); 17 | FOUNDATION_EXPORT CATransition * _Nullable SDTransitionFromAnimationOptions(SDWebImageAnimationOptions options); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /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/Pods.xcodeproj/xcuserdata/nquec.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AFNetworking.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods-ZBNetworkingDemo.xcscheme 13 | 14 | isShown 15 | 16 | 17 | SDWebImage.xcscheme 18 | 19 | isShown 20 | 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/suzhibin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AFNetworking.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods-ZBNetworkingDemo.xcscheme 13 | 14 | isShown 15 | 16 | 17 | SDWebImage.xcscheme 18 | 19 | isShown 20 | 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcworkspace/xcuserdata/suzhibin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Private/NSBezierPath+SDRoundedCorners.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 (SDRoundedCorners) 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/Target Support Files/SDWebImage/SDWebImage.debug.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 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDWebImage" 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/Target Support Files/SDWebImage/SDWebImage.release.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 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDWebImage" 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/Core/UIImage+ExtendedCacheData.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * (c) Fabrice Aneche 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #import "UIImage+ExtendedCacheData.h" 11 | #import 12 | 13 | @implementation UIImage (ExtendedCacheData) 14 | 15 | - (id)sd_extendedObject { 16 | return objc_getAssociatedObject(self, @selector(sd_extendedObject)); 17 | } 18 | 19 | - (void)setSd_extendedObject:(id)sd_extendedObject { 20 | objc_setAssociatedObject(self, @selector(sd_extendedObject), sd_extendedObject, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /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/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 | /// A async block operation, success after you call `completer` (not like `NSBlockOperation` which is for sync block, success on return) 15 | @interface SDAsyncBlockOperation : NSOperation 16 | 17 | - (nonnull instancetype)initWithBlock:(nonnull SDAsyncBlock)block; 18 | + (nonnull instancetype)blockOperationWithBlock:(nonnull SDAsyncBlock)block; 19 | - (void)complete; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ZBNetworkingDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ZBNetworkingDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /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 | + (nullable UIImage *)createFrameAtIndex:(NSUInteger)index source:(nonnull CGImageSourceRef)source scale:(CGFloat)scale preserveAspectRatio:(BOOL)preserveAspectRatio thumbnailSize:(CGSize)thumbnailSize options:(nullable NSDictionary *)options; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcodeproj/xcuserdata/nquec.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ZBNetworkingDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 7DF8262C1D5815BE000D1109 16 | 17 | primary 18 | 19 | 20 | 7DF826451D5815BE000D1109 21 | 22 | primary 23 | 24 | 25 | 7DF826501D5815BE000D1109 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ZBNetworkingDemo.xcodeproj/xcuserdata/suzhibin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ZBNetworkingDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 7DF8262C1D5815BE000D1109 16 | 17 | primary 18 | 19 | 20 | 7DF826451D5815BE000D1109 21 | 22 | primary 23 | 24 | 25 | 7DF826501D5815BE000D1109 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/DataManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // DataManager.h 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2020/1/19. 6 | // Copyright © 2020 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface DataManager : NSObject 14 | 15 | @property(nonatomic,copy)NSString *cacheKey; 16 | 17 | @property(nonatomic,copy)NSString *tag; 18 | /** 19 | * 数据管理对象单例 20 | * 21 | * @return self 22 | */ 23 | + (instancetype)sharedInstance; 24 | /** 25 | * 保存页面数据 26 | * 27 | * @param info 页面数据 28 | * @param menuId 菜单id 29 | */ 30 | - (void)saveDataInfo:(NSDictionary *)info key:(NSString *)key; 31 | /** 32 | * 根据menuId获取相应页面的数据 33 | * 34 | * @param menuId 菜单id 35 | * 36 | * @return 页面数据,可为nil 37 | */ 38 | - (NSDictionary *)dataInfoWithKey:(NSString *)key; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /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 directly 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/Target Support Files/Pods-ZBNetworkingDemo/Pods-ZBNetworkingDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/SDWebImage" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"SDWebImage" -framework "ImageIO" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ZBNetworkingDemo/Pods-ZBNetworkingDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/SDWebImage" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"SDWebImage" -framework "ImageIO" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/DataManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // DataManager.m 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2020/1/19. 6 | // Copyright © 2020 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "DataManager.h" 10 | @interface DataManager() 11 | 12 | @property (nonatomic, strong) NSMutableDictionary *dataInfo; 13 | 14 | @end 15 | @implementation DataManager 16 | + (instancetype)sharedInstance { 17 | static DataManager *sharedManager = nil; 18 | static dispatch_once_t onceToken; 19 | dispatch_once(&onceToken, ^{ 20 | sharedManager = [[self alloc] init]; 21 | sharedManager.dataInfo = [[NSMutableDictionary alloc] init]; 22 | }); 23 | return sharedManager; 24 | } 25 | 26 | - (void)saveDataInfo:(NSDictionary *)info key:(NSString *)key { 27 | if (key) { 28 | [_dataInfo setObject:info forKey:key]; 29 | } 30 | } 31 | 32 | - (NSDictionary *)dataInfoWithKey:(NSString *)key { 33 | return [_dataInfo objectForKey:key]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // ZBNetworking 4 | // 5 | // Created by NQ UEC on 16/6/21. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RequestTool.h" 11 | 12 | //屏幕宽 13 | #define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width) 14 | //屏幕高 15 | #define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height) 16 | /** 后续操作Block */ 17 | typedef void(^completedBlock)(void); 18 | 19 | @interface RootViewController : UIViewController 20 | //title 设置btn的标题; selector点击btn实现的方法; isLeft 标记btn的位置 21 | - (void)addItemWithTitle:(NSString *)title selector:(SEL)selector location:(BOOL)isLeft; 22 | - (void)customItemWithTitle:(NSString *)title selectedTitle:(NSString *)selectedTitle selector:(SEL)selector location:(BOOL)isLeft; 23 | //title提示框的标题; andMessage提示框的描述 24 | - (void)alertTitle:(NSString *)title andMessage:(NSString *)message completed:(completedBlock)completed; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Private/SDAssociatedObject.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 "SDAssociatedObject.h" 10 | #import "UIImage+Metadata.h" 11 | #import "UIImage+ExtendedCacheData.h" 12 | #import "UIImage+MemoryCacheCost.h" 13 | #import "UIImage+ForceDecode.h" 14 | 15 | void SDImageCopyAssociatedObject(UIImage * _Nullable source, UIImage * _Nullable target) { 16 | if (!source || !target) { 17 | return; 18 | } 19 | // Image Metadata 20 | target.sd_isIncremental = source.sd_isIncremental; 21 | target.sd_imageLoopCount = source.sd_imageLoopCount; 22 | target.sd_imageFormat = source.sd_imageFormat; 23 | // Force Decode 24 | target.sd_isDecoded = source.sd_isDecoded; 25 | // Extended Cache Data 26 | target.sd_extendedObject = source.sd_extendedObject; 27 | } 28 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/HomeModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // HomeModel.h 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2018/10/12. 6 | // Copyright © 2018年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HomeModel : NSObject 12 | //@property (nonatomic,copy)NSString *wid; //id 13 | //@property (nonatomic,copy)NSString *name;//名字 14 | //@property (nonatomic,copy)NSString *detail; 15 | 16 | @property (nonatomic,copy)NSString *newsId;//新闻id 17 | @property (nonatomic,copy)NSString *title;//新闻名字 18 | //@property (nonatomic,strong)NSDictionary *iconDict;//图片 19 | @property (nonatomic,copy)id icon;//图片 20 | @property (nonatomic,copy)NSString *online;//时间 21 | @property (nonatomic,copy)NSString *icon_small1;//图片icon_small1 22 | @property (nonatomic,copy)NSString *icon_small2;//图片icon_small2 23 | @property (nonatomic,copy)NSString *icon_small3;//图片icon_small3 24 | @property (nonatomic,copy)NSString *type;//展示类型 25 | @property (nonatomic,copy)NSString *hits;//浏览数量 26 | 27 | -(instancetype)initWithDict:(NSDictionary *)dict; 28 | @end 29 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ZBNetworking/NSString+ZBURLEncoding.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+ZBURLEncoding.h 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2022/8/11. 6 | // Copyright © 2022 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSString (ZBURLEncoding) 14 | 15 | /** 16 | * UTF8 17 | * 18 | * @param urlString 编码前的url字符串 19 | * @return 返回 编码后的url字符串 20 | */ 21 | + (NSString *)zb_stringEncoding:(NSString *)urlString; 22 | 23 | /** 24 | * url字符串与parameters参数的的拼接 25 | * 26 | * @param urlString url字符串 27 | * @param parameters parameters参数 28 | * @return 返回拼接后的url字符串 29 | */ 30 | + (NSString *)zb_urlString:(NSString *)urlString appendingParameters:(id)parameters; 31 | 32 | @end 33 | 34 | @interface ZBRequestTool : NSObject 35 | 36 | /** 37 | * 参数过滤变动参数 38 | * 39 | * @param parameters 参数 40 | * @param filtrationCacheKey 需要过滤的参数 41 | * @return 返回过滤后的参数 42 | */ 43 | + (id)formaParameters:(id)parameters filtrationCacheKey:(NSArray *)filtrationCacheKey; 44 | 45 | @end 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (4.0.1): 3 | - AFNetworking/NSURLSession (= 4.0.1) 4 | - AFNetworking/Reachability (= 4.0.1) 5 | - AFNetworking/Security (= 4.0.1) 6 | - AFNetworking/Serialization (= 4.0.1) 7 | - AFNetworking/UIKit (= 4.0.1) 8 | - AFNetworking/NSURLSession (4.0.1): 9 | - AFNetworking/Reachability 10 | - AFNetworking/Security 11 | - AFNetworking/Serialization 12 | - AFNetworking/Reachability (4.0.1) 13 | - AFNetworking/Security (4.0.1) 14 | - AFNetworking/Serialization (4.0.1) 15 | - AFNetworking/UIKit (4.0.1): 16 | - AFNetworking/NSURLSession 17 | - SDWebImage (5.8.4): 18 | - SDWebImage/Core (= 5.8.4) 19 | - SDWebImage/Core (5.8.4) 20 | 21 | DEPENDENCIES: 22 | - AFNetworking 23 | - SDWebImage 24 | 25 | SPEC REPOS: 26 | https://github.com/CocoaPods/Specs.git: 27 | - AFNetworking 28 | - SDWebImage 29 | 30 | SPEC CHECKSUMS: 31 | AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce 32 | SDWebImage: cf6922231e95550934da2ada0f20f2becf2ceba9 33 | 34 | PODFILE CHECKSUM: d9933c9906069b75957ac9a8ac617cf6a89ec16e 35 | 36 | COCOAPODS: 1.9.1 37 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (4.0.1): 3 | - AFNetworking/NSURLSession (= 4.0.1) 4 | - AFNetworking/Reachability (= 4.0.1) 5 | - AFNetworking/Security (= 4.0.1) 6 | - AFNetworking/Serialization (= 4.0.1) 7 | - AFNetworking/UIKit (= 4.0.1) 8 | - AFNetworking/NSURLSession (4.0.1): 9 | - AFNetworking/Reachability 10 | - AFNetworking/Security 11 | - AFNetworking/Serialization 12 | - AFNetworking/Reachability (4.0.1) 13 | - AFNetworking/Security (4.0.1) 14 | - AFNetworking/Serialization (4.0.1) 15 | - AFNetworking/UIKit (4.0.1): 16 | - AFNetworking/NSURLSession 17 | - SDWebImage (5.8.4): 18 | - SDWebImage/Core (= 5.8.4) 19 | - SDWebImage/Core (5.8.4) 20 | 21 | DEPENDENCIES: 22 | - AFNetworking 23 | - SDWebImage 24 | 25 | SPEC REPOS: 26 | https://github.com/CocoaPods/Specs.git: 27 | - AFNetworking 28 | - SDWebImage 29 | 30 | SPEC CHECKSUMS: 31 | AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce 32 | SDWebImage: cf6922231e95550934da2ada0f20f2becf2ceba9 33 | 34 | PODFILE CHECKSUM: d9933c9906069b75957ac9a8ac617cf6a89ec16e 35 | 36 | COCOAPODS: 1.9.1 37 | -------------------------------------------------------------------------------- /ZBNetworkingDemoTests/ZBNetworkingDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZBNetworkingDemoTests.m 3 | // ZBNetworkingDemoTests 4 | // 5 | // Created by NQ UEC on 16/8/8. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZBNetworkingDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ZBNetworkingDemoTests 16 | 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | 27 | } 28 | 29 | - (void)testExample { 30 | // This is an example of a functional test case. 31 | // Use XCTAssert and related functions to verify your tests produce the correct results. 32 | } 33 | 34 | - (void)testPerformanceExample { 35 | // This is an example of a performance test case. 36 | [self measureBlock:^{ 37 | // Put the code you want to measure the time of here. 38 | }]; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /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/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 | @interface SDDisplayLink : NSObject 15 | 16 | @property (readonly, nonatomic, weak, nullable) id target; 17 | @property (readonly, nonatomic, assign, nonnull) SEL selector; 18 | @property (readonly, nonatomic) CFTimeInterval duration; 19 | @property (readonly, nonatomic) BOOL isRunning; 20 | 21 | + (nonnull instancetype)displayLinkWithTarget:(nonnull id)target selector:(nonnull SEL)sel; 22 | 23 | - (void)addToRunLoop:(nonnull NSRunLoop *)runloop forMode:(nonnull NSRunLoopMode)mode; 24 | - (void)removeFromRunLoop:(nonnull NSRunLoop *)runloop forMode:(nonnull NSRunLoopMode)mode; 25 | 26 | - (void)start; 27 | - (void)stop; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Andy(https://github.com/Suzhibin/ZBNetworking) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /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/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 | /// A Image-Asset manager to work like UIKit/AppKit's image cache behavior 13 | /// 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 :) 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/AFNetworking/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2020 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 | -------------------------------------------------------------------------------- /ZBNetworking.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint ZBNetworking.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | s.name = "ZBNetworking" 12 | s.version = "1.0.4" 13 | s.summary = "The network request library adds caching policies." 14 | 15 | s.homepage = "https://github.com/Suzhibin/ZBNetworking" 16 | 17 | s.license = { :type => "MIT", :file => "FILE_LICENS" } 18 | 19 | s.author = { "Suzhibin" => "szb2323@163.com" } 20 | 21 | s.ios.deployment_target = '9.0' 22 | s.osx.deployment_target = '10.10' 23 | s.watchos.deployment_target = '2.0' 24 | s.tvos.deployment_target = '9.0' 25 | 26 | s.source = { :git => "https://github.com/Suzhibin/ZBNetworking.git", :tag => s.version } 27 | 28 | s.source_files = "ZBNetworking/**/*.{h,m}" 29 | 30 | s.requires_arc = true 31 | 32 | s.dependency "AFNetworking" 33 | 34 | end 35 | -------------------------------------------------------------------------------- /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/Private/SDFileAttributeHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // This file is from https://gist.github.com/zydeco/6292773 3 | // 4 | // Created by Jesús A. Álvarez on 2008-12-17. 5 | // Copyright 2008-2009 namedfork.net. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | /// File Extended Attribute (xattr) helper methods 11 | @interface SDFileAttributeHelper : NSObject 12 | 13 | + (nullable NSArray *)extendedAttributeNamesAtPath:(nonnull NSString *)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err; 14 | + (BOOL)hasExtendedAttribute:(nonnull NSString *)name atPath:(nonnull NSString *)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err; 15 | + (nullable NSData *)extendedAttribute:(nonnull NSString *)name atPath:(nonnull NSString *)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err; 16 | + (BOOL)setExtendedAttribute:(nonnull NSString *)name value:(nonnull NSData *)value atPath:(nonnull NSString *)path traverseLink:(BOOL)follow overwrite:(BOOL)overwrite error:(NSError * _Nullable * _Nullable)err; 17 | + (BOOL)removeExtendedAttribute:(nonnull NSString *)name atPath:(nonnull NSString *)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /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+SDHexString.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+SDHexString.h" 10 | 11 | @implementation UIColor (SDHexString) 12 | 13 | - (NSString *)sd_hexString { 14 | CGFloat red, green, blue, alpha; 15 | #if SD_UIKIT 16 | if (![self getRed:&red green:&green blue:&blue alpha:&alpha]) { 17 | [self getWhite:&red alpha:&alpha]; 18 | green = red; 19 | blue = red; 20 | } 21 | #else 22 | @try { 23 | [self getRed:&red green:&green blue:&blue alpha:&alpha]; 24 | } 25 | @catch (NSException *exception) { 26 | [self getWhite:&red alpha:&alpha]; 27 | green = red; 28 | blue = red; 29 | } 30 | #endif 31 | 32 | red = roundf(red * 255.f); 33 | green = roundf(green * 255.f); 34 | blue = roundf(blue * 255.f); 35 | alpha = roundf(alpha * 255.f); 36 | 37 | uint hex = ((uint)alpha << 24) | ((uint)red << 16) | ((uint)green << 8) | ((uint)blue); 38 | 39 | return [NSString stringWithFormat:@"#%08x", hex]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/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 | SDImageCoderOption const SDImageCoderDecodePreserveAspectRatio = @"decodePreserveAspectRatio"; 14 | SDImageCoderOption const SDImageCoderDecodeThumbnailPixelSize = @"decodeThumbnailPixelSize"; 15 | 16 | SDImageCoderOption const SDImageCoderEncodeFirstFrameOnly = @"encodeFirstFrameOnly"; 17 | SDImageCoderOption const SDImageCoderEncodeCompressionQuality = @"encodeCompressionQuality"; 18 | SDImageCoderOption const SDImageCoderEncodeBackgroundColor = @"encodeBackgroundColor"; 19 | SDImageCoderOption const SDImageCoderEncodeMaxPixelSize = @"encodeMaxPixelSize"; 20 | SDImageCoderOption const SDImageCoderEncodeMaxFileSize = @"encodeMaxFileSize"; 21 | SDImageCoderOption const SDImageCoderEncodeEmbedThumbnail = @"encodeEmbedThumbnail"; 22 | 23 | SDImageCoderOption const SDImageCoderWebImageContext = @"webImageContext"; 24 | -------------------------------------------------------------------------------- /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 an 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/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 | -------------------------------------------------------------------------------- /ZBNetworkingDemoUITests/ZBNetworkingDemoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZBNetworkingDemoUITests.m 3 | // ZBNetworkingDemoUITests 4 | // 5 | // Created by NQ UEC on 16/8/8. 6 | // Copyright © 2016年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZBNetworkingDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ZBNetworkingDemoUITests 16 | 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | 21 | // Put setup code here. This method is called before the invocation of each test method in the class. 22 | 23 | // In UI tests it is usually best to stop immediately when a failure occurs. 24 | self.continueAfterFailure = NO; 25 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 26 | [[[XCUIApplication alloc] init] launch]; 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Core/UIImage+ExtendedCacheData.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 | @interface UIImage (ExtendedCacheData) 14 | 15 | /** 16 | Read and Write the extended object and bind it to the image. Which can hold some extra metadata like Image's scale factor, URL rich link, date, etc. 17 | The extended object should conforms to NSCoding, which we use `NSKeyedArchiver` and `NSKeyedUnarchiver` to archive it to data, and write to disk cache. 18 | @note The disk cache preserve both of the data and extended data with the same cache key. For manual query, use the `SDDiskCache` protocol method `extendedDataForKey:` instead. 19 | @note You can specify arbitrary object conforms to NSCoding (NSObject protocol here is used to support object using `NS_ROOT_CLASS`, which is not NSObject subclass). If you load image from disk cache, you should check the extended object class to avoid corrupted data. 20 | @warning This object don't need to implements NSSecureCoding (but it's recommended), because we allows arbitrary class. 21 | */ 22 | @property (nonatomic, strong, nullable) id sd_extendedObject; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /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. Return 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/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/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 | /// Provide the image data associated to the image and store to disk cache 21 | /// @param image The loaded image 22 | /// @param data The original loaded image data 23 | /// @param imageURL The image URL 24 | - (nullable NSData *)cacheDataWithImage:(nonnull UIImage *)image originalData:(nullable NSData *)data imageURL:(nullable NSURL *)imageURL; 25 | 26 | @end 27 | 28 | /** 29 | A cache serializer class with block. 30 | */ 31 | @interface SDWebImageCacheSerializer : NSObject 32 | 33 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageCacheSerializerBlock)block; 34 | + (nonnull instancetype)cacheSerializerWithBlock:(nonnull SDWebImageCacheSerializerBlock)block; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /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/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 | @note If you don't care bitmap format (ARGB8888) and just draw image, use `SDGraphicsImageRenderer` instead. It's more performant on RAM usage.` 17 | */ 18 | 19 | /// Returns the current graphics context. 20 | FOUNDATION_EXPORT CGContextRef __nullable SDGraphicsGetCurrentContext(void) CF_RETURNS_NOT_RETAINED; 21 | /// Creates a bitmap-based graphics context and makes it the current context. 22 | FOUNDATION_EXPORT void SDGraphicsBeginImageContext(CGSize size); 23 | /// Creates a bitmap-based graphics context with the specified options. 24 | FOUNDATION_EXPORT void SDGraphicsBeginImageContextWithOptions(CGSize size, BOOL opaque, CGFloat scale); 25 | /// Removes the current bitmap-based graphics context from the top of the stack. 26 | FOUNDATION_EXPORT void SDGraphicsEndImageContext(void); 27 | /// Returns an image based on the contents of the current bitmap-based graphics context. 28 | FOUNDATION_EXPORT UIImage * __nullable SDGraphicsGetImageFromCurrentImageContext(void); 29 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | UILaunchStoryboardName 31 | LaunchScreen 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Pods/AFNetworking/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | // AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 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 | 23 | #import 24 | #import 25 | #import 26 | 27 | #ifndef _AFNETWORKING_ 28 | #define _AFNETWORKING_ 29 | 30 | #import "AFURLRequestSerialization.h" 31 | #import "AFURLResponseSerialization.h" 32 | #import "AFSecurityPolicy.h" 33 | 34 | #if !TARGET_OS_WATCH 35 | #import "AFNetworkReachabilityManager.h" 36 | #endif 37 | 38 | #import "AFURLSessionManager.h" 39 | #import "AFHTTPSessionManager.h" 40 | 41 | #endif /* _AFNETWORKING_ */ 42 | -------------------------------------------------------------------------------- /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 dealloced 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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Build generated 4 | build/ 5 | DerivedData/ 6 | 7 | ## Various settings 8 | xcuserdata/ 9 | 10 | ## Other 11 | .DS_Store 12 | 13 | ## Obj-C/Swift specific 14 | *.hmap 15 | *.ipa 16 | *.dSYM.zip 17 | *.dSYM 18 | 19 | ## Playgrounds 20 | timeline.xctimeline 21 | playground.xcworkspace 22 | 23 | # Swift Package Manager 24 | # 25 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 26 | # Packages/ 27 | # Package.pins 28 | # Package.resolved 29 | .build/ 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | 38 | # 39 | # Add this line if you want to avoid checking in source code from the Xcode workspace 40 | # *.xcworkspace 41 | 42 | # Carthage 43 | # 44 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 45 | # Carthage/Checkouts 46 | 47 | Carthage/Build 48 | 49 | # fastlane 50 | # 51 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 52 | # screenshots whenever they are needed. 53 | # For more information about the recommended setup visit: 54 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 55 | 56 | fastlane/report.xml 57 | fastlane/Preview.html 58 | fastlane/screenshots/**/*.png 59 | fastlane/test_output 60 | 61 | 62 | *.xcuserstate 63 | 64 | project.xcworkspace 65 | 66 | xcuserdata 67 | 68 | UserInterfaceState.xcuserstate 69 | 70 | project.xcworkspace/ 71 | 72 | xcuserdata/ 73 | 74 | UserInterface.xcuserstate 75 | 76 | 77 | ZBNetworking/Pods 78 | Pods 79 | Pods/ 80 | Pods/* 81 | Podfile.lock 82 | Manifest.lock -------------------------------------------------------------------------------- /ZBNetworking/NSString+ZBURLEncoding.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+ZBURLEncoding.m 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2022/8/11. 6 | // Copyright © 2022 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "NSString+ZBURLEncoding.h" 10 | 11 | @implementation NSString (ZBURLEncoding) 12 | + (NSString *)zb_stringEncoding:(NSString *)urlString{ 13 | return [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; 14 | } 15 | 16 | + (NSString *)zb_urlString:(NSString *)urlString appendingParameters:(id)parameters{ 17 | if (parameters==nil) { 18 | return urlString; 19 | }else{ 20 | NSString *parametersString; 21 | if ([parameters isKindOfClass:[NSDictionary class]]){ 22 | NSMutableArray *array = [[NSMutableArray alloc] init]; 23 | for (NSString *key in parameters) { 24 | id obj = [parameters objectForKey:key]; 25 | NSString *str = [NSString stringWithFormat:@"%@=%@",key,obj]; 26 | [array addObject:str]; 27 | } 28 | parametersString = [array componentsJoinedByString:@"&"]; 29 | }else{ 30 | parametersString =[NSString stringWithFormat:@"%@",parameters] ; 31 | } 32 | return [urlString stringByAppendingString:[NSString stringWithFormat:@"?%@",parametersString]]; 33 | } 34 | } 35 | @end 36 | 37 | @implementation ZBRequestTool 38 | 39 | + (id)formaParameters:(id)parameters filtrationCacheKey:(NSArray *)filtrationCacheKey{ 40 | if ([parameters isKindOfClass:[NSDictionary class]]) { 41 | NSMutableDictionary *mutableParameters = [NSMutableDictionary dictionaryWithDictionary:parameters]; 42 | [mutableParameters removeObjectsForKeys:filtrationCacheKey]; 43 | return [mutableParameters copy]; 44 | }else { 45 | return parameters; 46 | } 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/PlayerViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlayerViewController.m 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2020/11/10. 6 | // Copyright © 2020 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "PlayerViewController.h" 10 | #import 11 | #import 12 | @interface PlayerViewController (){ 13 | AVPlayerViewController *_playerController; 14 | AVPlayer *_player; 15 | } 16 | @end 17 | 18 | @implementation PlayerViewController 19 | - (void)dealloc{ 20 | NSLog(@"释放%s",__func__); 21 | } 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | // Do any additional setup after loading the view. 25 | 26 | _player = [AVPlayer playerWithURL:[NSURL URLWithString:self.videoUrl]]; 27 | _playerController = [[AVPlayerViewController alloc] init]; 28 | _playerController.player = _player; 29 | _playerController.videoGravity = AVLayerVideoGravityResizeAspect; 30 | _playerController.delegate = self; 31 | _playerController.allowsPictureInPicturePlayback = true; //画中画,iPad可用 32 | _playerController.showsPlaybackControls = true; 33 | 34 | [self addChildViewController:_playerController]; 35 | _playerController.view.translatesAutoresizingMaskIntoConstraints = true; //AVPlayerViewController 内部可能是用约束写的,这句可以禁用自动约束,消除报错 36 | _playerController.view.frame = self.view.bounds; 37 | [self.view addSubview:_playerController.view]; 38 | 39 | [_playerController.player play]; //自动播放 40 | } 41 | 42 | /* 43 | #pragma mark - Navigation 44 | 45 | // In a storyboard-based application, you will often want to do a little preparation before navigation 46 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 47 | // Get the new view controller using [segue destinationViewController]. 48 | // Pass the selected object to the new view controller. 49 | } 50 | */ 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /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/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIKit+AFNetworking.h 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 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 | 23 | #import 24 | 25 | #ifndef _UIKIT_AFNETWORKING_ 26 | #define _UIKIT_AFNETWORKING_ 27 | 28 | #if TARGET_OS_IOS || TARGET_OS_TV 29 | #import "AFAutoPurgingImageCache.h" 30 | #import "AFImageDownloader.h" 31 | #import "UIActivityIndicatorView+AFNetworking.h" 32 | #import "UIButton+AFNetworking.h" 33 | #import "UIImageView+AFNetworking.h" 34 | #import "UIProgressView+AFNetworking.h" 35 | #endif 36 | 37 | #if TARGET_OS_IOS 38 | #import "AFNetworkActivityIndicatorManager.h" 39 | #import "UIRefreshControl+AFNetworking.h" 40 | #import "WKWebView+AFNetworking.h" 41 | #endif 42 | 43 | #endif /* _UIKIT_AFNETWORKING_ */ 44 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/Private/NSBezierPath+SDRoundedCorners.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+SDRoundedCorners.h" 10 | 11 | #if SD_MAC 12 | 13 | @implementation NSBezierPath (SDRoundedCorners) 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 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /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 | SDWebImageErrorBlackListed = 1003, // The URL is blacklisted because of unrecoverable failure marked by downloader (such as 404), you can use `.retryFailed` option to avoid this 23 | SDWebImageErrorInvalidDownloadOperation = 2000, // The image download operation is invalid, such as nil operation or unexpected error occur when operation initialized 24 | SDWebImageErrorInvalidDownloadStatusCode = 2001, // The image download response a invalid status code. You can check the status code in error's userInfo under `SDWebImageErrorDownloadStatusCodeKey` 25 | 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. 26 | SDWebImageErrorInvalidDownloadResponse = 2003, // When using response modifier, the modified download response is nil and marked as failed. 27 | }; 28 | -------------------------------------------------------------------------------- /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/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS || TARGET_OS_TV 27 | 28 | #import 29 | 30 | /** 31 | This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a session task. 32 | */ 33 | @interface UIActivityIndicatorView (AFNetworking) 34 | 35 | ///---------------------------------- 36 | /// @name Animating for Session Tasks 37 | ///---------------------------------- 38 | 39 | /** 40 | Binds the animating state to the state of the specified task. 41 | 42 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 43 | */ 44 | - (void)setAnimatingWithStateOfTask:(nullable NSURLSessionTask *)task; 45 | 46 | @end 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /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 SD_CSTRING 25 | #define SD_CSTRING(str) #str 26 | #endif 27 | 28 | #ifndef SD_NSSTRING 29 | #define SD_NSSTRING(str) @(SD_CSTRING(str)) 30 | #endif 31 | 32 | #ifndef SD_SEL_SPI 33 | #define SD_SEL_SPI(name) NSSelectorFromString([NSString stringWithFormat:@"_%@", SD_NSSTRING(name)]) 34 | #endif 35 | 36 | #ifndef weakify 37 | #define weakify(...) \ 38 | sd_keywordify \ 39 | metamacro_foreach_cxt(sd_weakify_,, __weak, __VA_ARGS__) 40 | #endif 41 | 42 | #ifndef strongify 43 | #define strongify(...) \ 44 | sd_keywordify \ 45 | _Pragma("clang diagnostic push") \ 46 | _Pragma("clang diagnostic ignored \"-Wshadow\"") \ 47 | metamacro_foreach(sd_strongify_,, __VA_ARGS__) \ 48 | _Pragma("clang diagnostic pop") 49 | #endif 50 | 51 | #define sd_weakify_(INDEX, CONTEXT, VAR) \ 52 | CONTEXT __typeof__(VAR) metamacro_concat(VAR, _weak_) = (VAR); 53 | 54 | #define sd_strongify_(INDEX, VAR) \ 55 | __strong __typeof__(VAR) VAR = metamacro_concat(VAR, _weak_); 56 | 57 | #if DEBUG 58 | #define sd_keywordify autoreleasepool {} 59 | #else 60 | #define sd_keywordify try {} @catch (...) {} 61 | #endif 62 | 63 | #ifndef onExit 64 | #define onExit \ 65 | sd_keywordify \ 66 | __strong sd_cleanupBlock_t metamacro_concat(sd_exitBlock_, __LINE__) __attribute__((cleanup(sd_executeCleanupBlock), unused)) = ^ 67 | #endif 68 | 69 | typedef void (^sd_cleanupBlock_t)(void); 70 | 71 | #if defined(__cplusplus) 72 | extern "C" { 73 | #endif 74 | void sd_executeCleanupBlock (__strong sd_cleanupBlock_t *block); 75 | #if defined(__cplusplus) 76 | } 77 | #endif 78 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/APMModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // APMModel.h 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2022/1/14. 6 | // Copyright © 2022 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface APMModel : NSObject 14 | /// 自定义参数 15 | @property (nonatomic, copy) NSString *token; 16 | 17 | /// 请求的 URL 地址 18 | @property (nonatomic, copy) NSString *req_url; 19 | ///完整的路径 20 | @property (nonatomic, copy) NSString *req_path; 21 | /// 请求参数 22 | @property (nonatomic, copy) NSString *req_params; 23 | 24 | /// 请求头 25 | @property (nonatomic, strong) NSDictionary *req_headers; 26 | 27 | /// 请求头流量 28 | @property (nonatomic, assign) int64_t req_header_byte; 29 | 30 | /// 请求体流量 31 | @property (nonatomic, assign) int64_t req_body_byte; 32 | 33 | /// 响应头 34 | @property (nonatomic, strong) NSDictionary *res_headers; 35 | 36 | /// 响应码 37 | @property (nonatomic, assign) NSInteger status_code; 38 | 39 | /// 响应头流量 40 | @property (nonatomic, assign) int64_t res_header_byte; 41 | 42 | /// 响应体流量 43 | @property (nonatomic, assign) int64_t res_body_byte; 44 | 45 | /// HTTP 方法 46 | @property (nonatomic, copy) NSString *http_method; 47 | 48 | /// 协议名 49 | @property (nonatomic, copy) NSString *protocol_name; 50 | 51 | /// 是否使用代理 52 | @property (nonatomic, assign) BOOL proxy_connection; 53 | 54 | /// 是否蜂窝连接 55 | @property (nonatomic, assign) BOOL cellular; 56 | 57 | /// 本地 ip 58 | @property (nonatomic, copy) NSString *local_ip; 59 | 60 | /// 本地端口 61 | @property (nonatomic, assign) NSInteger local_port; 62 | 63 | /// 远端 ip 64 | @property (nonatomic, copy) NSString *remote_ip; 65 | 66 | /// 远端端口 67 | @property (nonatomic, assign) NSInteger remote_port; 68 | 69 | #pragma mark - cost time 70 | 71 | /// DNS 解析耗时 72 | @property (nonatomic, assign) int64_t dns_time; 73 | 74 | /// TCP 连接耗时 75 | @property (nonatomic, assign) int64_t tcp_time; 76 | 77 | /// SSL 握手耗时 78 | @property (nonatomic, assign) int64_t ssl_time; 79 | 80 | /// Request 请求耗时 81 | @property (nonatomic, assign) int64_t req_time; 82 | 83 | /// Response 响应耗时 84 | @property (nonatomic, assign) int64_t res_time; 85 | 86 | /// 请求到响应总耗时 87 | @property (nonatomic, assign) int64_t req_total_time; 88 | 89 | @end 90 | 91 | NS_ASSUME_NONNULL_END 92 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 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 | 23 | #import 24 | 25 | #import 26 | 27 | #if TARGET_OS_IOS 28 | 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically beginning and ending refreshing depending on the loading state of a session task. 35 | */ 36 | @interface UIRefreshControl (AFNetworking) 37 | 38 | ///----------------------------------- 39 | /// @name Refreshing for Session Tasks 40 | ///----------------------------------- 41 | 42 | /** 43 | Binds the refreshing state to the state of the specified task. 44 | 45 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 46 | */ 47 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; 48 | 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /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 constants, 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 | -------------------------------------------------------------------------------- /ZBNetworkingDemo/CustomTabBarController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CustomTabBarController.m 3 | // ZBNetworkingDemo 4 | // 5 | // Created by Suzhibin on 2018/10/12. 6 | // Copyright © 2018年 Suzhibin. All rights reserved. 7 | // 8 | 9 | #import "CustomTabBarController.h" 10 | #import "HomeViewController.h" 11 | #import "MethodViewController.h" 12 | #import "SettingViewController.h" 13 | @interface CustomTabBarController () 14 | 15 | @end 16 | 17 | @implementation CustomTabBarController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view. 22 | HomeViewController *homeVC=[[HomeViewController alloc]init]; 23 | [self setupChildViewController:homeVC title:@"首页" image:@"equal.square" selectedImage:@"equal.square.fill"]; 24 | SettingViewController *settingVC=[[SettingViewController alloc]init]; 25 | [self setupChildViewController:settingVC title:@"缓存设置" image:@"seal" selectedImage:@"seal.fill"]; 26 | 27 | MethodViewController *methodVC=[[MethodViewController alloc]init]; 28 | [self setupChildViewController:methodVC title:@"方法展示" image:@"tray.full" selectedImage:@"tray.full.fill"]; 29 | } 30 | - (void)setupChildViewController:(UIViewController *)vc title:(NSString *)title image:(NSString *)image selectedImage:(NSString *)selectedImage 31 | { 32 | vc.title = title; 33 | if (@available(iOS 13.0, *)) { 34 | vc.tabBarItem.image=[[UIImage systemImageNamed:image]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; 35 | vc.tabBarItem.selectedImage=[[UIImage systemImageNamed:selectedImage]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; 36 | } 37 | [self addChildViewController:[[UINavigationController alloc] initWithRootViewController:vc]]; 38 | } 39 | 40 | - (void)didReceiveMemoryWarning { 41 | [super didReceiveMemoryWarning]; 42 | // Dispose of any resources that can be recreated. 43 | } 44 | 45 | /* 46 | #pragma mark - Navigation 47 | 48 | // In a storyboard-based application, you will often want to do a little preparation before navigation 49 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 50 | // Get the new view controller using [segue destinationViewController]. 51 | // Pass the selected object to the new view controller. 52 | } 53 | */ 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Pods/AFNetworking/AFNetworking/AFCompatibilityMacros.h: -------------------------------------------------------------------------------- 1 | // AFCompatibilityMacros.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #ifndef AFCompatibilityMacros_h 23 | #define AFCompatibilityMacros_h 24 | 25 | #ifdef API_AVAILABLE 26 | #define AF_API_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__) 27 | #else 28 | #define AF_API_AVAILABLE(...) 29 | #endif // API_AVAILABLE 30 | 31 | #ifdef API_UNAVAILABLE 32 | #define AF_API_UNAVAILABLE(...) API_UNAVAILABLE(__VA_ARGS__) 33 | #else 34 | #define AF_API_UNAVAILABLE(...) 35 | #endif // API_UNAVAILABLE 36 | 37 | #if __has_warning("-Wunguarded-availability-new") 38 | #define AF_CAN_USE_AT_AVAILABLE 1 39 | #else 40 | #define AF_CAN_USE_AT_AVAILABLE 0 41 | #endif 42 | 43 | #if ((__IPHONE_OS_VERSION_MAX_ALLOWED && __IPHONE_OS_VERSION_MAX_ALLOWED < 100000) || (__MAC_OS_VERSION_MAX_ALLOWED && __MAC_OS_VERSION_MAX_ALLOWED < 101200) ||(__WATCH_OS_MAX_VERSION_ALLOWED && __WATCH_OS_MAX_VERSION_ALLOWED < 30000) ||(__TV_OS_MAX_VERSION_ALLOWED && __TV_OS_MAX_VERSION_ALLOWED < 100000)) 44 | #define AF_CAN_INCLUDE_SESSION_TASK_METRICS 0 45 | #else 46 | #define AF_CAN_INCLUDE_SESSION_TASK_METRICS 1 47 | #endif 48 | 49 | #endif /* AFCompatibilityMacros_h */ 50 | -------------------------------------------------------------------------------- /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 | static const SDImageFormat SDImageFormatPDF = 7; 27 | static const SDImageFormat SDImageFormatSVG = 8; 28 | 29 | /** 30 | NSData category about the image content type and UTI. 31 | */ 32 | @interface NSData (ImageContentType) 33 | 34 | /** 35 | * Return image format 36 | * 37 | * @param data the input image data 38 | * 39 | * @return the image format as `SDImageFormat` (enum) 40 | */ 41 | + (SDImageFormat)sd_imageFormatForImageData:(nullable NSData *)data; 42 | 43 | /** 44 | * Convert SDImageFormat to UTType 45 | * 46 | * @param format Format as SDImageFormat 47 | * @return The UTType as CFStringRef 48 | * @note For unknown format, `kUTTypeImage` abstract type will return 49 | */ 50 | + (nonnull CFStringRef)sd_UTTypeFromImageFormat:(SDImageFormat)format CF_RETURNS_NOT_RETAINED NS_SWIFT_NAME(sd_UTType(from:)); 51 | 52 | /** 53 | * Convert UTType to SDImageFormat 54 | * 55 | * @param uttype The UTType as CFStringRef 56 | * @return The Format as SDImageFormat 57 | * @note For unknown type, `SDImageFormatUndefined` will return 58 | */ 59 | + (SDImageFormat)sd_imageFormatFromUTType:(nonnull CFStringRef)uttype; 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/nquec.xcuserdatad/xcschemes/SDWebImage.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/nquec.xcuserdatad/xcschemes/AFNetworking.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/suzhibin.xcuserdatad/xcschemes/SDWebImage.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/suzhibin.xcuserdatad/xcschemes/AFNetworking.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/nquec.xcuserdatad/xcschemes/Pods-ZBNetworkingDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/suzhibin.xcuserdatad/xcschemes/Pods-ZBNetworkingDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/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 preferred algorithm. 21 | /// @param data The original download data 22 | /// @param response The URL response for data. If you modify 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 | /// Create the data decryptor with block 34 | /// @param block A block to control decrypt logic 35 | - (nonnull instancetype)initWithBlock:(nonnull SDWebImageDownloaderDecryptorBlock)block; 36 | 37 | /// Create the data decryptor with block 38 | /// @param block A block to control decrypt logic 39 | + (nonnull instancetype)decryptorWithBlock:(nonnull SDWebImageDownloaderDecryptorBlock)block; 40 | 41 | @end 42 | 43 | /// Convenience way to create decryptor for common data encryption. 44 | @interface SDWebImageDownloaderDecryptor (Conveniences) 45 | 46 | /// Base64 Encoded image data decryptor 47 | @property (class, readonly, nonnull) SDWebImageDownloaderDecryptor *base64Decryptor; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /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/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 | * UIKit: 39 | * Check the `isSymbolImage` property. Also check the system PDF(iOS 11+) && SVG(iOS 13+) support. 40 | * AppKit: 41 | * NSImage supports PDF && SVG && EPS imageRep, check the imageRep class. 42 | */ 43 | @property (nonatomic, assign, readonly) BOOL sd_isVector; 44 | 45 | /** 46 | * The image format represent the original compressed image data format. 47 | * 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. 48 | * @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. 49 | */ 50 | @property (nonatomic, assign) SDImageFormat sd_imageFormat; 51 | 52 | /** 53 | A bool value indicating whether the image is during incremental decoding and may not contains full pixels. 54 | */ 55 | @property (nonatomic, assign) BOOL sd_isIncremental; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | 发布于2024年1月15日 周一 2 | v1.0.3 3 | 1.增加XML和Plist格式响应数据 4 | 2.responseContentTypes 默认类型增加 application/x-www-form-urlencoded 5 | 3.增加程序健壮性 6 | 7 | 发布于2023年7月14日 周五 8 | 1.下载请求 默认请求策略改为ZBRequestTypeRefresh 9 | 2.请求代理方法 target改为delegate 10 | 11 | 发布于2022年9月16日 周五 12 | 1.请求URL或server+path 在预加载插件机制更改后的重新校验优化 13 | 2.请求URL为空 暂停请求改为走失败回调 14 | 3.请求失败支持在失败插件 重新配置请求对象,前提是设置了重连次数 15 | 16 | 发布于2022年8月11日 周四 17 | 1.支持pod 指向github 集成 18 | 2.支持iOS,macOS, watchOS, tvOS 19 | 3.公共配置ZBConfig 对象内的methodType改为defaultMethodType 20 | 21 | 发布于2022年7月29日 周五 22 | 1.macOS兼容, 23 | 2.单次请求去掉配置超时时间, 24 | 3.证书配置等配置更新 25 | 26 | 发布于2022年3月28日,周一 27 | 1.request.url 改为request.path,request.url改为server+path 的组合 28 | 2.swift 使用报错处理 29 | 3.增加HEAD类型 请求 30 | 4.公共配置增加HTTPMethodsEncodingParametersInURI,用于调整 不同请求类型的参数是否拼接url后,还是封装在request body内 31 | 32 | 发布于2022年1月17日,周一 33 | 1.添加获取APM使用示例, 34 | 2.公共配置可以修改默认请求类型, 35 | 3.添加动态获取获取网络状态的方法 36 | 4.配置和请求对象 添加注释 37 | 5.修复响应插件 获取request.isCache错误的问题 38 | 39 | 发布于2021年11月19日,周五 40 | 1.修复请求不传参数,无法获取公共参数的问题 41 | 42 | 发布于2021年10月26日,周二 43 | 1.删除ZBResponseKeepType 类型,原功能移动到 ZBApiType 使用。 44 | 45 | 发布于2020年11月17日,周二 46 | 1.Download方法 支持断点下载 47 | 2.Download方法 删除自定义下载路径的功能 48 | 3.传参数parameters 支持字典,数组,字符串,NSNumber等类型 49 | 4.优化了部分方法性能开销 50 | 51 | 发布于2020年9月30日,周日 52 | 1.请求参数 支持数组类型 53 | 2.增加请求是否使用 公共参数的功能 54 | 55 | 发布于2020年9月26日,周日 56 | 主要解决同环境 多个服务器地址兼容的问题 57 | 1.原来的基础设置里的参数baseURL 改为 baseServer 58 | 2.ZBURLRequest里增加参数server 与 baseServer 不兼容,当本次请求设置了server 会替换本次请求的baseServer,不影响其他请求 59 | 3.ZBURLRequest内原来的URLString 改为 url 60 | 4.如果多个环境 有不同的 公共参数, 可以在插件机制里的 预处理请求方法内,判断server 或是userInfo等参数 进行添加 61 | 62 | 发布于2020年8月12日,周三 63 | 1.上传,下载方法 添加默认设置 防止重复请求 64 | 2.下载方法 添加默认下载路径,防止未设置下载路径崩溃 65 | 66 | 发布于2020年8月10日,周一 67 | 1.请求增加代理回调 68 | 2.不主动设置https证书 策略 69 | 3.公共配置可以添加新的 响应类型 70 | 4.修复获取缓存时,request有时对象无法释放的问题 71 | 72 | 发布于2020年6月4日,周四 73 | 1.更新了AFNetworking 4.0版本 74 | 2.优化demo的公共设置 75 | 76 | 发布于2020年1月13日,周一 77 | 1.增加了 公共配置参数功能 78 | 2.请求增加了Keep 功能,多次请求可以只响应第一次请求或最后一次请求 79 | 3.取消请求方法变更,请求成功回调参数变更 80 | 3.批量请求增加 所有请求完成的回调 81 | 4.处理Upload请求 配置请求头无法请求成功的bug 82 | 5.增加网络请求 自定义响应结果处理逻辑的方法 83 | 6.apiType枚举发生改变,ZBRequestTypeRefresh不在存储缓存, 改为ZBRequestTypeRefreshAndCache, 84 | 7.缓存增加 内存缓存。 85 | 8.请求失败 可控制设置 重新连接 86 | 87 | 发布于2018年9月19日,周三 88 | 1.增加响应数据 格式的枚举 responseSerializer 默认为ZBJSONResponseSerializer json格式 89 | 2.请求参数枚举 使用时 由 requestSerializerType 改为requestSerializer 90 | 3.ZBRequestManager.m 内新增 私有方法 responsetSerializerConfig:responseObject:用于格式化数据使用 91 | 4.Demo 在解析时去掉 手动格式化NSJSONSerialization,增加返回json时 是数组或字典的判断 92 | -------------------------------------------------------------------------------- /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 | 41 | @implementation SDWebImageDownloaderRequestModifier (Conveniences) 42 | 43 | - (instancetype)initWithMethod:(NSString *)method { 44 | return [self initWithMethod:method headers:nil body:nil]; 45 | } 46 | 47 | - (instancetype)initWithHeaders:(NSDictionary *)headers { 48 | return [self initWithMethod:nil headers:headers body:nil]; 49 | } 50 | 51 | - (instancetype)initWithBody:(NSData *)body { 52 | return [self initWithMethod:nil headers:nil body:body]; 53 | } 54 | 55 | - (instancetype)initWithMethod:(NSString *)method headers:(NSDictionary *)headers body:(NSData *)body { 56 | method = method ? [method copy] : @"GET"; 57 | headers = [headers copy]; 58 | body = [body copy]; 59 | return [self initWithBlock:^NSURLRequest * _Nullable(NSURLRequest * _Nonnull request) { 60 | NSMutableURLRequest *mutableRequest = [request mutableCopy]; 61 | mutableRequest.HTTPMethod = method; 62 | mutableRequest.HTTPBody = body; 63 | for (NSString *header in headers) { 64 | NSString *value = headers[header]; 65 | [mutableRequest setValue:value forHTTPHeaderField:header]; 66 | } 67 | return [mutableRequest copy]; 68 | }]; 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /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 | @synchronized (self) { 39 | if (self.isCancelled) { 40 | self.finished = YES; 41 | return; 42 | } 43 | 44 | self.finished = NO; 45 | self.executing = YES; 46 | 47 | if (self.executionBlock) { 48 | self.executionBlock(self); 49 | } else { 50 | self.executing = NO; 51 | self.finished = YES; 52 | } 53 | } 54 | } 55 | 56 | - (void)cancel { 57 | @synchronized (self) { 58 | [super cancel]; 59 | if (self.isExecuting) { 60 | self.executing = NO; 61 | self.finished = YES; 62 | } 63 | } 64 | } 65 | 66 | 67 | - (void)complete { 68 | @synchronized (self) { 69 | if (self.isExecuting) { 70 | self.finished = YES; 71 | self.executing = NO; 72 | } 73 | } 74 | } 75 | 76 | - (void)setFinished:(BOOL)finished { 77 | [self willChangeValueForKey:@"isFinished"]; 78 | _finished = finished; 79 | [self didChangeValueForKey:@"isFinished"]; 80 | } 81 | 82 | - (void)setExecuting:(BOOL)executing { 83 | [self willChangeValueForKey:@"isExecuting"]; 84 | _executing = executing; 85 | [self didChangeValueForKey:@"isExecuting"]; 86 | } 87 | 88 | - (BOOL)isConcurrent { 89 | return YES; 90 | } 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------