Nuke Documentation

Class Image​Decoder​Registry

public final class ImageDecoderRegistry  

A registry of image codecs.

Initializers

init()

public init()  

Properties

shared

public static let shared  

A shared registry.

Methods

decoder(for:​)

public func decoder(for context: ImageDecodingContext) -> ImageDecoding?  

Returns a decoder which matches the given context.

register(_:​)

public func register<Decoder: ImageDecoderRegistering>(_ decoder: Decoder.Type)  

Registers the given decoder.

register(_:​)

public func register(_ match: @escaping (ImageDecodingContext) -> ImageDecoding?)  

Registers a decoder to be used in a given decoding context. The closure is going to be executed before all other already registered closures.

clear()

public func clear()  

Removes all registered decoders.