All Projects → jinSasaki → Vulcan

jinSasaki / Vulcan

Licence: mit
Multi image downloader with priority in Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Vulcan

Sdwebimage
Asynchronous image downloader with cache support as a UIImageView category
Stars: ✭ 23,928 (+8122.68%)
Mutual labels:  webp, image, cocoapods, carthage
Simpleimageviewer
A snappy image viewer with zoom and interactive dismissal transition.
Stars: ✭ 408 (+40.21%)
Mutual labels:  image, cocoapods, carthage
Maplebacon
🍁🥓 Lightweight and fast Swift library for image downloading, caching and transformations
Stars: ✭ 322 (+10.65%)
Mutual labels:  image, cocoapods, carthage
Sdwebimageflplugin
A SDWebImage plugin to support GIF using FLAnimatedImage and category
Stars: ✭ 16 (-94.5%)
Mutual labels:  image, cocoapods, carthage
Agrume
🍋 A lemony fresh iOS image viewer written in Swift.
Stars: ✭ 449 (+54.3%)
Mutual labels:  image, cocoapods, carthage
Sdwebimagewebpcoder
A WebP coder plugin for SDWebImage, use libwebp
Stars: ✭ 101 (-65.29%)
Mutual labels:  webp, cocoapods, carthage
Progress.swift
⌛️ Add beautiful progress bars to your loops.
Stars: ✭ 265 (-8.93%)
Mutual labels:  cocoapods, carthage
Webp
WebP decoder and encoder for Go (Zero Dependencies).
Stars: ✭ 270 (-7.22%)
Mutual labels:  webp, image
Passwordtextfield
A custom TextField with a switchable icon which shows or hides the password and enforce good password policies
Stars: ✭ 281 (-3.44%)
Mutual labels:  cocoapods, carthage
Xcode One Dark
Atom One Dark theme for Xcode
Stars: ✭ 273 (-6.19%)
Mutual labels:  cocoapods, carthage
Corestore
Unleashing the real power of Core Data with the elegance and safety of Swift
Stars: ✭ 3,254 (+1018.21%)
Mutual labels:  cocoapods, carthage
Ribbon
🎀 A simple cross-platform toolbar/custom input accessory view library for iOS & macOS.
Stars: ✭ 273 (-6.19%)
Mutual labels:  cocoapods, carthage
Swiftprogresshud
📦 SwiftProgressHUD is a user-friendly pure swift HUD. 支持Cocoapods 及 Carthage
Stars: ✭ 290 (-0.34%)
Mutual labels:  cocoapods, carthage
Serpent
A protocol to serialize Swift structs and classes for encoding and decoding.
Stars: ✭ 281 (-3.44%)
Mutual labels:  cocoapods, carthage
Yoshi
A convenient wrapper around the UI code that is often needed for displaying debug menus.
Stars: ✭ 263 (-9.62%)
Mutual labels:  cocoapods, carthage
Audioindicatorbars
AIB indicates for your app users which audio is playing. Just like the Podcasts app.
Stars: ✭ 279 (-4.12%)
Mutual labels:  cocoapods, carthage
Uxmpdfkit
An iOS PDF viewer and annotator written in Swift that can be embedded into any application.
Stars: ✭ 260 (-10.65%)
Mutual labels:  cocoapods, carthage
Ezswiftextensions
😏 How Swift standard types and classes were supposed to work.
Stars: ✭ 2,911 (+900.34%)
Mutual labels:  cocoapods, carthage
Faceaware
An extension that gives UIImageView the ability to focus on faces within an image.
Stars: ✭ 3,004 (+932.3%)
Mutual labels:  cocoapods, carthage
Animoji
Animoji Generator 🦊
Stars: ✭ 277 (-4.81%)
Mutual labels:  cocoapods, carthage

Vulcan

Build Status Carthage compatible Version Platform

Multi image downloader with priority in Swift

Features

  • Very light
  • Multi image download with priority
  • Caching images
  • Pure Swift
  • Composable image
  • Support WebP
Single download Multi download with priority
demo_01 demo_02

Installation

CocoaPods

Setup CocoaPods:

$ gem install cocoapods

CocoaPods 1.1.0+ is required to build Vulcan

Podfile

platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
pod 'Vulcan'
end

Then, run the following command:

$ pod install

Carthage

Setup carthage:

$ brew update
$ brew install carthage

Cartfile

github "jinSasaki/Vulcan"

Usage

Image downloading and show

import Vulcan

// Single downloading
imageView.vl.setImage(url: URL(string: "/path/to/image")!)

// Multi downloading
// This image will be overridden by the image of higher priority URL.
imageView.vl.setImage(urls: [
    .url(URL(string: "/path/to/image")!, priority: 100),
    .url(URL(string: "/path/to/image")!, priority: 1000)
    ])

WebP image

If you installed via CocoaPods, add pod 'Vulcan/WebP'. If you installed via Carthage, add SwiftWebP.framework to project.

import Vulcan
import SwiftWebP // Only installed via Carthage

extension WebPDecoder: ImageDecoder {
    public func decode(data: Data, response: HTTPURLResponse, options: ImageDecodeOptions?) throws -> Image {
        let contentTypes = response.allHeaderFields.filter({ ($0.key as? String ?? "").lowercased() == "content-type" })
        guard
            let contentType = contentTypes.first,
            let value = contentType.value as? String,
            value == "image/webp",
            let image = WebPDecoder.decode(data) else {
                return try DefaultImageDecoder().decode(data: data, response: response, options: options)
        }
        return image
    }
}

// Set decoder to shared ImageDownloader
Vulcan.defaultImageDownloader.decoder = WebPDecoder()

// Request image with URL
imageView.vl.setImage(url: URL(string: "/path/to/image")!)

Requirements

  • iOS 9.0+
  • Xcode 8.1+
  • Swift 3.0.1+
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].