Asks the delegate if it wants to load the requested resource.
- iOS 6.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
The resource loader object that is making the request.
The loading request object that contains information about the requested resource.
true if your delegate can load the resource specified by the
loading parameter or
false if it cannot.
The resource loader object calls this method when assistance is required of your code to load the specified resource. For example, the resource loader might call this method to load decryption keys that have been specified using a custom URL scheme.
true from this method, implies only that the receiver will load, or at least attempt to load, the resource. In some implementations, the actual work of loading the resource might be initiated on another thread, running asynchronously to the resource loading delegate; whether the work begins immediately or merely soon is an implementation detail of the client application.
You can load the resource synchronously or asynchronously. In both cases, you must indicate success or failure of the operation by calling the
finish method of the request object when you finish. If you load the resource asynchronously, you must also store a strong reference to the object in the
loading parameter before returning from this method.
If you return
false from this method, the resource loader treats the loading of the resource as having failed.