Instance Method

statusOfValue(forKey:error:)

Returns a status indicating whether the value for a given key is immediately available without blocking the calling thread.

Required.

Declaration

func statusOfValue(forKey key: String, error outError: NSErrorPointer) -> AVKeyValueStatus

Parameters

key

The key whose status you want. See AVKeyValueStatus for the defined keys.

outError

If the status of the value for the key is AVKeyValueStatus.failed, the outError is set to a valid NSError object that describes the nature of the failure that occurred.

Return Value

The current loading status of the value for key. See AVKeyValueStatus for the defined keys.

Discussion

You use this method to determine the availability of the value for a key. This method does not cause an asset to load the value of a key that’s not yet available. To request values for keys that may not already be loaded without blocking, use loadValuesAsynchronously(forKeys:completionHandler:) and wait for invocation of the completion handler to be informed of availability.

See Also

Loading Assets by Key

func loadValuesAsynchronously(forKeys: [String], completionHandler: (() -> Void)?)

Tells the asset to load the values of all of the specified keys (property names) that are not already loaded.

Required.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software