├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── ci.yml ├── .gitignore ├── .jazzy.yaml ├── .ruby-gemset ├── .ruby-version ├── .swiftformat ├── AlamofireImage.podspec ├── AlamofireImage.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── AlamofireImage iOS.xcscheme │ ├── AlamofireImage macOS.xcscheme │ ├── AlamofireImage tvOS.xcscheme │ ├── AlamofireImage visionOS.xcscheme │ ├── AlamofireImage watchOS.xcscheme │ └── iOS Example.xcscheme ├── AlamofireImage.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ ├── AlamofireImage.xcscmblueprint │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Cartfile ├── Cartfile.resolved ├── Documentation ├── AlamofireImage 2.0 Migration Guide.md ├── AlamofireImage 3.0 Migration Guide.md └── AlamofireImage 4.0 Migration Guide.md ├── Example ├── Resources │ ├── Base.lproj │ │ └── LaunchScreen.xib │ └── Images.xcassets │ │ ├── AppIcon.appiconset │ │ └── Contents.json │ │ └── Placeholder Image.imageset │ │ ├── Contents.json │ │ ├── Placeholder Image.png │ │ ├── Placeholder Image@2x.png │ │ └── Placeholder Image@3x.png ├── Source │ ├── AppDelegate.swift │ ├── Gravatar.swift │ ├── ImageCell.swift │ ├── ImageViewController.swift │ └── ImagesViewController.swift └── Supporting Files │ ├── Info.plist │ └── iOS-Example-Bridging-Header.h ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Package.resolved ├── Package.swift ├── Package@swift-5.5.swift ├── Package@swift-5.6.swift ├── Package@swift-5.7.swift ├── Package@swift-5.8.swift ├── README.md ├── Source ├── AFIError.swift ├── AlamofireImage.h ├── Image.swift ├── ImageCache.swift ├── ImageDownloader.swift ├── ImageFilter.swift ├── Info.plist ├── Request+AlamofireImage.swift ├── UIButton+AlamofireImage.swift ├── UIImage+AlamofireImage.swift └── UIImageView+AlamofireImage.swift ├── Tests ├── AFError+AlamofireImageTests.swift ├── AFResult+AlamofireImageTests.swift ├── BaseTestCase.swift ├── CGSize.ScreenScaling.swift ├── ImageCacheTests.swift ├── ImageDownloaderStressTests.swift ├── ImageDownloaderTests.swift ├── ImageFilterTests.swift ├── Info.plist ├── RequestTests.swift ├── Resources │ ├── Modified Images │ │ ├── Aspect Scaled to Fill Circle │ │ │ ├── pirate-aspect.scaled.to.fill.size.circle-100x100-@1x.png │ │ │ ├── pirate-aspect.scaled.to.fill.size.circle-100x100-@2x.png │ │ │ └── pirate-aspect.scaled.to.fill.size.circle-100x100-@3x.png │ │ ├── Aspect Scaled to Fill with Rounded Corners │ │ │ ├── pirate-aspect.scaled.to.fill.size.with.rounded.corners-100x100x20-@1x.png │ │ │ ├── pirate-aspect.scaled.to.fill.size.with.rounded.corners-100x100x20-@2x.png │ │ │ └── pirate-aspect.scaled.to.fill.size.with.rounded.corners-100x100x20-@3x.png │ │ ├── Aspect Scaled to Fill │ │ │ ├── apple-aspect.scaled.to.fill-30x60-@1x.png │ │ │ ├── apple-aspect.scaled.to.fill-30x60-@2x.png │ │ │ ├── apple-aspect.scaled.to.fill-30x60-@3x.png │ │ │ ├── apple-aspect.scaled.to.fill-50x50-@1x.png │ │ │ ├── apple-aspect.scaled.to.fill-50x50-@2x.png │ │ │ ├── apple-aspect.scaled.to.fill-50x50-@3x.png │ │ │ ├── apple-aspect.scaled.to.fill-60x30-@1x.png │ │ │ ├── apple-aspect.scaled.to.fill-60x30-@2x.png │ │ │ ├── apple-aspect.scaled.to.fill-60x30-@3x.png │ │ │ ├── pirate-aspect.scaled.to.fill-30x60-@1x.png │ │ │ ├── pirate-aspect.scaled.to.fill-30x60-@2x.png │ │ │ ├── pirate-aspect.scaled.to.fill-30x60-@3x.png │ │ │ ├── pirate-aspect.scaled.to.fill-50x50-@1x.png │ │ │ ├── pirate-aspect.scaled.to.fill-50x50-@2x.png │ │ │ ├── pirate-aspect.scaled.to.fill-50x50-@3x.png │ │ │ ├── pirate-aspect.scaled.to.fill-60x30-@1x.png │ │ │ ├── pirate-aspect.scaled.to.fill-60x30-@2x.png │ │ │ ├── pirate-aspect.scaled.to.fill-60x30-@3x.png │ │ │ ├── rainbow-aspect.scaled.to.fill-30x60-@1x.png │ │ │ ├── rainbow-aspect.scaled.to.fill-30x60-@2x.png │ │ │ ├── rainbow-aspect.scaled.to.fill-30x60-@3x.png │ │ │ ├── rainbow-aspect.scaled.to.fill-50x50-@1x.png │ │ │ ├── rainbow-aspect.scaled.to.fill-50x50-@2x.png │ │ │ ├── rainbow-aspect.scaled.to.fill-50x50-@3x.png │ │ │ ├── rainbow-aspect.scaled.to.fill-60x30-@1x.png │ │ │ ├── rainbow-aspect.scaled.to.fill-60x30-@2x.png │ │ │ ├── rainbow-aspect.scaled.to.fill-60x30-@3x.png │ │ │ ├── unicorn-aspect.scaled.to.fill-30x60-@1x.png │ │ │ ├── unicorn-aspect.scaled.to.fill-30x60-@2x.png │ │ │ ├── unicorn-aspect.scaled.to.fill-30x60-@3x.png │ │ │ ├── unicorn-aspect.scaled.to.fill-50x50-@1x.png │ │ │ ├── unicorn-aspect.scaled.to.fill-50x50-@2x.png │ │ │ ├── unicorn-aspect.scaled.to.fill-50x50-@3x.png │ │ │ ├── unicorn-aspect.scaled.to.fill-60x30-@1x.png │ │ │ ├── unicorn-aspect.scaled.to.fill-60x30-@2x.png │ │ │ └── unicorn-aspect.scaled.to.fill-60x30-@3x.png │ │ ├── Aspect Scaled to Fit │ │ │ ├── apple-aspect.scaled.to.fit-30x60-@1x.png │ │ │ ├── apple-aspect.scaled.to.fit-30x60-@2x.png │ │ │ ├── apple-aspect.scaled.to.fit-30x60-@3x.png │ │ │ ├── apple-aspect.scaled.to.fit-50x50-@1x.png │ │ │ ├── apple-aspect.scaled.to.fit-50x50-@2x.png │ │ │ ├── apple-aspect.scaled.to.fit-50x50-@3x.png │ │ │ ├── apple-aspect.scaled.to.fit-60x30-@1x.png │ │ │ ├── apple-aspect.scaled.to.fit-60x30-@2x.png │ │ │ ├── apple-aspect.scaled.to.fit-60x30-@3x.png │ │ │ ├── pirate-aspect.scaled.to.fit-30x60-@1x.png │ │ │ ├── pirate-aspect.scaled.to.fit-30x60-@2x.png │ │ │ ├── pirate-aspect.scaled.to.fit-30x60-@3x.png │ │ │ ├── pirate-aspect.scaled.to.fit-50x50-@1x.png │ │ │ ├── pirate-aspect.scaled.to.fit-50x50-@2x.png │ │ │ ├── pirate-aspect.scaled.to.fit-50x50-@3x.png │ │ │ ├── pirate-aspect.scaled.to.fit-60x30-@1x.png │ │ │ ├── pirate-aspect.scaled.to.fit-60x30-@2x.png │ │ │ ├── pirate-aspect.scaled.to.fit-60x30-@3x.png │ │ │ ├── rainbow-aspect.scaled.to.fit-30x60-@1x.png │ │ │ ├── rainbow-aspect.scaled.to.fit-30x60-@2x.png │ │ │ ├── rainbow-aspect.scaled.to.fit-30x60-@3x.png │ │ │ ├── rainbow-aspect.scaled.to.fit-50x50-@1x.png │ │ │ ├── rainbow-aspect.scaled.to.fit-50x50-@2x.png │ │ │ ├── rainbow-aspect.scaled.to.fit-50x50-@3x.png │ │ │ ├── rainbow-aspect.scaled.to.fit-60x30-@1x.png │ │ │ ├── rainbow-aspect.scaled.to.fit-60x30-@2x.png │ │ │ ├── rainbow-aspect.scaled.to.fit-60x30-@3x.png │ │ │ ├── unicorn-aspect.scaled.to.fit-30x60-@1x.png │ │ │ ├── unicorn-aspect.scaled.to.fit-30x60-@2x.png │ │ │ ├── unicorn-aspect.scaled.to.fit-30x60-@3x.png │ │ │ ├── unicorn-aspect.scaled.to.fit-50x50-@1x.png │ │ │ ├── unicorn-aspect.scaled.to.fit-50x50-@2x.png │ │ │ ├── unicorn-aspect.scaled.to.fit-50x50-@3x.png │ │ │ ├── unicorn-aspect.scaled.to.fit-60x30-@1x.png │ │ │ ├── unicorn-aspect.scaled.to.fit-60x30-@2x.png │ │ │ └── unicorn-aspect.scaled.to.fit-60x30-@3x.png │ │ ├── Circle │ │ │ ├── apple-circle.png │ │ │ ├── pirate-circle.png │ │ │ ├── rainbow-circle.png │ │ │ └── unicorn-circle.png │ │ ├── Core Image Filters │ │ │ ├── unicorn-blurred-8-ios-13.png │ │ │ ├── unicorn-blurred-8.png │ │ │ └── unicorn-sepia.tone.png │ │ ├── Radius │ │ │ ├── apple-radius-20.png │ │ │ ├── pirate-radius-20.png │ │ │ ├── rainbow-radius-20.png │ │ │ └── unicorn-radius-20.png │ │ ├── Scaled to Size Circle │ │ │ ├── pirate-scaled.to.size.circle-100x100-@1x.png │ │ │ ├── pirate-scaled.to.size.circle-100x100-@2x.png │ │ │ └── pirate-scaled.to.size.circle-100x100-@3x.png │ │ ├── Scaled with Rounded Corners │ │ │ ├── pirate-scaled.to.size.with.rounded.corners-100x100x20-@1x.png │ │ │ ├── pirate-scaled.to.size.with.rounded.corners-100x100x20-@2x.png │ │ │ └── pirate-scaled.to.size.with.rounded.corners-100x100x20-@3x.png │ │ └── Scaled │ │ │ ├── apple-scaled-30x60-@1x.png │ │ │ ├── apple-scaled-30x60-@2x.png │ │ │ ├── apple-scaled-30x60-@3x.png │ │ │ ├── apple-scaled-50x50-@1x.png │ │ │ ├── apple-scaled-50x50-@2x.png │ │ │ ├── apple-scaled-50x50-@3x.png │ │ │ ├── apple-scaled-60x30-@1x.png │ │ │ ├── apple-scaled-60x30-@2x.png │ │ │ ├── apple-scaled-60x30-@3x.png │ │ │ ├── pirate-scaled-30x60-@1x.png │ │ │ ├── pirate-scaled-30x60-@2x.png │ │ │ ├── pirate-scaled-30x60-@3x.png │ │ │ ├── pirate-scaled-50x50-@1x.png │ │ │ ├── pirate-scaled-50x50-@2x.png │ │ │ ├── pirate-scaled-50x50-@3x.png │ │ │ ├── pirate-scaled-60x30-@1x.png │ │ │ ├── pirate-scaled-60x30-@2x.png │ │ │ ├── pirate-scaled-60x30-@3x.png │ │ │ ├── rainbow-scaled-30x60-@1x.png │ │ │ ├── rainbow-scaled-30x60-@2x.png │ │ │ ├── rainbow-scaled-30x60-@3x.png │ │ │ ├── rainbow-scaled-50x50-@1x.png │ │ │ ├── rainbow-scaled-50x50-@2x.png │ │ │ ├── rainbow-scaled-50x50-@3x.png │ │ │ ├── rainbow-scaled-60x30-@1x.png │ │ │ ├── rainbow-scaled-60x30-@2x.png │ │ │ ├── rainbow-scaled-60x30-@3x.png │ │ │ ├── unicorn-scaled-30x60-@1x.png │ │ │ ├── unicorn-scaled-30x60-@2x.png │ │ │ ├── unicorn-scaled-30x60-@3x.png │ │ │ ├── unicorn-scaled-50x50-@1x.png │ │ │ ├── unicorn-scaled-50x50-@2x.png │ │ │ ├── unicorn-scaled-50x50-@3x.png │ │ │ ├── unicorn-scaled-60x30-@1x.png │ │ │ ├── unicorn-scaled-60x30-@2x.png │ │ │ └── unicorn-scaled-60x30-@3x.png │ └── Original Images │ │ ├── apple.jpg │ │ ├── huge_map.jpg │ │ ├── pirate.jpg │ │ ├── rainbow.jpg │ │ └── unicorn.png ├── Test Plans │ ├── iOS-NoTS.xctestplan │ ├── iOS-Old.xctestplan │ ├── iOS.xctestplan │ ├── macOS-NoTS.xctestplan │ ├── macOS.xctestplan │ ├── tvOS-NoTS.xctestplan │ ├── tvOS-Old.xctestplan │ ├── tvOS.xctestplan │ ├── visionOS.xctestplan │ ├── watchOS-NoTS.xctestplan │ └── watchOS.xctestplan ├── TestHelpers.swift ├── ThrowingURLRequestConvertible.swift ├── UIButtonTests.swift ├── UIImage+AlamofireImageTests.swift ├── UIImageTests.swift └── UIImageViewTests.swift └── docs ├── Classes.html ├── Classes ├── AutoPurgingImageCache.html ├── ImageDownloader.html ├── ImageDownloader │ └── DownloadPrioritization.html ├── ImageResponseSerializer.html └── RequestReceipt.html ├── Enums.html ├── Enums └── AFIError.html ├── Extensions.html ├── Extensions ├── AlamofireExtension.html ├── DataRequest.html ├── UIButton.html ├── UIImage.html ├── UIImageView.html └── UIImageView │ └── ImageTransition.html ├── Protocols.html ├── Protocols ├── CompositeImageFilter.html ├── CoreImageFilter.html ├── ImageCache.html ├── ImageFilter.html ├── ImageRequestCache.html ├── Roundable.html └── Sizable.html ├── Structs.html ├── Structs ├── AspectScaledToFillSizeCircleFilter.html ├── AspectScaledToFillSizeFilter.html ├── AspectScaledToFillSizeWithRoundedCornersFilter.html ├── AspectScaledToFitSizeFilter.html ├── BlurFilter.html ├── CircleFilter.html ├── DynamicCompositeImageFilter.html ├── DynamicImageFilter.html ├── RoundedCornersFilter.html ├── ScaledToSizeCircleFilter.html ├── ScaledToSizeFilter.html └── ScaledToSizeWithRoundedCornersFilter.html ├── Typealiases.html ├── _config.yml ├── badge.svg ├── css ├── highlight.css └── jazzy.css ├── docsets ├── AlamofireImage.docset │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ ├── Documents │ │ ├── Classes.html │ │ ├── Classes │ │ │ ├── AutoPurgingImageCache.html │ │ │ ├── ImageDownloader.html │ │ │ ├── ImageDownloader │ │ │ │ └── DownloadPrioritization.html │ │ │ ├── ImageResponseSerializer.html │ │ │ └── RequestReceipt.html │ │ ├── Enums.html │ │ ├── Enums │ │ │ └── AFIError.html │ │ ├── Extensions.html │ │ ├── Extensions │ │ │ ├── AlamofireExtension.html │ │ │ ├── DataRequest.html │ │ │ ├── UIButton.html │ │ │ ├── UIImage.html │ │ │ ├── UIImageView.html │ │ │ └── UIImageView │ │ │ │ └── ImageTransition.html │ │ ├── Protocols.html │ │ ├── Protocols │ │ │ ├── CompositeImageFilter.html │ │ │ ├── CoreImageFilter.html │ │ │ ├── ImageCache.html │ │ │ ├── ImageFilter.html │ │ │ ├── ImageRequestCache.html │ │ │ ├── Roundable.html │ │ │ └── Sizable.html │ │ ├── Structs.html │ │ ├── Structs │ │ │ ├── AspectScaledToFillSizeCircleFilter.html │ │ │ ├── AspectScaledToFillSizeFilter.html │ │ │ ├── AspectScaledToFillSizeWithRoundedCornersFilter.html │ │ │ ├── AspectScaledToFitSizeFilter.html │ │ │ ├── BlurFilter.html │ │ │ ├── CircleFilter.html │ │ │ ├── DynamicCompositeImageFilter.html │ │ │ ├── DynamicImageFilter.html │ │ │ ├── RoundedCornersFilter.html │ │ │ ├── ScaledToSizeCircleFilter.html │ │ │ ├── ScaledToSizeFilter.html │ │ │ └── ScaledToSizeWithRoundedCornersFilter.html │ │ ├── Typealiases.html │ │ ├── _config.yml │ │ ├── badge.svg │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ ├── img │ │ │ ├── carat.png │ │ │ ├── dash.png │ │ │ ├── gh.png │ │ │ └── spinner.gif │ │ ├── index.html │ │ ├── js │ │ │ ├── jazzy.js │ │ │ ├── jazzy.search.js │ │ │ ├── jquery.min.js │ │ │ ├── lunr.min.js │ │ │ └── typeahead.jquery.js │ │ ├── search.json │ │ └── undocumented.json │ │ └── docSet.dsidx ├── AlamofireImage.tgz └── AlamofireImage.xml ├── img ├── carat.png ├── dash.png ├── gh.png └── spinner.gif ├── index.html ├── js ├── jazzy.js ├── jazzy.search.js ├── jquery.min.js ├── lunr.min.js └── typeahead.jquery.js ├── search.json └── undocumented.json /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | > ℹ Please fill out this template when filing an issue. 2 | > All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info. 3 | > 4 | > Per our [*CONTRIBUTING guidelines](https://github.com/Alamofire/AlamofireImage/blob/master/CONTRIBUTING.md), we use GitHub for 5 | > bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag `alamofireimage`. 6 | > 7 | > Please remove this line and everything above it before submitting. 8 | 9 | * [ ] I've read, understood, and done my best to follow the [*CONTRIBUTING guidelines](https://github.com/Alamofire/AlamofireImage/blob/master/CONTRIBUTING.md). 10 | 11 | ## What did you do? 12 | 13 | ℹ Please replace this with what you did. 14 | 15 | ## What did you expect to happen? 16 | 17 | ℹ Please replace this with what you expected to happen. 18 | 19 | ## What happened instead? 20 | 21 | ℹ Please replace this with of what happened instead. 22 | 23 | ## Alamofire Environment 24 | 25 | **Alamofire version:** 26 | **Xcode version:** 27 | **Swift version:** 28 | **Platform(s) running AlamofireImage:** 29 | **macOS version running Xcode:** 30 | 31 | ## Demo Project 32 | 33 | ℹ Please link to or upload a project we can download that reproduces the issue. 34 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Issue Link :link: 2 | 3 | 4 | ### Goals :soccer: 5 | 6 | 7 | 8 | ### Implementation Details :construction: 9 | 10 | 11 | 12 | ### Testing Details :mag: 13 | 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | 6 | ## Build generated 7 | build/ 8 | DerivedData 9 | 10 | ## Various settings 11 | *.pbxuser 12 | !default.pbxuser 13 | *.mode1v3 14 | !default.mode1v3 15 | *.mode2v3 16 | !default.mode2v3 17 | *.perspectivev3 18 | !default.perspectivev3 19 | xcuserdata 20 | 21 | ## Other 22 | *.xccheckout 23 | *.moved-aside 24 | *.xcuserstate 25 | *.xcscmblueprint 26 | 27 | ## Obj-C/Swift specific 28 | *.hmap 29 | *.ipa 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | .build/ 37 | 38 | # Carthage 39 | Carthage 40 | -------------------------------------------------------------------------------- /.jazzy.yaml: -------------------------------------------------------------------------------- 1 | author: Alamofire Software Foundation 2 | author_url: http://alamofire.org/ 3 | github_url: https://github.com/Alamofire/AlamofireImage 4 | root_url: https://alamofire.github.io/AlamofireImage/ 5 | module: AlamofireImage 6 | output: docs 7 | theme: fullwidth 8 | xcodebuild_arguments: [-workspace, 'AlamofireImage.xcworkspace', -scheme, 'AlamofireImage iOS'] 9 | -------------------------------------------------------------------------------- /.ruby-gemset: -------------------------------------------------------------------------------- 1 | Alamofire 2 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.2.2 2 | -------------------------------------------------------------------------------- /.swiftformat: -------------------------------------------------------------------------------- 1 | # file options 2 | 3 | --exclude Carthage 4 | --symlinks ignore 5 | --swiftversion 5.5 6 | 7 | # rules 8 | --enable isEmpty 9 | --disable andOperator 10 | --disable wrapMultilineStatementBraces 11 | 12 | # format options 13 | 14 | --commas inline 15 | --comments indent 16 | --decimalgrouping 3,5 17 | --exponentcase lowercase 18 | --exponentgrouping disabled 19 | --extensionacl on-declarations 20 | --fractiongrouping disabled 21 | --ifdef no-indent 22 | --importgrouping testable-top 23 | --operatorfunc no-space 24 | --nospaceoperators ..<, ... 25 | --selfrequired validate 26 | --stripunusedargs closure-only 27 | --wraparguments preserve 28 | --wrapcollections preserve 29 | --wrapparameters preserve 30 | -------------------------------------------------------------------------------- /AlamofireImage.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'AlamofireImage' 3 | s.version = '4.3.0' 4 | s.license = 'MIT' 5 | s.summary = 'AlamofireImage is an image component library for Alamofire' 6 | s.homepage = 'https://github.com/Alamofire/AlamofireImage' 7 | s.social_media_url = 'http://twitter.com/AlamofireSF' 8 | s.authors = { 'Alamofire Software Foundation' => 'info@alamofire.org' } 9 | s.documentation_url = 'https://alamofire.github.io/AlamofireImage/' 10 | 11 | s.source = { :git => 'https://github.com/Alamofire/AlamofireImage.git', :tag => s.version } 12 | s.source_files = 'Source/*.swift' 13 | 14 | s.swift_versions = ['5'] 15 | s.ios.deployment_target = '10.0' 16 | s.osx.deployment_target = '10.12' 17 | s.tvos.deployment_target = '10.0' 18 | s.watchos.deployment_target = '3.0' 19 | 20 | s.dependency 'Alamofire', '~> 5.8' 21 | end 22 | -------------------------------------------------------------------------------- /AlamofireImage.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AlamofireImage.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AlamofireImage.xcodeproj/xcshareddata/xcschemes/AlamofireImage iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 47 | 48 | 54 | 55 | 56 | 57 | 61 | 62 | 66 | 67 | 68 | 69 | 75 | 76 | 77 | 78 | 81 | 82 | 84 | 85 | 87 | 88 | 89 | 90 | 92 | 98 | 99 | 100 | 101 | 102 | 112 | 113 | 119 | 120 | 121 | 122 | 128 | 129 | 135 | 136 | 137 | 138 | 140 | 141 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /AlamofireImage.xcodeproj/xcshareddata/xcschemes/AlamofireImage macOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 47 | 48 | 54 | 55 | 56 | 57 | 61 | 62 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | 82 | 84 | 90 | 91 | 92 | 93 | 94 | 104 | 105 | 111 | 112 | 113 | 114 | 120 | 121 | 127 | 128 | 129 | 130 | 132 | 133 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /AlamofireImage.xcodeproj/xcshareddata/xcschemes/AlamofireImage tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 47 | 48 | 54 | 55 | 56 | 57 | 61 | 62 | 66 | 67 | 68 | 69 | 75 | 76 | 77 | 78 | 81 | 82 | 84 | 85 | 87 | 88 | 89 | 90 | 92 | 98 | 99 | 100 | 101 | 102 | 112 | 113 | 119 | 120 | 121 | 122 | 128 | 129 | 135 | 136 | 137 | 138 | 140 | 141 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /AlamofireImage.xcodeproj/xcshareddata/xcschemes/AlamofireImage visionOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 34 | 35 | 36 | 37 | 47 | 48 | 54 | 55 | 61 | 62 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /AlamofireImage.xcodeproj/xcshareddata/xcschemes/AlamofireImage watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 34 | 35 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 69 | 70 | 71 | 72 | 78 | 79 | 85 | 86 | 87 | 88 | 90 | 91 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /AlamofireImage.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /AlamofireImage.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AlamofireImage.xcworkspace/xcshareddata/AlamofireImage.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "D2AD29AE1B693121D0EDBB4855C96B75ECBB0D86", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "67620B5EFA902936DF04070AF595B76AB0333747" : 0, 8 | "D2AD29AE1B693121D0EDBB4855C96B75ECBB0D86" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "7F9607B6-9202-46E7-BEBE-95D4C2A36284", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "67620B5EFA902936DF04070AF595B76AB0333747" : "AlamofireImage\/Carthage\/Checkouts\/Alamofire\/", 13 | "D2AD29AE1B693121D0EDBB4855C96B75ECBB0D86" : "AlamofireImage\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "AlamofireImage", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "AlamofireImage.xcworkspace", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/Alamofire\/Alamofire.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "67620B5EFA902936DF04070AF595B76AB0333747" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:cnoon\/AlamofireImage.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "D2AD29AE1B693121D0EDBB4855C96B75ECBB0D86" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /AlamofireImage.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AlamofireImage.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | This document contains information and guidelines about contributing to this project. 4 | Please read it before you start participating. 5 | 6 | **Topics** 7 | 8 | * [Asking Questions](#asking-questions) 9 | * [Reporting Security Issues](#reporting-security-issues) 10 | * [Reporting Issues](#reporting-other-issues) 11 | * [Developers Certificate of Origin](#developers-certificate-of-origin) 12 | * [Code of Conduct](#code-of-conduct) 13 | 14 | ## Asking Questions 15 | 16 | We don't use GitHub as a support forum. 17 | For any usage questions that are not specific to the project itself, 18 | please ask on [Stack Overflow](https://stackoverflow.com) instead. 19 | By doing so, you'll be more likely to quickly solve your problem, 20 | and you'll allow anyone else with the same question to find the answer. 21 | This also allows maintainers to focus on improving the project for others. 22 | 23 | ## Reporting Security Issues 24 | 25 | The Alamofire Software Foundation takes security seriously. 26 | If you discover a security issue, please bring it to our attention right away! 27 | 28 | Please **DO NOT** file a public issue, 29 | instead send your report privately to . 30 | This will help ensure that any vulnerabilities that _are_ found 31 | can be [disclosed responsibly](http://en.wikipedia.org/wiki/Responsible_disclosure) 32 | to any affected parties. 33 | 34 | ## Reporting Other Issues 35 | 36 | A great way to contribute to the project 37 | is to send a detailed issue when you encounter an problem. 38 | We always appreciate a well-written, thorough bug report. 39 | 40 | Check that the project issues database 41 | doesn't already include that problem or suggestion before submitting an issue. 42 | If you find a match, add a quick "+1" or "I have this problem too." 43 | Doing this helps prioritize the most common problems and requests. 44 | 45 | When reporting issues, please include the following: 46 | 47 | * The version of Xcode you're using 48 | * The version of iOS or macOS you're targeting 49 | * The full output of any stack trace or compiler error 50 | * A code snippet that reproduces the described behavior, if applicable 51 | * Any other details that would be useful in understanding the problem 52 | 53 | This information will help us review and fix your issue faster. 54 | 55 | ## Developer's Certificate of Origin 1.1 56 | 57 | By making a contribution to this project, I certify that: 58 | 59 | - (a) The contribution was created in whole or in part by me and I 60 | have the right to submit it under the open source license 61 | indicated in the file; or 62 | 63 | - (b) The contribution is based upon previous work that, to the best 64 | of my knowledge, is covered under an appropriate open source 65 | license and I have the right under that license to submit that 66 | work with modifications, whether created in whole or in part 67 | by me, under the same open source license (unless I am 68 | permitted to submit under a different license), as indicated 69 | in the file; or 70 | 71 | - (c) The contribution was provided directly to me by some other 72 | person who certified (a), (b) or (c) and I have not modified 73 | it. 74 | 75 | - (d) I understand and agree that this project and the contribution 76 | are public and that a record of the contribution (including all 77 | personal information I submit with it, including my sign-off) is 78 | maintained indefinitely and may be redistributed consistent with 79 | this project or the open source license(s) involved. 80 | 81 | ## Code of Conduct 82 | 83 | The Code of Conduct governs how we behave in public or in private 84 | whenever the project will be judged by our actions. 85 | We expect it to be honored by everyone who contributes to this project. 86 | 87 | See [CONDUCT.md](https://github.com/Alamofire/Foundation/blob/master/CONDUCT.md) for details. 88 | 89 | --- 90 | 91 | *Some of the ideas and wording for the statements above were based on work by the [Docker](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) and [Linux](http://elinux.org/Developer_Certificate_Of_Origin) communities. We commend them for their efforts to facilitate collaboration in their projects.* 92 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "Alamofire/Alamofire" ~> 5.8 2 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "Alamofire/Alamofire" "5.8.0" 2 | -------------------------------------------------------------------------------- /Documentation/AlamofireImage 2.0 Migration Guide.md: -------------------------------------------------------------------------------- 1 | # AlamofireImage 2.0 Migration Guide 2 | 3 | AlamofireImage 2.0 is the latest major release of AlamofireImage, an image component library for Alamofire supporting iOS, Mac OS X and watchOS written in Swift. As a major release, following Semantic Versioning conventions, 2.0 introduces several API-breaking changes that one should be aware of. 4 | 5 | This guide is provided in order to ease the transition of existing applications using Alamofire 2.x to the latest APIs, as well as explain the design and structure of new and changed functionality. 6 | 7 | ## Requirements 8 | 9 | AlamofireImage 2.0 officially supports iOS 8+, Mac OS X 10.9+, watchOS 2.0, Xcode 7 and Swift 2.0. 10 | 11 | ## Reasons for Bumping to 2.0 12 | 13 | The [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) (ASF) tries to do everything possible to avoid MAJOR version bumps. We realize the challenges involved with migrating large projects from one MAJOR version to another. The reason for bumping to 2.0 is due to the Alamofire 3.0 changes. We want to keep both libraries in sync, which requires changes to the foundational classes of AlamofireImage. The changes made to Alamofire give us more flexibility moving forward to help avoid the need for MAJOR version bumps to maintain backwards compatibility. 14 | 15 | ## Benefits of Upgrading 16 | 17 | The benefits of upgrading can be summarized as follows: 18 | 19 | * Can be used in conjunction with Alamofire 3.0 20 | * Leverages generic `Response` types for all `Request` completion closures. 21 | * Image download request cancellation logic is now much more intelligent thanks to the new `RequestReceipt` struct allowing MUCH better optimization for table and collection view use cases. 22 | 23 | --- 24 | 25 | ## Breaking API Changes 26 | 27 | AlamofireImage 2.0 contains some breaking API changes to the foundational classes supporting the response serialization system. It is important to understand how these changes affect the common usage patterns. 28 | 29 | ### Request Extension 30 | 31 | The `Request` extension has been modified to support the Alamofire 3.0 `ResponseSerializer` changes. All `responseImage` methods now use a `completionHandler` of type `Response -> Void` matching all response serializers located in the Alamofire core library. 32 | 33 | ```swift 34 | public func responseImage( 35 | imageScale: CGFloat = Request.imageScale, 36 | inflateResponseImage: Bool = true, 37 | completionHandler: Response -> Void) 38 | -> Self 39 | { 40 | return response( 41 | responseSerializer: Request.imageResponseSerializer( 42 | imageScale: imageScale, 43 | inflateResponseImage: inflateResponseImage 44 | ), 45 | completionHandler: completionHandler 46 | ) 47 | } 48 | ``` 49 | 50 | > There are no actual changes in functionality in terms of the `responseImage` serializers. 51 | 52 | ### Image Downloader 53 | 54 | #### Completion Handler 55 | 56 | The `CompletionHandler` typealias in the `ImageDownloader` has been modified to a `Response` type to match the Alamofire 3.0 APIs. 57 | 58 | ```swift 59 | public class ImageDownloader { 60 | public typealias CompletionHandler = Response -> Void 61 | } 62 | ``` 63 | 64 | #### Request Receipts 65 | 66 | The `downloadImage` APIs now return a `RequestReceipt?` instead of a `Request?`. The main reason for this change was to allow the `ImageDownloader` to be more intelligent about cancelling active requests. Here are some of the questions we asked ourselves when designing this new system: 67 | 68 | Should a download request be cancelled... 69 | 70 | * If it is pending in the queue? 71 | * `YES` 72 | * If it is actively being downloaded? 73 | * `NO` - The completion handler should be called with a cancellation error while the request is allowed to complete. 74 | * If there are multiple response handlers attached to the same request? 75 | * `NO` - The completion handler should be called with a cancellation error while the request is allowed to complete since the other callers also depend on the same request. 76 | 77 | In order to be able to support the third case, the `ImageDownloader` needed a way to identify multiple response handlers attached to a single `Request`. The `RequestReceipt` solves this problem by associating a `receiptID` with each download request. Each call to `downloadImage` generates a new, unique `receiptID` which can in turn be used to cancel a request. 78 | 79 | ```swift 80 | public class RequestReceipt { 81 | public let request: Request 82 | public let receiptID: String 83 | } 84 | ``` 85 | 86 | The `cancelRequestForRequestReceipt` method on the `ImageDownloader` handles all three cancellation cases internally. By always cancelling requests using the `RequestReceipt` APIs, your download requests will much better optimized for table and collection view use cases. 87 | 88 | 89 | ### UIImageView Extension 90 | 91 | The only changes to the `UIImageView` extension in terms of backwards compatibility is the `completion` closure signature that now leverages the new Alamofire 3.0 `Response` type. 92 | 93 | ```swift 94 | public func af_setImageWithURLRequest( 95 | URLRequest: URLRequestConvertible, 96 | placeholderImage: UIImage?, 97 | filter: ImageFilter?, 98 | imageTransition: ImageTransition, 99 | completion: (Response -> Void)?) 100 | { 101 | ... 102 | } 103 | ``` 104 | 105 | Another change worth noting is the `UIImageView` extension now leverages `RequestReceipt` objects for cancelling the active request. This greatly improves overall performance and behavior for image views used in table and collection views. 106 | -------------------------------------------------------------------------------- /Documentation/AlamofireImage 3.0 Migration Guide.md: -------------------------------------------------------------------------------- 1 | # AlamofireImage 3.0 Migration Guide 2 | 3 | AlamofireImage 3.0 is the latest major release of AlamofireImage, an image component library for Alamofire supporting iOS, tvOS, macOS and watchOS written in Swift. As a major release, following Semantic Versioning conventions, 3.0 introduces several API-breaking changes that one should be aware of. 4 | 5 | This guide is provided in order to ease the transition of existing applications using AlamofireImage 2.x to the latest APIs, as well as explain the design and structure of new and changed functionality. 6 | 7 | ## Requirements 8 | 9 | - iOS 8.0+, macOS 10.10+, tvOS 9.0+, watchOS 2.0+ 10 | - Xcode 8.0+ 11 | - Swift 3.0+ 12 | 13 | For those of you that would like to use AlamofireImage with Swift 2.2 or 2.3, please use the latest tagged 2.x release. 14 | 15 | ## Benefits of Upgrading 16 | 17 | The benefits of upgrading can be summarized as follows: 18 | 19 | - **Alamofire 4 Compatibility** 20 | - **Complete Swift 3 Compatibility:** includes the full adoption of the new [API Design Guidelines](https://swift.org/documentation/api-design-guidelines/). 21 | - **New Error System:** uses a new `AFIError` type to adhere to the new pattern proposed in [SE-0112](https://github.com/apple/swift-evolution/blob/master/proposals/0112-nserror-bridging.md). 22 | 23 | --- 24 | 25 | ## Breaking API Changes 26 | 27 | AlamofireImage 3 has fully adopted the new Swift 3 changes and conventions, including the new [API Design Guidelines](https://swift.org/documentation/api-design-guidelines/). Because of this, almost every API in AlamofireImage has been modified in some way. We can't possibly document every single change, so we're going to attempt to identify the most common APIs and how they have changed to help you through those sometimes less than helpful compiler errors. If you're interested in the underlying Alamofire 4 changes, check out the [migration guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md). 28 | 29 | ### Requests 30 | 31 | ```swift 32 | // AlamofireImage 2 33 | Alamofire.request(.GET, "https://httpbin.org/image/png").responseImage { response in 34 | if let image = response.result.value { 35 | print("image downloaded: \(image)") 36 | } 37 | } 38 | 39 | // AlamofireImage 3 40 | Alamofire.request("https://httpbin.org/image/png").responseImage { response in 41 | if let image = response.result.value { 42 | print("image downloaded: \(image)") 43 | } 44 | } 45 | ``` 46 | 47 | ### UIImage and UIImageView Extensions 48 | 49 | The `UIImage` and `UIImageView` extensions have undergone extensive renaming. 50 | 51 | #### Loading an Image 52 | 53 | ```swift 54 | // AlamofireImage 2 55 | imageView.af_setImageWithURL( 56 | URL, 57 | placeholderImage: placeholderImage, 58 | filter: filter 59 | ) 60 | 61 | // AlamofireImage 3 62 | imageView.af_setImage( 63 | withURL: url, 64 | placeholderImage: placeholderImage, 65 | filter: filter 66 | ) 67 | ``` 68 | 69 | #### Loading an Image with Placeholder, Filter and Transition 70 | 71 | ```swift 72 | // AlamofireImage 2 73 | imageView.af_setImageWithURL( 74 | URL, 75 | placeholderImage: placeholderImage, 76 | filter: filter, 77 | imageTransition: .CrossDissolve(0.2) 78 | ) 79 | 80 | // AlamofireImage 3 81 | imageView.af_setImage( 82 | withURL: url, 83 | placeholderImage: placeholderImage, 84 | filter: filter, 85 | imageTransition: .crossDissolve(0.2) 86 | ) 87 | ``` 88 | 89 | ### Image Cache 90 | 91 | #### Getting an Image 92 | 93 | ```swift 94 | // AlamofireImage 2 95 | let cachedAvatar = imageCache.imageWithIdentifier("avatar") 96 | 97 | // AlamofireImage 3 98 | let cachedAvatar = imageCache.image(withIdentifier: "avatar") 99 | ``` 100 | 101 | #### Adding an Image 102 | 103 | ```swift 104 | // AlamofireImage 2 105 | imageCache.addImage(avatarImage, withIdentifier: "avatar") 106 | 107 | // AlamofireImage 3 108 | imageCache.add(avatarImage, withIdentifier: "avatar") 109 | 110 | // With an Additional Identifier 111 | 112 | // AlamofireImage 2 113 | imageCache.addImage(avatarImage, forRequest: urlRequest, withAdditionalIdentifier: "circle") 114 | 115 | // AlamofireImage 3 116 | imageCache.add(avatarImage, for: urlRequest, withIdentifier: "circle") 117 | ``` 118 | 119 | #### Removing an Image 120 | 121 | ```swift 122 | // AlamofireImage 2 123 | imageCache.removeImageWithIdentifier("avatar") 124 | 125 | // AlamofireImage 3 126 | imageCache.removeImage(withIdentifier: "avatar") 127 | 128 | // With an Additional Identifier 129 | 130 | // AlamofireImage 2 131 | imageCache.removeImageForRequest(urlRequest, withAdditionalIdentifier: "circle") 132 | 133 | // AlamofireImage 3 134 | imageCache.removeImage(for: urlRequest, withIdentifier: "circle") 135 | ``` 136 | -------------------------------------------------------------------------------- /Documentation/AlamofireImage 4.0 Migration Guide.md: -------------------------------------------------------------------------------- 1 | # AlamofireImage 4.0 Migration Guide 2 | 3 | AlamofireImage 4.0 is the latest major release of AlamofireImage, an image component library for Alamofire supporting iOS, tvOS, macOS and watchOS written in Swift. As a major release, following Semantic Versioning conventions, 4.0 introduces several API-breaking changes that one should be aware of. 4 | 5 | This guide is provided in order to ease the transition of existing applications using AlamofireImage 3.x to the latest APIs. 6 | 7 | ## Requirements 8 | 9 | - iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+ 10 | - Xcode 10.2+ 11 | - Swift 5+ 12 | 13 | ## Benefits of Upgrading 14 | 15 | The benefits of upgrading can be summarized as follows: 16 | 17 | - **Alamofire 5 Compatibility** 18 | - **Swift API Extensions:** includes more Swifty API conventions for extensions on `UIImage`, `UIImageView`, and `UIButton`. 19 | - **Better Control Over Image Scale and Inflation:** added new API for controlling image scale and inflation through the `ImageResponseSerializer` per image download. 20 | 21 | --- 22 | 23 | ## Breaking API Changes 24 | 25 | AlamofireImage 4 has **NO BREAKING CHANGES** with the exception of a few small refactored types from Alamofire 5. The following sections break down the changes. 26 | 27 | ### Prefixed APIs 28 | 29 | New `UIImage`, `UIImageView`, and `UIButton` extension APIs have been added to replace the `af_` convention with the more Swifty `af.` alternative. As such, here are a few simple examples. 30 | 31 | **UIImage** 32 | 33 | ```swift 34 | let size = CGSize(width: 100.0, height: 100.0) 35 | 36 | // AlamofireImage 3 37 | let scaledImage = image.af_imageScaled(to: size) 38 | 39 | // AlamofireImage 4 40 | let scaledImage = image.af.imageScaled(to: size) 41 | ``` 42 | 43 | **UIImageView** 44 | 45 | ```swift 46 | let imageView = UIImageView(frame: frame) 47 | let url = URL(string: "https://httpbin.org/image/png")! 48 | 49 | // AlamofireImage 3 50 | imageView.af_setImage(withURL: url) 51 | 52 | // AlamofireImage 4 53 | imageView.af.setImage(withURL: url) 54 | ``` 55 | 56 | **UIButton** 57 | 58 | ```swift 59 | let button = UIButton(frame: frame) 60 | let url = URL(string: "https://httpbin.org/image/png")! 61 | 62 | // AlamofireImage 3 63 | button.af_setImage(for: .normal, url: url) 64 | 65 | // AlamofireImage 4 66 | button.af.setImage(for: .normal, url: url) 67 | ``` 68 | 69 | ### ImageDownloader 70 | 71 | The `ImageDownloader`'s `sessionManager` property has been refactored to align with AF5. 72 | 73 | ```swift 74 | let button = UIButton(frame: frame) 75 | let url = URL(string: "https://httpbin.org/image/png")! 76 | 77 | // AlamofireImage 3 78 | public class ImageDownloader { 79 | public let sessionManager: SessionManager 80 | ... 81 | } 82 | 83 | // AlamofireImage 4 84 | public class ImageDownloader { 85 | public let session: Session 86 | ... 87 | } 88 | ``` 89 | 90 | ## Behavioral Changes 91 | 92 | ### Image Download Cancellation 93 | 94 | Cancelling an image download used to allow the image download to continue in the background if it had already started. 95 | Due to this being misleading to the user, and also have threading implications with some new AF5 functionality, cancelling an image download now cancels the image download even if it has already started. 96 | 97 | ### Custom Cache Keys 98 | 99 | AFI 4 now fully supports custom cache keys when downloading images through the `ImageDownloader`, `UIImageView`, and `UIButton`. All you need to do to use it is to provide any custom identifier as the cache key when requesting the download. It will then use that custom cache key as the unique identifier for the cache storage. Just make sure to use the same cache key the next time you request the image, or you'll end up redownloading it. 100 | 101 | ### Custom Image Scale and Inflation Preferences Per Image Download 102 | 103 | In AFI4, you can now set a custom `ImageResponseSerializer` for each image download whether you're using `ImageDownloader`, `UIImageView` or `UIButton`. 104 | This can be really handy when you have a certain `UIImageView` that you need to disable image inflation for because the user could provide a massive image. 105 | We still recommend using an alternative method to displaying giant images to avoid your app getting terminated due to being out-of-memory. 106 | -------------------------------------------------------------------------------- /Example/Resources/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 22 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Example/Resources/Images.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" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /Example/Resources/Images.xcassets/Placeholder Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Placeholder Image.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Placeholder Image@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Placeholder Image@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Resources/Images.xcassets/Placeholder Image.imageset/Placeholder Image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Example/Resources/Images.xcassets/Placeholder Image.imageset/Placeholder Image.png -------------------------------------------------------------------------------- /Example/Resources/Images.xcassets/Placeholder Image.imageset/Placeholder Image@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Example/Resources/Images.xcassets/Placeholder Image.imageset/Placeholder Image@2x.png -------------------------------------------------------------------------------- /Example/Resources/Images.xcassets/Placeholder Image.imageset/Placeholder Image@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Example/Resources/Images.xcassets/Placeholder Image.imageset/Placeholder Image@3x.png -------------------------------------------------------------------------------- /Example/Source/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | import UIKit 27 | 28 | @main 29 | class AppDelegate: UIResponder, UIApplicationDelegate { 30 | var window: UIWindow? 31 | #if swift(>=4.2) 32 | typealias OptionsKey = UIApplication.LaunchOptionsKey 33 | #else 34 | typealias OptionsKey = UIApplicationLaunchOptionsKey 35 | #endif 36 | 37 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [OptionsKey: Any]? = nil) -> Bool { 38 | window = { 39 | let window = UIWindow(frame: UIScreen.main.bounds) 40 | 41 | window.rootViewController = UINavigationController(rootViewController: ImagesViewController()) 42 | window.backgroundColor = UIColor.white 43 | window.makeKeyAndVisible() 44 | 45 | return window 46 | }() 47 | 48 | return true 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Source/Gravatar.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Gravatar.swift 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | import UIKit 27 | 28 | extension String { 29 | fileprivate var md5Hash: String { 30 | let trimmedString = lowercased().trimmingCharacters(in: .whitespaces) 31 | let utf8String = trimmedString.cString(using: .utf8)! 32 | let stringLength = CC_LONG(trimmedString.lengthOfBytes(using: .utf8)) 33 | let digestLength = Int(CC_MD5_DIGEST_LENGTH) 34 | let result = UnsafeMutablePointer.allocate(capacity: digestLength) 35 | 36 | CC_MD5(utf8String, stringLength, result) 37 | 38 | var hash = "" 39 | 40 | for i in 0.. URL { 102 | let url = Gravatar.baseURL.appendingPathComponent(email.md5Hash) 103 | var components = URLComponents(url: url, resolvingAgainstBaseURL: false)! 104 | 105 | var queryItems = [defaultImage.queryItem, rating.queryItem] 106 | if forceDefault { 107 | queryItems.append(URLQueryItem(name: "f", value: "y")) 108 | } 109 | queryItems.append(URLQueryItem(name: "s", value: String(format: "%.0f", size * scale))) 110 | 111 | components.queryItems = queryItems 112 | 113 | return components.url! 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /Example/Source/ImageCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageCell.swift 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Alamofire 26 | import AlamofireImage 27 | import Foundation 28 | import UIKit 29 | 30 | class ImageCell: UICollectionViewCell { 31 | class var ReuseIdentifier: String { "org.alamofire.identifier.\(type(of: self))" } 32 | let imageView: UIImageView 33 | 34 | // MARK: - Initialization 35 | 36 | override init(frame: CGRect) { 37 | imageView = { 38 | let imageView = UIImageView(frame: frame) 39 | 40 | imageView.autoresizingMask = [.flexibleWidth, .flexibleHeight] 41 | imageView.contentMode = .center 42 | imageView.clipsToBounds = true 43 | 44 | return imageView 45 | }() 46 | 47 | super.init(frame: frame) 48 | 49 | contentView.addSubview(imageView) 50 | 51 | imageView.frame = contentView.bounds 52 | } 53 | 54 | @available(*, unavailable) 55 | required init(coder aDecoder: NSCoder) { 56 | fatalError("init(coder:) has not been implemented") 57 | } 58 | 59 | // MARK: - Lifecycle Methods 60 | 61 | func configureCell(with urlString: String, placeholderImage: UIImage) { 62 | let size = imageView.frame.size 63 | 64 | imageView.af_setImage(withURL: URL(string: urlString)!, 65 | placeholderImage: placeholderImage, 66 | filter: AspectScaledToFillSizeWithRoundedCornersFilter(size: size, radius: 20.0), 67 | imageTransition: .crossDissolve(0.3)) 68 | } 69 | 70 | override func prepareForReuse() { 71 | super.prepareForReuse() 72 | 73 | imageView.af_cancelImageRequest() 74 | imageView.image = nil 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Example/Source/ImageViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageViewController.swift 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import AlamofireImage 26 | import Foundation 27 | import UIKit 28 | 29 | class ImageViewController: UIViewController { 30 | var gravatar: Gravatar! 31 | var imageView: UIImageView! 32 | 33 | // MARK: - View Lifecycle 34 | 35 | override func viewDidLoad() { 36 | super.viewDidLoad() 37 | 38 | setUpInstanceProperties() 39 | setUpImageView() 40 | } 41 | 42 | // MARK: - Private - Setup Methods 43 | 44 | private func setUpInstanceProperties() { 45 | title = gravatar.email 46 | edgesForExtendedLayout = UIRectEdge() 47 | view.backgroundColor = UIColor(white: 0.9, alpha: 1.0) 48 | } 49 | 50 | private func setUpImageView() { 51 | imageView = UIImageView() 52 | imageView.contentMode = .scaleAspectFit 53 | 54 | let URL = gravatar.url(size: view.bounds.size.width) 55 | 56 | imageView.af_setImage(withURL: URL, 57 | placeholderImage: nil, 58 | filter: CircleFilter(), 59 | imageTransition: .flipFromBottom(0.5)) 60 | 61 | view.addSubview(imageView) 62 | 63 | imageView.frame = view.bounds 64 | imageView.autoresizingMask = [.flexibleWidth, .flexibleHeight] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Example/Source/ImagesViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImagesViewController.swift 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Alamofire 26 | import AlamofireImage 27 | import Foundation 28 | import UIKit 29 | 30 | class ImagesViewController: UIViewController { 31 | lazy var gravatars: [Gravatar] = [] 32 | 33 | lazy var placeholderImage: UIImage = { 34 | let image = UIImage(named: "Placeholder Image")! 35 | return image 36 | }() 37 | 38 | var collectionView: UICollectionView! 39 | 40 | // MARK: View Lifecycle 41 | 42 | override func viewDidLoad() { 43 | super.viewDidLoad() 44 | 45 | setUpInstanceProperties() 46 | setUpCollectionView() 47 | } 48 | 49 | // MARK: Private - Setup 50 | 51 | private func setUpInstanceProperties() { 52 | title = "Random Images" 53 | 54 | for _ in 1...1000 { 55 | let gravatar = Gravatar(emailAddress: UUID().uuidString, 56 | defaultImage: Gravatar.DefaultImage.identicon, 57 | forceDefault: true) 58 | 59 | gravatars.append(gravatar) 60 | } 61 | } 62 | 63 | private func setUpCollectionView() { 64 | collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: UICollectionViewFlowLayout()) 65 | collectionView.backgroundColor = UIColor.white 66 | 67 | collectionView.delegate = self 68 | collectionView.dataSource = self 69 | 70 | collectionView.register(ImageCell.self, forCellWithReuseIdentifier: ImageCell.ReuseIdentifier) 71 | 72 | view.addSubview(collectionView) 73 | 74 | collectionView.frame = view.bounds 75 | collectionView.autoresizingMask = [.flexibleWidth, .flexibleHeight] 76 | } 77 | 78 | fileprivate func sizeForCollectionViewItem() -> CGSize { 79 | let viewWidth = view.bounds.size.width 80 | 81 | var cellWidth = (viewWidth - 4 * 8) / 3.0 82 | 83 | if UIDevice.current.userInterfaceIdiom == .pad { 84 | cellWidth = (viewWidth - 7 * 8) / 6.0 85 | } 86 | 87 | return CGSize(width: cellWidth, height: cellWidth) 88 | } 89 | } 90 | 91 | // MARK: - UICollectionViewDataSource 92 | 93 | extension ImagesViewController: UICollectionViewDataSource { 94 | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 95 | gravatars.count 96 | } 97 | 98 | func collectionView(_ collectionView: UICollectionView, 99 | cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 100 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: ImageCell.ReuseIdentifier, 101 | for: indexPath) as! ImageCell 102 | 103 | let gravatar = gravatars[indexPath.row] 104 | 105 | cell.configureCell(with: gravatar.url(size: sizeForCollectionViewItem().width).absoluteString, 106 | placeholderImage: placeholderImage) 107 | 108 | return cell 109 | } 110 | } 111 | 112 | // MARK: - UICollectionViewDelegateFlowLayout 113 | 114 | extension ImagesViewController: UICollectionViewDelegateFlowLayout { 115 | func collectionView(_ collectionView: UICollectionView, 116 | layout collectionViewLayout: UICollectionViewLayout, 117 | sizeForItemAt indexPath: IndexPath) -> CGSize { 118 | sizeForCollectionViewItem() 119 | } 120 | 121 | func collectionView(_ collectionView: UICollectionView, 122 | layout collectionViewLayout: UICollectionViewLayout, 123 | insetForSectionAt section: Int) -> UIEdgeInsets { 124 | UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8) 125 | } 126 | 127 | func collectionView(_ collectionView: UICollectionView, 128 | layout collectionViewLayout: UICollectionViewLayout, 129 | minimumLineSpacingForSectionAt section: Int) -> CGFloat { 130 | 8.0 131 | } 132 | 133 | func collectionView(_ collectionView: UICollectionView, 134 | layout collectionViewLayout: UICollectionViewLayout, 135 | minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { 136 | 8.0 137 | } 138 | } 139 | 140 | // MARK: - UICollectionViewDelegate 141 | 142 | extension ImagesViewController: UICollectionViewDelegate { 143 | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { 144 | let gravatar = gravatars[(indexPath as NSIndexPath).row] 145 | 146 | let imageViewController = ImageViewController() 147 | imageViewController.gravatar = gravatar 148 | 149 | navigationController?.pushViewController(imageViewController, animated: true) 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /Example/Supporting Files/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 | AFImage 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | UIInterfaceOrientationPortraitUpsideDown 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/Supporting Files/iOS-Example-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // iOS-Example-Bridging-Header.h 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import 26 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "cocoapods" 4 | gem "jazzy" 5 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.6) 5 | rexml 6 | activesupport (7.0.8) 7 | concurrent-ruby (~> 1.0, >= 1.0.2) 8 | i18n (>= 1.6, < 2) 9 | minitest (>= 5.1) 10 | tzinfo (~> 2.0) 11 | addressable (2.8.5) 12 | public_suffix (>= 2.0.2, < 6.0) 13 | algoliasearch (1.27.5) 14 | httpclient (~> 2.8, >= 2.8.3) 15 | json (>= 1.5.1) 16 | atomos (0.1.3) 17 | claide (1.1.0) 18 | cocoapods (1.12.1) 19 | addressable (~> 2.8) 20 | claide (>= 1.0.2, < 2.0) 21 | cocoapods-core (= 1.12.1) 22 | cocoapods-deintegrate (>= 1.0.3, < 2.0) 23 | cocoapods-downloader (>= 1.6.0, < 2.0) 24 | cocoapods-plugins (>= 1.0.0, < 2.0) 25 | cocoapods-search (>= 1.0.0, < 2.0) 26 | cocoapods-trunk (>= 1.6.0, < 2.0) 27 | cocoapods-try (>= 1.1.0, < 2.0) 28 | colored2 (~> 3.1) 29 | escape (~> 0.0.4) 30 | fourflusher (>= 2.3.0, < 3.0) 31 | gh_inspector (~> 1.0) 32 | molinillo (~> 0.8.0) 33 | nap (~> 1.0) 34 | ruby-macho (>= 2.3.0, < 3.0) 35 | xcodeproj (>= 1.21.0, < 2.0) 36 | cocoapods-core (1.12.1) 37 | activesupport (>= 5.0, < 8) 38 | addressable (~> 2.8) 39 | algoliasearch (~> 1.0) 40 | concurrent-ruby (~> 1.1) 41 | fuzzy_match (~> 2.0.4) 42 | nap (~> 1.0) 43 | netrc (~> 0.11) 44 | public_suffix (~> 4.0) 45 | typhoeus (~> 1.0) 46 | cocoapods-deintegrate (1.0.5) 47 | cocoapods-downloader (1.6.3) 48 | cocoapods-plugins (1.0.0) 49 | nap 50 | cocoapods-search (1.0.1) 51 | cocoapods-trunk (1.6.0) 52 | nap (>= 0.8, < 2.0) 53 | netrc (~> 0.11) 54 | cocoapods-try (1.2.0) 55 | colored2 (3.1.2) 56 | concurrent-ruby (1.2.2) 57 | escape (0.0.4) 58 | ethon (0.16.0) 59 | ffi (>= 1.15.0) 60 | ffi (1.15.5) 61 | fourflusher (2.3.1) 62 | fuzzy_match (2.0.4) 63 | gh_inspector (1.1.3) 64 | httpclient (2.8.3) 65 | i18n (1.14.1) 66 | concurrent-ruby (~> 1.0) 67 | jazzy (0.14.3) 68 | cocoapods (~> 1.5) 69 | mustache (~> 1.1) 70 | open4 (~> 1.3) 71 | redcarpet (~> 3.4) 72 | rexml (~> 3.2) 73 | rouge (>= 2.0.6, < 4.0) 74 | sassc (~> 2.1) 75 | sqlite3 (~> 1.3) 76 | xcinvoke (~> 0.3.0) 77 | json (2.6.3) 78 | liferaft (0.0.6) 79 | mini_portile2 (2.8.4) 80 | minitest (5.20.0) 81 | molinillo (0.8.0) 82 | mustache (1.1.1) 83 | nanaimo (0.3.0) 84 | nap (1.1.0) 85 | netrc (0.11.0) 86 | open4 (1.3.4) 87 | public_suffix (4.0.7) 88 | redcarpet (3.6.0) 89 | rexml (3.2.6) 90 | rouge (3.30.0) 91 | ruby-macho (2.5.1) 92 | sassc (2.4.0) 93 | ffi (~> 1.9) 94 | sqlite3 (1.6.6) 95 | mini_portile2 (~> 2.8.0) 96 | typhoeus (1.4.0) 97 | ethon (>= 0.9.0) 98 | tzinfo (2.0.6) 99 | concurrent-ruby (~> 1.0) 100 | xcinvoke (0.3.0) 101 | liferaft (~> 0.0.6) 102 | xcodeproj (1.22.0) 103 | CFPropertyList (>= 2.3.3, < 4.0) 104 | atomos (~> 0.1.3) 105 | claide (>= 1.0.2, < 2.0) 106 | colored2 (~> 3.1) 107 | nanaimo (~> 0.3.0) 108 | rexml (~> 3.2.4) 109 | 110 | PLATFORMS 111 | ruby 112 | 113 | DEPENDENCIES 114 | cocoapods 115 | jazzy 116 | 117 | BUNDLED WITH 118 | 2.4.10 119 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2022 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 | -------------------------------------------------------------------------------- /Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object" : { 3 | "pins" : [ 4 | { 5 | "package" : "Alamofire", 6 | "repositoryURL" : "https://github.com/Alamofire/Alamofire.git", 7 | "state" : { 8 | "branch" : null, 9 | "revision" : "b2fa556e4e48cbf06cf8c63def138c98f4b811fa", 10 | "version" : "5.8.0" 11 | } 12 | } 13 | ] 14 | }, 15 | "version" : 1 16 | } 17 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.9 2 | // 3 | // Package.swift 4 | // 5 | // Copyright (c) 2023 Alamofire Software Foundation (http://alamofire.org/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | import PackageDescription 27 | 28 | let package = Package(name: "AlamofireImage", 29 | platforms: [.iOS(.v11), 30 | .macOS(.v10_13), 31 | .tvOS(.v11), 32 | .watchOS(.v4)], 33 | products: [.library(name: "AlamofireImage", targets: ["AlamofireImage"])], 34 | dependencies: [.package(url: "https://github.com/Alamofire/Alamofire.git", 35 | from: "5.8.0")], 36 | targets: [.target(name: "AlamofireImage", 37 | dependencies: ["Alamofire"], 38 | path: "Source", 39 | exclude: ["Info.plist"]), 40 | .testTarget(name: "AlamofireImageTests", 41 | dependencies: ["AlamofireImage"], 42 | path: "Tests", 43 | exclude: ["Info.plist", "Test Plans"], 44 | resources: [.process("Resources")])], 45 | swiftLanguageVersions: [.v5]) 46 | -------------------------------------------------------------------------------- /Package@swift-5.5.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.5 2 | // 3 | // Package@swift-5.5.swift 4 | // 5 | // Copyright (c) 2022 Alamofire Software Foundation (http://alamofire.org/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | import PackageDescription 27 | 28 | let package = Package(name: "AlamofireImage", 29 | platforms: [.iOS(.v10), 30 | .macOS(.v10_12), 31 | .tvOS(.v10), 32 | .watchOS(.v3)], 33 | products: [.library(name: "AlamofireImage", targets: ["AlamofireImage"])], 34 | dependencies: [.package(url: "https://github.com/Alamofire/Alamofire.git", 35 | from: "5.8.0")], 36 | targets: [.target(name: "AlamofireImage", 37 | dependencies: ["Alamofire"], 38 | path: "Source", 39 | exclude: ["Info.plist"])], 40 | swiftLanguageVersions: [.v5]) 41 | -------------------------------------------------------------------------------- /Package@swift-5.6.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.6 2 | // 3 | // Package@swift-5.6.swift 4 | // 5 | // Copyright (c) 2022 Alamofire Software Foundation (http://alamofire.org/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | import PackageDescription 27 | 28 | let package = Package(name: "AlamofireImage", 29 | platforms: [.iOS(.v10), 30 | .macOS(.v10_12), 31 | .tvOS(.v10), 32 | .watchOS(.v3)], 33 | products: [.library(name: "AlamofireImage", targets: ["AlamofireImage"])], 34 | dependencies: [.package(url: "https://github.com/Alamofire/Alamofire.git", 35 | from: "5.8.0")], 36 | targets: [.target(name: "AlamofireImage", 37 | dependencies: ["Alamofire"], 38 | path: "Source", 39 | exclude: ["Info.plist"])], 40 | swiftLanguageVersions: [.v5]) 41 | -------------------------------------------------------------------------------- /Package@swift-5.7.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.7 2 | // 3 | // Package@swift-5.7.swift 4 | // 5 | // Copyright (c) 2023 Alamofire Software Foundation (http://alamofire.org/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | import PackageDescription 27 | 28 | let package = Package(name: "AlamofireImage", 29 | platforms: [.iOS(.v11), 30 | .macOS(.v10_13), 31 | .tvOS(.v11), 32 | .watchOS(.v4)], 33 | products: [.library(name: "AlamofireImage", targets: ["AlamofireImage"])], 34 | dependencies: [.package(url: "https://github.com/Alamofire/Alamofire.git", 35 | from: "5.8.0")], 36 | targets: [.target(name: "AlamofireImage", 37 | dependencies: ["Alamofire"], 38 | path: "Source", 39 | exclude: ["Info.plist"]), 40 | .testTarget(name: "AlamofireImageTests", 41 | dependencies: ["AlamofireImage"], 42 | path: "Tests", 43 | exclude: ["Info.plist", "Test Plans"], 44 | resources: [.process("Resources")])], 45 | swiftLanguageVersions: [.v5]) 46 | -------------------------------------------------------------------------------- /Package@swift-5.8.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.8 2 | // 3 | // Package@swift-5.8.swift 4 | // 5 | // Copyright (c) 2023 Alamofire Software Foundation (http://alamofire.org/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | import PackageDescription 27 | 28 | let package = Package(name: "AlamofireImage", 29 | platforms: [.iOS(.v11), 30 | .macOS(.v10_13), 31 | .tvOS(.v11), 32 | .watchOS(.v4)], 33 | products: [.library(name: "AlamofireImage", targets: ["AlamofireImage"])], 34 | dependencies: [.package(url: "https://github.com/Alamofire/Alamofire.git", 35 | from: "5.8.0")], 36 | targets: [.target(name: "AlamofireImage", 37 | dependencies: ["Alamofire"], 38 | path: "Source", 39 | exclude: ["Info.plist"]), 40 | .testTarget(name: "AlamofireImageTests", 41 | dependencies: ["AlamofireImage"], 42 | path: "Tests", 43 | exclude: ["Info.plist", "Test Plans"], 44 | resources: [.process("Resources")])], 45 | swiftLanguageVersions: [.v5]) 46 | -------------------------------------------------------------------------------- /Source/AFIError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AFIError.swift 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Alamofire 26 | import Foundation 27 | 28 | /// `AFIError` is the error type returned by AlamofireImage. 29 | /// 30 | /// - requestCancelled: The request was explicitly cancelled. 31 | /// - imageSerializationFailed: Response data could not be serialized into an image. 32 | public enum AFIError: Error { 33 | case requestCancelled 34 | case imageSerializationFailed 35 | case alamofireError(AFError) 36 | } 37 | 38 | // MARK: - Error Booleans 39 | 40 | extension AFIError { 41 | /// Returns `true` if the `AFIError` is a request cancellation error, `false` otherwise. 42 | public var isRequestCancelledError: Bool { 43 | if case .requestCancelled = self { return true } 44 | return false 45 | } 46 | 47 | /// Returns `true` if the `AFIError` is an image serialization error, `false` otherwise. 48 | public var isImageSerializationFailedError: Bool { 49 | if case .imageSerializationFailed = self { return true } 50 | return false 51 | } 52 | 53 | public var isAlamofireError: Bool { 54 | if case .alamofireError = self { return true } 55 | return false 56 | } 57 | } 58 | 59 | // MARK: - Error Descriptions 60 | 61 | extension AFIError: LocalizedError { 62 | public var errorDescription: String? { 63 | switch self { 64 | case .requestCancelled: 65 | return "The request was explicitly cancelled." 66 | case .imageSerializationFailed: 67 | return "Response data could not be serialized into an image." 68 | case let .alamofireError(error): 69 | return "Request failed due to an underlying Alamofire error: \(error.localizedDescription)" 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Source/AlamofireImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlamofireImage.h 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | @import Foundation; 26 | 27 | FOUNDATION_EXPORT double AlamofireImageVersionNumber; 28 | FOUNDATION_EXPORT const unsigned char AlamofireImageVersionString[]; 29 | -------------------------------------------------------------------------------- /Source/Image.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Image.swift 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | 27 | #if os(iOS) || os(tvOS) || os(watchOS) || (swift(>=5.9) && os(visionOS)) 28 | import UIKit 29 | public typealias Image = UIImage 30 | #elseif os(macOS) 31 | import Cocoa 32 | public typealias Image = NSImage 33 | #endif 34 | -------------------------------------------------------------------------------- /Source/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Tests/AFError+AlamofireImageTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AFError+AlamofireImageTests.swift 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Alamofire 26 | 27 | extension AFError { 28 | // ResponseSerializationFailureReason 29 | 30 | var isInputDataNilOrZeroLength: Bool { 31 | if case let .responseSerializationFailed(reason) = self, reason.isInputDataNilOrZeroLength { return true } 32 | return false 33 | } 34 | 35 | var isInputFileNil: Bool { 36 | if case let .responseSerializationFailed(reason) = self, reason.isInputFileNil { return true } 37 | return false 38 | } 39 | 40 | var isInputFileReadFailed: Bool { 41 | if case let .responseSerializationFailed(reason) = self, reason.isInputFileReadFailed { return true } 42 | return false 43 | } 44 | 45 | // ResponseValidationFailureReason 46 | 47 | var isDataFileNil: Bool { 48 | if case let .responseValidationFailed(reason) = self, reason.isDataFileNil { return true } 49 | return false 50 | } 51 | 52 | var isDataFileReadFailed: Bool { 53 | if case let .responseValidationFailed(reason) = self, reason.isDataFileReadFailed { return true } 54 | return false 55 | } 56 | 57 | var isMissingContentType: Bool { 58 | if case let .responseValidationFailed(reason) = self, reason.isMissingContentType { return true } 59 | return false 60 | } 61 | 62 | var isUnacceptableContentType: Bool { 63 | if case let .responseValidationFailed(reason) = self, reason.isUnacceptableContentType { return true } 64 | return false 65 | } 66 | 67 | var isUnacceptableStatusCode: Bool { 68 | if case let .responseValidationFailed(reason) = self, reason.isUnacceptableStatusCode { return true } 69 | return false 70 | } 71 | } 72 | 73 | // MARK: - 74 | 75 | extension AFError.ResponseSerializationFailureReason { 76 | var isInputDataNilOrZeroLength: Bool { 77 | if case .inputDataNilOrZeroLength = self { return true } 78 | return false 79 | } 80 | 81 | var isInputFileNil: Bool { 82 | if case .inputFileNil = self { return true } 83 | return false 84 | } 85 | 86 | var isInputFileReadFailed: Bool { 87 | if case .inputFileReadFailed = self { return true } 88 | return false 89 | } 90 | } 91 | 92 | // MARK: - 93 | 94 | extension AFError.ResponseValidationFailureReason { 95 | var isDataFileNil: Bool { 96 | if case .dataFileNil = self { return true } 97 | return false 98 | } 99 | 100 | var isDataFileReadFailed: Bool { 101 | if case .dataFileReadFailed = self { return true } 102 | return false 103 | } 104 | 105 | var isMissingContentType: Bool { 106 | if case .missingContentType = self { return true } 107 | return false 108 | } 109 | 110 | var isUnacceptableContentType: Bool { 111 | if case .unacceptableContentType = self { return true } 112 | return false 113 | } 114 | 115 | var isUnacceptableStatusCode: Bool { 116 | if case .unacceptableStatusCode = self { return true } 117 | return false 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /Tests/AFResult+AlamofireImageTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AFResult+AlamofireImageTests.swift 3 | // 4 | // Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Alamofire 26 | import Foundation 27 | 28 | extension AFResult { 29 | var isSuccess: Bool { 30 | guard case .success = self else { return false } 31 | return true 32 | } 33 | 34 | var isFailure: Bool { 35 | !isSuccess 36 | } 37 | 38 | var value: Success? { 39 | guard case let .success(value) = self else { return nil } 40 | return value 41 | } 42 | 43 | var error: Failure? { 44 | guard case let .failure(error) = self else { return nil } 45 | return error 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Tests/BaseTestCase.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseTestCase.swift 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Alamofire 26 | import AlamofireImage 27 | import Foundation 28 | import XCTest 29 | 30 | #if canImport(WatchKit) 31 | import WatchKit 32 | #endif 33 | 34 | class BaseTestCase: XCTestCase { 35 | let timeout = 5.0 36 | var session: Session! 37 | 38 | // MARK: - Setup and Teardown 39 | 40 | override func setUp() { 41 | super.setUp() 42 | 43 | session = { 44 | let configuration: URLSessionConfiguration = { 45 | let configuration = URLSessionConfiguration.ephemeral 46 | configuration.httpAdditionalHeaders = HTTPHeaders.default.dictionary 47 | 48 | return configuration 49 | }() 50 | 51 | return Session(configuration: configuration) 52 | }() 53 | } 54 | 55 | override func tearDown() { 56 | super.tearDown() 57 | 58 | session.session.finishTasksAndInvalidate() 59 | session = nil 60 | } 61 | 62 | // MARK: - Resources 63 | 64 | func url(forResource fileName: String, withExtension ext: String) -> URL { 65 | let bundle = Bundle(for: BaseTestCase.self) 66 | return bundle.url(forResource: fileName, withExtension: ext)! 67 | } 68 | 69 | func image(forResource fileName: String, withExtension ext: String) -> Image { 70 | let resourceURL = url(forResource: fileName, withExtension: ext) 71 | let data = try! Data(contentsOf: resourceURL) 72 | 73 | #if os(iOS) || os(tvOS) || os(watchOS) || (swift(>=5.9) && os(visionOS)) 74 | let image = Image.af.threadSafeImage(with: data, scale: DataRequest.imageScale)! 75 | #elseif os(macOS) 76 | let image = Image(data: data)! 77 | #endif 78 | 79 | return image 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Tests/CGSize.ScreenScaling.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CGSize.ScreenScaling.swift 3 | // 4 | // Copyright (c) 2021 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #if canImport(UIKit) 26 | 27 | import Alamofire 28 | import AlamofireImage 29 | import UIKit 30 | 31 | extension CGSize { 32 | var scaledToScreen: CGSize { 33 | scaled(by: DataRequest.imageScale) 34 | } 35 | 36 | func scaled(by scale: CGFloat) -> CGSize { 37 | CGSize(width: width / scale, height: height / scale) 38 | } 39 | } 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Tests/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 | -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill Circle/pirate-aspect.scaled.to.fill.size.circle-100x100-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill Circle/pirate-aspect.scaled.to.fill.size.circle-100x100-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill Circle/pirate-aspect.scaled.to.fill.size.circle-100x100-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill Circle/pirate-aspect.scaled.to.fill.size.circle-100x100-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill Circle/pirate-aspect.scaled.to.fill.size.circle-100x100-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill Circle/pirate-aspect.scaled.to.fill.size.circle-100x100-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill with Rounded Corners/pirate-aspect.scaled.to.fill.size.with.rounded.corners-100x100x20-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill with Rounded Corners/pirate-aspect.scaled.to.fill.size.with.rounded.corners-100x100x20-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill with Rounded Corners/pirate-aspect.scaled.to.fill.size.with.rounded.corners-100x100x20-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill with Rounded Corners/pirate-aspect.scaled.to.fill.size.with.rounded.corners-100x100x20-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill with Rounded Corners/pirate-aspect.scaled.to.fill.size.with.rounded.corners-100x100x20-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill with Rounded Corners/pirate-aspect.scaled.to.fill.size.with.rounded.corners-100x100x20-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/apple-aspect.scaled.to.fill-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/pirate-aspect.scaled.to.fill-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/rainbow-aspect.scaled.to.fill-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fill/unicorn-aspect.scaled.to.fill-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/apple-aspect.scaled.to.fit-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/pirate-aspect.scaled.to.fit-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/rainbow-aspect.scaled.to.fit-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Aspect Scaled to Fit/unicorn-aspect.scaled.to.fit-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Circle/apple-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Circle/apple-circle.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Circle/pirate-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Circle/pirate-circle.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Circle/rainbow-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Circle/rainbow-circle.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Circle/unicorn-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Circle/unicorn-circle.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Core Image Filters/unicorn-blurred-8-ios-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Core Image Filters/unicorn-blurred-8-ios-13.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Core Image Filters/unicorn-blurred-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Core Image Filters/unicorn-blurred-8.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Core Image Filters/unicorn-sepia.tone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Core Image Filters/unicorn-sepia.tone.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Radius/apple-radius-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Radius/apple-radius-20.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Radius/pirate-radius-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Radius/pirate-radius-20.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Radius/rainbow-radius-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Radius/rainbow-radius-20.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Radius/unicorn-radius-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Radius/unicorn-radius-20.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled to Size Circle/pirate-scaled.to.size.circle-100x100-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled to Size Circle/pirate-scaled.to.size.circle-100x100-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled to Size Circle/pirate-scaled.to.size.circle-100x100-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled to Size Circle/pirate-scaled.to.size.circle-100x100-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled to Size Circle/pirate-scaled.to.size.circle-100x100-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled to Size Circle/pirate-scaled.to.size.circle-100x100-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled with Rounded Corners/pirate-scaled.to.size.with.rounded.corners-100x100x20-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled with Rounded Corners/pirate-scaled.to.size.with.rounded.corners-100x100x20-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled with Rounded Corners/pirate-scaled.to.size.with.rounded.corners-100x100x20-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled with Rounded Corners/pirate-scaled.to.size.with.rounded.corners-100x100x20-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled with Rounded Corners/pirate-scaled.to.size.with.rounded.corners-100x100x20-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled with Rounded Corners/pirate-scaled.to.size.with.rounded.corners-100x100x20-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/apple-scaled-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/apple-scaled-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/apple-scaled-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/apple-scaled-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/apple-scaled-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/apple-scaled-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/apple-scaled-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/apple-scaled-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/apple-scaled-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/apple-scaled-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/apple-scaled-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/apple-scaled-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/apple-scaled-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/apple-scaled-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/apple-scaled-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/apple-scaled-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/apple-scaled-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/apple-scaled-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/pirate-scaled-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/pirate-scaled-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/pirate-scaled-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/pirate-scaled-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/pirate-scaled-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/pirate-scaled-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/pirate-scaled-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/pirate-scaled-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/pirate-scaled-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/pirate-scaled-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/pirate-scaled-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/pirate-scaled-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/pirate-scaled-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/pirate-scaled-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/pirate-scaled-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/pirate-scaled-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/pirate-scaled-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/pirate-scaled-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/rainbow-scaled-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/rainbow-scaled-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/rainbow-scaled-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/rainbow-scaled-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/rainbow-scaled-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/rainbow-scaled-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/rainbow-scaled-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/rainbow-scaled-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/rainbow-scaled-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/rainbow-scaled-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/rainbow-scaled-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/rainbow-scaled-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/rainbow-scaled-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/rainbow-scaled-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/rainbow-scaled-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/rainbow-scaled-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/rainbow-scaled-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/rainbow-scaled-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/unicorn-scaled-30x60-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/unicorn-scaled-30x60-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/unicorn-scaled-30x60-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/unicorn-scaled-30x60-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/unicorn-scaled-30x60-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/unicorn-scaled-30x60-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/unicorn-scaled-50x50-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/unicorn-scaled-50x50-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/unicorn-scaled-50x50-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/unicorn-scaled-50x50-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/unicorn-scaled-50x50-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/unicorn-scaled-50x50-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/unicorn-scaled-60x30-@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/unicorn-scaled-60x30-@1x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/unicorn-scaled-60x30-@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/unicorn-scaled-60x30-@2x.png -------------------------------------------------------------------------------- /Tests/Resources/Modified Images/Scaled/unicorn-scaled-60x30-@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Modified Images/Scaled/unicorn-scaled-60x30-@3x.png -------------------------------------------------------------------------------- /Tests/Resources/Original Images/apple.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Original Images/apple.jpg -------------------------------------------------------------------------------- /Tests/Resources/Original Images/huge_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Original Images/huge_map.jpg -------------------------------------------------------------------------------- /Tests/Resources/Original Images/pirate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Original Images/pirate.jpg -------------------------------------------------------------------------------- /Tests/Resources/Original Images/rainbow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Original Images/rainbow.jpg -------------------------------------------------------------------------------- /Tests/Resources/Original Images/unicorn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/Tests/Resources/Original Images/unicorn.png -------------------------------------------------------------------------------- /Tests/Test Plans/iOS-NoTS.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "896D89A9-F588-46F0-87A4-1F4D74C57B4B", 5 | "name" : "Configuration", 6 | "options" : { 7 | "environmentVariableEntries" : [ 8 | { 9 | "key" : "SWIFT_DETERMINISTIC_HASHING", 10 | "value" : "1" 11 | } 12 | ] 13 | } 14 | } 15 | ], 16 | "defaultOptions" : { 17 | "codeCoverage" : false, 18 | "diagnosticCollectionPolicy" : "Never", 19 | "environmentVariableEntries" : [ 20 | { 21 | "key" : "SWIFT_DETERMINISTIC_HASHING", 22 | "value" : "1" 23 | } 24 | ], 25 | "targetForVariableExpansion" : { 26 | "containerPath" : "container:AlamofireImage.xcodeproj", 27 | "identifier" : "4C9043761AABBFC5001B4E60", 28 | "name" : "AlamofireImage iOS" 29 | } 30 | }, 31 | "testTargets" : [ 32 | { 33 | "target" : { 34 | "containerPath" : "container:AlamofireImage.xcodeproj", 35 | "identifier" : "4C9043811AABBFC5001B4E60", 36 | "name" : "AlamofireImage iOS Tests" 37 | } 38 | } 39 | ], 40 | "version" : 1 41 | } 42 | -------------------------------------------------------------------------------- /Tests/Test Plans/iOS-Old.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "896D89A9-F588-46F0-87A4-1F4D74C57B4B", 5 | "name" : "Configuration", 6 | "options" : { 7 | "environmentVariableEntries" : [ 8 | { 9 | "key" : "SWIFT_DETERMINISTIC_HASHING", 10 | "value" : "1" 11 | } 12 | ] 13 | } 14 | } 15 | ], 16 | "defaultOptions" : { 17 | "codeCoverage" : false, 18 | "diagnosticCollectionPolicy" : "Never", 19 | "environmentVariableEntries" : [ 20 | { 21 | "key" : "SWIFT_DETERMINISTIC_HASHING", 22 | "value" : "1" 23 | } 24 | ], 25 | "targetForVariableExpansion" : { 26 | "containerPath" : "container:AlamofireImage.xcodeproj", 27 | "identifier" : "4C9043761AABBFC5001B4E60", 28 | "name" : "AlamofireImage iOS" 29 | } 30 | }, 31 | "testTargets" : [ 32 | { 33 | "target" : { 34 | "containerPath" : "container:AlamofireImage.xcodeproj", 35 | "identifier" : "4C9043811AABBFC5001B4E60", 36 | "name" : "AlamofireImage iOS Tests" 37 | } 38 | } 39 | ], 40 | "version" : 1 41 | } 42 | -------------------------------------------------------------------------------- /Tests/Test Plans/iOS.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "896D89A9-F588-46F0-87A4-1F4D74C57B4B", 5 | "name" : "Configuration", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "codeCoverage" : false, 13 | "diagnosticCollectionPolicy" : "Never", 14 | "environmentVariableEntries" : [ 15 | { 16 | "key" : "SWIFT_DETERMINISTIC_HASHING", 17 | "value" : "1" 18 | } 19 | ], 20 | "targetForVariableExpansion" : { 21 | "containerPath" : "container:AlamofireImage.xcodeproj", 22 | "identifier" : "4C9043761AABBFC5001B4E60", 23 | "name" : "AlamofireImage iOS" 24 | }, 25 | "threadSanitizerEnabled" : true 26 | }, 27 | "testTargets" : [ 28 | { 29 | "target" : { 30 | "containerPath" : "container:AlamofireImage.xcodeproj", 31 | "identifier" : "4C9043811AABBFC5001B4E60", 32 | "name" : "AlamofireImage iOS Tests" 33 | } 34 | } 35 | ], 36 | "version" : 1 37 | } 38 | -------------------------------------------------------------------------------- /Tests/Test Plans/macOS-NoTS.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "DB29FBD0-1FC1-43F8-98E6-A900A70BB340", 5 | "name" : "Configuration", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "codeCoverage" : false, 13 | "diagnosticCollectionPolicy" : "Never", 14 | "environmentVariableEntries" : [ 15 | { 16 | "key" : "SWIFT_DETERMINISTIC_HASHING", 17 | "value" : "1" 18 | } 19 | ], 20 | "targetForVariableExpansion" : { 21 | "containerPath" : "container:AlamofireImage.xcodeproj", 22 | "identifier" : "4CE611281AABC24E00D35044", 23 | "name" : "AlamofireImage macOS" 24 | } 25 | }, 26 | "testTargets" : [ 27 | { 28 | "target" : { 29 | "containerPath" : "container:AlamofireImage.xcodeproj", 30 | "identifier" : "4CE611461AABC5C900D35044", 31 | "name" : "AlamofireImage macOS Tests" 32 | } 33 | } 34 | ], 35 | "version" : 1 36 | } 37 | -------------------------------------------------------------------------------- /Tests/Test Plans/macOS.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "656F9523-5B25-4CB4-AF12-44AE1DDBD11E", 5 | "name" : "Configuration", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "codeCoverage" : false, 13 | "diagnosticCollectionPolicy" : "Never", 14 | "environmentVariableEntries" : [ 15 | { 16 | "key" : "SWIFT_DETERMINISTIC_HASHING", 17 | "value" : "1" 18 | } 19 | ], 20 | "targetForVariableExpansion" : { 21 | "containerPath" : "container:AlamofireImage.xcodeproj", 22 | "identifier" : "4CE611281AABC24E00D35044", 23 | "name" : "AlamofireImage macOS" 24 | }, 25 | "threadSanitizerEnabled" : true 26 | }, 27 | "testTargets" : [ 28 | { 29 | "target" : { 30 | "containerPath" : "container:AlamofireImage.xcodeproj", 31 | "identifier" : "4CE611461AABC5C900D35044", 32 | "name" : "AlamofireImage macOS Tests" 33 | } 34 | } 35 | ], 36 | "version" : 1 37 | } 38 | -------------------------------------------------------------------------------- /Tests/Test Plans/tvOS-NoTS.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "9F3553D7-5AF9-4887-B538-3B815EA7A187", 5 | "name" : "Configuration", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "codeCoverage" : false, 13 | "diagnosticCollectionPolicy" : "Never", 14 | "environmentVariableEntries" : [ 15 | { 16 | "key" : "SWIFT_DETERMINISTIC_HASHING", 17 | "value" : "1" 18 | } 19 | ], 20 | "targetForVariableExpansion" : { 21 | "containerPath" : "container:AlamofireImage.xcodeproj", 22 | "identifier" : "4C16B37C1BA9399500A66EF0", 23 | "name" : "AlamofireImage tvOS" 24 | } 25 | }, 26 | "testTargets" : [ 27 | { 28 | "target" : { 29 | "containerPath" : "container:AlamofireImage.xcodeproj", 30 | "identifier" : "4C16B3851BA9399500A66EF0", 31 | "name" : "AlamofireImage tvOS Tests" 32 | } 33 | } 34 | ], 35 | "version" : 1 36 | } 37 | -------------------------------------------------------------------------------- /Tests/Test Plans/tvOS-Old.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "9F3553D7-5AF9-4887-B538-3B815EA7A187", 5 | "name" : "Configuration", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "codeCoverage" : false, 13 | "diagnosticCollectionPolicy" : "Never", 14 | "environmentVariableEntries" : [ 15 | { 16 | "key" : "SWIFT_DETERMINISTIC_HASHING", 17 | "value" : "1" 18 | } 19 | ], 20 | "targetForVariableExpansion" : { 21 | "containerPath" : "container:AlamofireImage.xcodeproj", 22 | "identifier" : "4C16B37C1BA9399500A66EF0", 23 | "name" : "AlamofireImage tvOS" 24 | } 25 | }, 26 | "testTargets" : [ 27 | { 28 | "target" : { 29 | "containerPath" : "container:AlamofireImage.xcodeproj", 30 | "identifier" : "4C16B3851BA9399500A66EF0", 31 | "name" : "AlamofireImage tvOS Tests" 32 | } 33 | } 34 | ], 35 | "version" : 1 36 | } 37 | -------------------------------------------------------------------------------- /Tests/Test Plans/tvOS.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "9F3553D7-5AF9-4887-B538-3B815EA7A187", 5 | "name" : "Configuration", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "codeCoverage" : false, 13 | "diagnosticCollectionPolicy" : "Never", 14 | "environmentVariableEntries" : [ 15 | { 16 | "key" : "SWIFT_DETERMINISTIC_HASHING", 17 | "value" : "1" 18 | } 19 | ], 20 | "targetForVariableExpansion" : { 21 | "containerPath" : "container:AlamofireImage.xcodeproj", 22 | "identifier" : "4C16B37C1BA9399500A66EF0", 23 | "name" : "AlamofireImage tvOS" 24 | }, 25 | "threadSanitizerEnabled" : true 26 | }, 27 | "testTargets" : [ 28 | { 29 | "target" : { 30 | "containerPath" : "container:AlamofireImage.xcodeproj", 31 | "identifier" : "4C16B3851BA9399500A66EF0", 32 | "name" : "AlamofireImage tvOS Tests" 33 | } 34 | } 35 | ], 36 | "version" : 1 37 | } 38 | -------------------------------------------------------------------------------- /Tests/Test Plans/visionOS.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "6BC748D2-4DF9-4572-96B6-DC495E596366", 5 | "name" : "Test Scheme Action", 6 | "options" : { 7 | "threadSanitizerEnabled" : true 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "codeCoverage" : false 13 | }, 14 | "testTargets" : [ 15 | { 16 | "target" : { 17 | "containerPath" : "container:AlamofireImage.xcodeproj", 18 | "identifier" : "31C064202AA7AE2900D76648", 19 | "name" : "AlamofireImage visionOS Tests" 20 | } 21 | } 22 | ], 23 | "version" : 1 24 | } 25 | -------------------------------------------------------------------------------- /Tests/Test Plans/watchOS-NoTS.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "294BC284-3E58-4157-A1C9-539A86AE3DE0", 5 | "name" : "Configuration", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "codeCoverage" : false, 13 | "diagnosticCollectionPolicy" : "Never", 14 | "targetForVariableExpansion" : { 15 | "containerPath" : "container:AlamofireImage.xcodeproj", 16 | "identifier" : "4C4D4EC01B92976900C96855", 17 | "name" : "AlamofireImage watchOS" 18 | } 19 | }, 20 | "testTargets" : [ 21 | { 22 | "target" : { 23 | "containerPath" : "container:AlamofireImage.xcodeproj", 24 | "identifier" : "317911B8290F9AEE00BF6504", 25 | "name" : "AlamofireImage watchOS Tests" 26 | } 27 | } 28 | ], 29 | "version" : 1 30 | } 31 | -------------------------------------------------------------------------------- /Tests/Test Plans/watchOS.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "294BC284-3E58-4157-A1C9-539A86AE3DE0", 5 | "name" : "Configuration", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "codeCoverage" : false, 13 | "diagnosticCollectionPolicy" : "Never", 14 | "targetForVariableExpansion" : { 15 | "containerPath" : "container:AlamofireImage.xcodeproj", 16 | "identifier" : "4C4D4EC01B92976900C96855", 17 | "name" : "AlamofireImage watchOS" 18 | }, 19 | "threadSanitizerEnabled" : true 20 | }, 21 | "testTargets" : [ 22 | { 23 | "target" : { 24 | "containerPath" : "container:AlamofireImage.xcodeproj", 25 | "identifier" : "317911B8290F9AEE00BF6504", 26 | "name" : "AlamofireImage watchOS Tests" 27 | } 28 | } 29 | ], 30 | "version" : 1 31 | } 32 | -------------------------------------------------------------------------------- /Tests/ThrowingURLRequestConvertible.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThrowingURLRequestConvertible.swift 3 | // 4 | // Copyright (c) 2020 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Alamofire 26 | import Foundation 27 | 28 | struct ThrowingURLRequestConvertible: URLRequestConvertible { 29 | enum Error: Swift.Error { 30 | case testError 31 | } 32 | 33 | func asURLRequest() throws -> URLRequest { 34 | throw Error.testError 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Tests/UIImage+AlamofireImageTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+AlamofireImageTests.swift 3 | // 4 | // Copyright (c) 2015 Alamofire Software Foundation (http://alamofire.org/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #if !os(macOS) 26 | 27 | import Alamofire 28 | import AlamofireImage 29 | import UIKit 30 | 31 | extension UIImage { 32 | var isScaledToScreen: Bool { 33 | scale == DataRequest.imageScale 34 | } 35 | } 36 | 37 | extension AlamofireExtension where ExtendedType: UIImage { 38 | func isEqualToImage(_ image: UIImage, withinTolerance tolerance: UInt8 = 3) -> Bool { 39 | guard type.size.equalTo(image.size) else { return false } 40 | 41 | let image1 = imageWithPNGRepresentation().af.renderedImage() 42 | let image2 = image.af.imageWithPNGRepresentation().af.renderedImage() 43 | 44 | guard let rendered1 = image1, let rendered2 = image2 else { return false } 45 | 46 | let pixelData1 = rendered1.cgImage?.dataProvider?.data 47 | let pixelData2 = rendered2.cgImage?.dataProvider?.data 48 | 49 | guard let validPixelData1 = pixelData1, let validPixelData2 = pixelData2 else { return false } 50 | 51 | let data1 = Data(bytes: CFDataGetBytePtr(validPixelData1), count: CFDataGetLength(validPixelData1)) 52 | let data2 = Data(bytes: CFDataGetBytePtr(validPixelData2), count: CFDataGetLength(validPixelData2)) 53 | 54 | guard data1.count == data2.count else { return false } 55 | 56 | for index in 0.. UIImage? { 68 | // Do not attempt to render animated images 69 | guard type.images == nil else { return nil } 70 | 71 | // Do not attempt to render if not backed by a CGImage 72 | guard let image = type.cgImage?.copy() else { return nil } 73 | 74 | let width = image.width 75 | let height = image.height 76 | let bitsPerComponent = image.bitsPerComponent 77 | 78 | // Do not attempt to render if too large or has more than 8-bit components 79 | guard width * height <= 4096 * 4096 && bitsPerComponent <= 8 else { return nil } 80 | 81 | let bytesPerRow = 0 82 | let colorSpace = CGColorSpaceCreateDeviceRGB() 83 | var bitmapInfo = image.bitmapInfo 84 | 85 | // Fix alpha channel issues if necessary 86 | let alpha = (bitmapInfo.rawValue & CGBitmapInfo.alphaInfoMask.rawValue) 87 | 88 | if alpha == CGImageAlphaInfo.none.rawValue { 89 | bitmapInfo.remove(.alphaInfoMask) 90 | bitmapInfo = CGBitmapInfo(rawValue: bitmapInfo.rawValue | CGImageAlphaInfo.noneSkipFirst.rawValue) 91 | } else if !(alpha == CGImageAlphaInfo.noneSkipFirst.rawValue) || !(alpha == CGImageAlphaInfo.noneSkipLast.rawValue) { 92 | bitmapInfo.remove(.alphaInfoMask) 93 | bitmapInfo = CGBitmapInfo(rawValue: bitmapInfo.rawValue | CGImageAlphaInfo.premultipliedFirst.rawValue) 94 | } 95 | 96 | // Render the image 97 | let context = CGContext(data: nil, 98 | width: width, 99 | height: height, 100 | bitsPerComponent: bitsPerComponent, 101 | bytesPerRow: bytesPerRow, 102 | space: colorSpace, 103 | bitmapInfo: bitmapInfo.rawValue) 104 | 105 | context?.draw(image, in: CGRect(x: 0.0, y: 0.0, width: CGFloat(width), height: CGFloat(height))) 106 | 107 | // Make sure the inflation was successful 108 | guard let renderedImage = context?.makeImage() else { return nil } 109 | 110 | return UIImage(cgImage: renderedImage, scale: type.scale, orientation: type.imageOrientation) 111 | } 112 | 113 | /** 114 | Modifies the underlying UIImage data to use a PNG representation. 115 | 116 | This is important in verifying pixel data between two images. If one has been exported out with PNG 117 | compression and another has not, the image data between the two images will never be equal. This helper 118 | method helps ensure comparisons will be valid. 119 | 120 | - returns: The PNG representation image. 121 | */ 122 | func imageWithPNGRepresentation() -> UIImage { 123 | let data = type.pngData()! 124 | let image = UIImage(data: data, scale: DataRequest.imageScale)! 125 | 126 | return image 127 | } 128 | } 129 | 130 | #endif 131 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal -------------------------------------------------------------------------------- /docs/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 76% 23 | 24 | 25 | 76% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/css/highlight.css: -------------------------------------------------------------------------------- 1 | /*! Jazzy - https://github.com/realm/jazzy 2 | * Copyright Realm Inc. 3 | * SPDX-License-Identifier: MIT 4 | */ 5 | /* Credit to https://gist.github.com/wataru420/2048287 */ 6 | .highlight .c { 7 | color: #999988; 8 | font-style: italic; } 9 | 10 | .highlight .err { 11 | color: #a61717; 12 | background-color: #e3d2d2; } 13 | 14 | .highlight .k { 15 | color: #000000; 16 | font-weight: bold; } 17 | 18 | .highlight .o { 19 | color: #000000; 20 | font-weight: bold; } 21 | 22 | .highlight .cm { 23 | color: #999988; 24 | font-style: italic; } 25 | 26 | .highlight .cp { 27 | color: #999999; 28 | font-weight: bold; } 29 | 30 | .highlight .c1 { 31 | color: #999988; 32 | font-style: italic; } 33 | 34 | .highlight .cs { 35 | color: #999999; 36 | font-weight: bold; 37 | font-style: italic; } 38 | 39 | .highlight .gd { 40 | color: #000000; 41 | background-color: #ffdddd; } 42 | 43 | .highlight .gd .x { 44 | color: #000000; 45 | background-color: #ffaaaa; } 46 | 47 | .highlight .ge { 48 | color: #000000; 49 | font-style: italic; } 50 | 51 | .highlight .gr { 52 | color: #aa0000; } 53 | 54 | .highlight .gh { 55 | color: #999999; } 56 | 57 | .highlight .gi { 58 | color: #000000; 59 | background-color: #ddffdd; } 60 | 61 | .highlight .gi .x { 62 | color: #000000; 63 | background-color: #aaffaa; } 64 | 65 | .highlight .go { 66 | color: #888888; } 67 | 68 | .highlight .gp { 69 | color: #555555; } 70 | 71 | .highlight .gs { 72 | font-weight: bold; } 73 | 74 | .highlight .gu { 75 | color: #aaaaaa; } 76 | 77 | .highlight .gt { 78 | color: #aa0000; } 79 | 80 | .highlight .kc { 81 | color: #000000; 82 | font-weight: bold; } 83 | 84 | .highlight .kd { 85 | color: #000000; 86 | font-weight: bold; } 87 | 88 | .highlight .kp { 89 | color: #000000; 90 | font-weight: bold; } 91 | 92 | .highlight .kr { 93 | color: #000000; 94 | font-weight: bold; } 95 | 96 | .highlight .kt { 97 | color: #445588; } 98 | 99 | .highlight .m { 100 | color: #009999; } 101 | 102 | .highlight .s { 103 | color: #d14; } 104 | 105 | .highlight .na { 106 | color: #008080; } 107 | 108 | .highlight .nb { 109 | color: #0086B3; } 110 | 111 | .highlight .nc { 112 | color: #445588; 113 | font-weight: bold; } 114 | 115 | .highlight .no { 116 | color: #008080; } 117 | 118 | .highlight .ni { 119 | color: #800080; } 120 | 121 | .highlight .ne { 122 | color: #990000; 123 | font-weight: bold; } 124 | 125 | .highlight .nf { 126 | color: #990000; } 127 | 128 | .highlight .nn { 129 | color: #555555; } 130 | 131 | .highlight .nt { 132 | color: #000080; } 133 | 134 | .highlight .nv { 135 | color: #008080; } 136 | 137 | .highlight .ow { 138 | color: #000000; 139 | font-weight: bold; } 140 | 141 | .highlight .w { 142 | color: #bbbbbb; } 143 | 144 | .highlight .mf { 145 | color: #009999; } 146 | 147 | .highlight .mh { 148 | color: #009999; } 149 | 150 | .highlight .mi { 151 | color: #009999; } 152 | 153 | .highlight .mo { 154 | color: #009999; } 155 | 156 | .highlight .sb { 157 | color: #d14; } 158 | 159 | .highlight .sc { 160 | color: #d14; } 161 | 162 | .highlight .sd { 163 | color: #d14; } 164 | 165 | .highlight .s2 { 166 | color: #d14; } 167 | 168 | .highlight .se { 169 | color: #d14; } 170 | 171 | .highlight .sh { 172 | color: #d14; } 173 | 174 | .highlight .si { 175 | color: #d14; } 176 | 177 | .highlight .sx { 178 | color: #d14; } 179 | 180 | .highlight .sr { 181 | color: #009926; } 182 | 183 | .highlight .s1 { 184 | color: #d14; } 185 | 186 | .highlight .ss { 187 | color: #990073; } 188 | 189 | .highlight .bp { 190 | color: #999999; } 191 | 192 | .highlight .vc { 193 | color: #008080; } 194 | 195 | .highlight .vg { 196 | color: #008080; } 197 | 198 | .highlight .vi { 199 | color: #008080; } 200 | 201 | .highlight .il { 202 | color: #009999; } 203 | -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.alamofireimage 7 | CFBundleName 8 | AlamofireImage 9 | DocSetPlatformFamily 10 | alamofireimage 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | DashDocSetFallbackURL 20 | https://alamofire.github.io/AlamofireImage/ 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 76% 23 | 24 | 25 | 76% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /*! Jazzy - https://github.com/realm/jazzy 2 | * Copyright Realm Inc. 3 | * SPDX-License-Identifier: MIT 4 | */ 5 | /* Credit to https://gist.github.com/wataru420/2048287 */ 6 | .highlight .c { 7 | color: #999988; 8 | font-style: italic; } 9 | 10 | .highlight .err { 11 | color: #a61717; 12 | background-color: #e3d2d2; } 13 | 14 | .highlight .k { 15 | color: #000000; 16 | font-weight: bold; } 17 | 18 | .highlight .o { 19 | color: #000000; 20 | font-weight: bold; } 21 | 22 | .highlight .cm { 23 | color: #999988; 24 | font-style: italic; } 25 | 26 | .highlight .cp { 27 | color: #999999; 28 | font-weight: bold; } 29 | 30 | .highlight .c1 { 31 | color: #999988; 32 | font-style: italic; } 33 | 34 | .highlight .cs { 35 | color: #999999; 36 | font-weight: bold; 37 | font-style: italic; } 38 | 39 | .highlight .gd { 40 | color: #000000; 41 | background-color: #ffdddd; } 42 | 43 | .highlight .gd .x { 44 | color: #000000; 45 | background-color: #ffaaaa; } 46 | 47 | .highlight .ge { 48 | color: #000000; 49 | font-style: italic; } 50 | 51 | .highlight .gr { 52 | color: #aa0000; } 53 | 54 | .highlight .gh { 55 | color: #999999; } 56 | 57 | .highlight .gi { 58 | color: #000000; 59 | background-color: #ddffdd; } 60 | 61 | .highlight .gi .x { 62 | color: #000000; 63 | background-color: #aaffaa; } 64 | 65 | .highlight .go { 66 | color: #888888; } 67 | 68 | .highlight .gp { 69 | color: #555555; } 70 | 71 | .highlight .gs { 72 | font-weight: bold; } 73 | 74 | .highlight .gu { 75 | color: #aaaaaa; } 76 | 77 | .highlight .gt { 78 | color: #aa0000; } 79 | 80 | .highlight .kc { 81 | color: #000000; 82 | font-weight: bold; } 83 | 84 | .highlight .kd { 85 | color: #000000; 86 | font-weight: bold; } 87 | 88 | .highlight .kp { 89 | color: #000000; 90 | font-weight: bold; } 91 | 92 | .highlight .kr { 93 | color: #000000; 94 | font-weight: bold; } 95 | 96 | .highlight .kt { 97 | color: #445588; } 98 | 99 | .highlight .m { 100 | color: #009999; } 101 | 102 | .highlight .s { 103 | color: #d14; } 104 | 105 | .highlight .na { 106 | color: #008080; } 107 | 108 | .highlight .nb { 109 | color: #0086B3; } 110 | 111 | .highlight .nc { 112 | color: #445588; 113 | font-weight: bold; } 114 | 115 | .highlight .no { 116 | color: #008080; } 117 | 118 | .highlight .ni { 119 | color: #800080; } 120 | 121 | .highlight .ne { 122 | color: #990000; 123 | font-weight: bold; } 124 | 125 | .highlight .nf { 126 | color: #990000; } 127 | 128 | .highlight .nn { 129 | color: #555555; } 130 | 131 | .highlight .nt { 132 | color: #000080; } 133 | 134 | .highlight .nv { 135 | color: #008080; } 136 | 137 | .highlight .ow { 138 | color: #000000; 139 | font-weight: bold; } 140 | 141 | .highlight .w { 142 | color: #bbbbbb; } 143 | 144 | .highlight .mf { 145 | color: #009999; } 146 | 147 | .highlight .mh { 148 | color: #009999; } 149 | 150 | .highlight .mi { 151 | color: #009999; } 152 | 153 | .highlight .mo { 154 | color: #009999; } 155 | 156 | .highlight .sb { 157 | color: #d14; } 158 | 159 | .highlight .sc { 160 | color: #d14; } 161 | 162 | .highlight .sd { 163 | color: #d14; } 164 | 165 | .highlight .s2 { 166 | color: #d14; } 167 | 168 | .highlight .se { 169 | color: #d14; } 170 | 171 | .highlight .sh { 172 | color: #d14; } 173 | 174 | .highlight .si { 175 | color: #d14; } 176 | 177 | .highlight .sx { 178 | color: #d14; } 179 | 180 | .highlight .sr { 181 | color: #009926; } 182 | 183 | .highlight .s1 { 184 | color: #d14; } 185 | 186 | .highlight .ss { 187 | color: #990073; } 188 | 189 | .highlight .bp { 190 | color: #999999; } 191 | 192 | .highlight .vc { 193 | color: #008080; } 194 | 195 | .highlight .vg { 196 | color: #008080; } 197 | 198 | .highlight .vi { 199 | color: #008080; } 200 | 201 | .highlight .il { 202 | color: #009999; } 203 | -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/img/spinner.gif -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | // Jazzy - https://github.com/realm/jazzy 2 | // Copyright Realm Inc. 3 | // SPDX-License-Identifier: MIT 4 | 5 | window.jazzy = {'docset': false} 6 | if (typeof window.dash != 'undefined') { 7 | document.documentElement.className += ' dash' 8 | window.jazzy.docset = true 9 | } 10 | if (navigator.userAgent.match(/xcode/i)) { 11 | document.documentElement.className += ' xcode' 12 | window.jazzy.docset = true 13 | } 14 | 15 | function toggleItem($link, $content) { 16 | var animationDuration = 300; 17 | $link.toggleClass('token-open'); 18 | $content.slideToggle(animationDuration); 19 | } 20 | 21 | function itemLinkToContent($link) { 22 | return $link.parent().parent().next(); 23 | } 24 | 25 | // On doc load + hash-change, open any targetted item 26 | function openCurrentItemIfClosed() { 27 | if (window.jazzy.docset) { 28 | return; 29 | } 30 | var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); 31 | $content = itemLinkToContent($link); 32 | if ($content.is(':hidden')) { 33 | toggleItem($link, $content); 34 | } 35 | } 36 | 37 | $(openCurrentItemIfClosed); 38 | $(window).on('hashchange', openCurrentItemIfClosed); 39 | 40 | // On item link ('token') click, toggle its discussion 41 | $('.token').on('click', function(event) { 42 | if (window.jazzy.docset) { 43 | return; 44 | } 45 | var $link = $(this); 46 | toggleItem($link, itemLinkToContent($link)); 47 | 48 | // Keeps the document from jumping to the hash. 49 | var href = $link.attr('href'); 50 | if (history.pushState) { 51 | history.pushState({}, '', href); 52 | } else { 53 | location.hash = href; 54 | } 55 | event.preventDefault(); 56 | }); 57 | 58 | // Clicks on links to the current, closed, item need to open the item 59 | $("a:not('.token')").on('click', function() { 60 | if (location == this.href) { 61 | openCurrentItemIfClosed(); 62 | } 63 | }); 64 | 65 | // KaTeX rendering 66 | if ("katex" in window) { 67 | $($('.math').each( (_, element) => { 68 | katex.render(element.textContent, element, { 69 | displayMode: $(element).hasClass('m-block'), 70 | throwOnError: false, 71 | trust: true 72 | }); 73 | })) 74 | } 75 | -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Resources/Documents/js/jazzy.search.js: -------------------------------------------------------------------------------- 1 | // Jazzy - https://github.com/realm/jazzy 2 | // Copyright Realm Inc. 3 | // SPDX-License-Identifier: MIT 4 | 5 | $(function(){ 6 | var $typeahead = $('[data-typeahead]'); 7 | var $form = $typeahead.parents('form'); 8 | var searchURL = $form.attr('action'); 9 | 10 | function displayTemplate(result) { 11 | return result.name; 12 | } 13 | 14 | function suggestionTemplate(result) { 15 | var t = '
'; 16 | t += '' + result.name + ''; 17 | if (result.parent_name) { 18 | t += '' + result.parent_name + ''; 19 | } 20 | t += '
'; 21 | return t; 22 | } 23 | 24 | $typeahead.one('focus', function() { 25 | $form.addClass('loading'); 26 | 27 | $.getJSON(searchURL).then(function(searchData) { 28 | const searchIndex = lunr(function() { 29 | this.ref('url'); 30 | this.field('name'); 31 | this.field('abstract'); 32 | for (const [url, doc] of Object.entries(searchData)) { 33 | this.add({url: url, name: doc.name, abstract: doc.abstract}); 34 | } 35 | }); 36 | 37 | $typeahead.typeahead( 38 | { 39 | highlight: true, 40 | minLength: 3, 41 | autoselect: true 42 | }, 43 | { 44 | limit: 10, 45 | display: displayTemplate, 46 | templates: { suggestion: suggestionTemplate }, 47 | source: function(query, sync) { 48 | const lcSearch = query.toLowerCase(); 49 | const results = searchIndex.query(function(q) { 50 | q.term(lcSearch, { boost: 100 }); 51 | q.term(lcSearch, { 52 | boost: 10, 53 | wildcard: lunr.Query.wildcard.TRAILING 54 | }); 55 | }).map(function(result) { 56 | var doc = searchData[result.ref]; 57 | doc.url = result.ref; 58 | return doc; 59 | }); 60 | sync(results); 61 | } 62 | } 63 | ); 64 | $form.removeClass('loading'); 65 | $typeahead.trigger('focus'); 66 | }); 67 | }); 68 | 69 | var baseURL = searchURL.slice(0, -"search.json".length); 70 | 71 | $typeahead.on('typeahead:select', function(e, result) { 72 | window.location = baseURL + result.url; 73 | }); 74 | }); 75 | -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/docs/docsets/AlamofireImage.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/docs/docsets/AlamofireImage.tgz -------------------------------------------------------------------------------- /docs/docsets/AlamofireImage.xml: -------------------------------------------------------------------------------- 1 | 4.3.0https://alamofire.github.io/AlamofireImage/docsets/AlamofireImage.tgz 2 | -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/docs/img/dash.png -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/docs/img/gh.png -------------------------------------------------------------------------------- /docs/img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alamofire/AlamofireImage/25da70a7b8f2f1b8c678be123fda5d9a98fac638/docs/img/spinner.gif -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | // Jazzy - https://github.com/realm/jazzy 2 | // Copyright Realm Inc. 3 | // SPDX-License-Identifier: MIT 4 | 5 | window.jazzy = {'docset': false} 6 | if (typeof window.dash != 'undefined') { 7 | document.documentElement.className += ' dash' 8 | window.jazzy.docset = true 9 | } 10 | if (navigator.userAgent.match(/xcode/i)) { 11 | document.documentElement.className += ' xcode' 12 | window.jazzy.docset = true 13 | } 14 | 15 | function toggleItem($link, $content) { 16 | var animationDuration = 300; 17 | $link.toggleClass('token-open'); 18 | $content.slideToggle(animationDuration); 19 | } 20 | 21 | function itemLinkToContent($link) { 22 | return $link.parent().parent().next(); 23 | } 24 | 25 | // On doc load + hash-change, open any targetted item 26 | function openCurrentItemIfClosed() { 27 | if (window.jazzy.docset) { 28 | return; 29 | } 30 | var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); 31 | $content = itemLinkToContent($link); 32 | if ($content.is(':hidden')) { 33 | toggleItem($link, $content); 34 | } 35 | } 36 | 37 | $(openCurrentItemIfClosed); 38 | $(window).on('hashchange', openCurrentItemIfClosed); 39 | 40 | // On item link ('token') click, toggle its discussion 41 | $('.token').on('click', function(event) { 42 | if (window.jazzy.docset) { 43 | return; 44 | } 45 | var $link = $(this); 46 | toggleItem($link, itemLinkToContent($link)); 47 | 48 | // Keeps the document from jumping to the hash. 49 | var href = $link.attr('href'); 50 | if (history.pushState) { 51 | history.pushState({}, '', href); 52 | } else { 53 | location.hash = href; 54 | } 55 | event.preventDefault(); 56 | }); 57 | 58 | // Clicks on links to the current, closed, item need to open the item 59 | $("a:not('.token')").on('click', function() { 60 | if (location == this.href) { 61 | openCurrentItemIfClosed(); 62 | } 63 | }); 64 | 65 | // KaTeX rendering 66 | if ("katex" in window) { 67 | $($('.math').each( (_, element) => { 68 | katex.render(element.textContent, element, { 69 | displayMode: $(element).hasClass('m-block'), 70 | throwOnError: false, 71 | trust: true 72 | }); 73 | })) 74 | } 75 | -------------------------------------------------------------------------------- /docs/js/jazzy.search.js: -------------------------------------------------------------------------------- 1 | // Jazzy - https://github.com/realm/jazzy 2 | // Copyright Realm Inc. 3 | // SPDX-License-Identifier: MIT 4 | 5 | $(function(){ 6 | var $typeahead = $('[data-typeahead]'); 7 | var $form = $typeahead.parents('form'); 8 | var searchURL = $form.attr('action'); 9 | 10 | function displayTemplate(result) { 11 | return result.name; 12 | } 13 | 14 | function suggestionTemplate(result) { 15 | var t = '
'; 16 | t += '' + result.name + ''; 17 | if (result.parent_name) { 18 | t += '' + result.parent_name + ''; 19 | } 20 | t += '
'; 21 | return t; 22 | } 23 | 24 | $typeahead.one('focus', function() { 25 | $form.addClass('loading'); 26 | 27 | $.getJSON(searchURL).then(function(searchData) { 28 | const searchIndex = lunr(function() { 29 | this.ref('url'); 30 | this.field('name'); 31 | this.field('abstract'); 32 | for (const [url, doc] of Object.entries(searchData)) { 33 | this.add({url: url, name: doc.name, abstract: doc.abstract}); 34 | } 35 | }); 36 | 37 | $typeahead.typeahead( 38 | { 39 | highlight: true, 40 | minLength: 3, 41 | autoselect: true 42 | }, 43 | { 44 | limit: 10, 45 | display: displayTemplate, 46 | templates: { suggestion: suggestionTemplate }, 47 | source: function(query, sync) { 48 | const lcSearch = query.toLowerCase(); 49 | const results = searchIndex.query(function(q) { 50 | q.term(lcSearch, { boost: 100 }); 51 | q.term(lcSearch, { 52 | boost: 10, 53 | wildcard: lunr.Query.wildcard.TRAILING 54 | }); 55 | }).map(function(result) { 56 | var doc = searchData[result.ref]; 57 | doc.url = result.ref; 58 | return doc; 59 | }); 60 | sync(results); 61 | } 62 | } 63 | ); 64 | $form.removeClass('loading'); 65 | $typeahead.trigger('focus'); 66 | }); 67 | }); 68 | 69 | var baseURL = searchURL.slice(0, -"search.json".length); 70 | 71 | $typeahead.on('typeahead:select', function(e, result) { 72 | window.location = baseURL + result.url; 73 | }); 74 | }); 75 | --------------------------------------------------------------------------------