ResourceLoader

public protocol ResourceLoader

You can extend the range of resources and even the way resources are loaded by implementing your own ResourceLoader.

  • Retreives a resource of the specied type from the specified URL. The returned object will be cached

    Declaration

    Swift

    func retrieve<R>(asType: R.Type, from url: URL) throws -> R where R : Loadable

    Parameters

    asType

    The type that the ResourceLoader should retreive

    url

    The URL of the resource