Documentation Language: Swift

Method

getResource(uri:)

Gets a resource by its URI, loading it if necessary.

func getResource(uri: String) -> Resource?

Parameters

uri

The URI of the resource to retrieve.

Return Value

The resource, or nil if it cannot be found or loaded.

Discussion

If the resource doesn’t exist in the set, attempts to load it using registered resource factories. If no factory can handle the URI, returns nil.