TGURLHandler
@protocol TGURLHandler <NSObject>
A URL Handler interface for creating cancellable asynchronous URL requests.
-
Create an asynchronous download request.
Note
This method will be automatically called by the map view instance.
Declaration
Objective-C
- (NSUInteger)downloadRequestAsync:(nonnull NSURL *)url completionHandler: (nonnull TGDownloadCompletionHandler)completionHandler;Swift
func downloadRequestAsync(_ url: URL, completionHandler: @escaping TGDownloadCompletionHandler) -> UIntParameters
urlThe URL to download.
completionHandlerA handler to be called once the URL request completed.
Return Value
A task identifier that uniquely identifies the URL request within this handler.
-
Cancel a previous download request.
Declaration
Objective-C
- (void)cancelDownloadRequestAsync:(NSUInteger)taskIdentifier;Swift
func cancelDownloadRequestAsync(_ taskIdentifier: UInt)Parameters
taskIdentifierThe task identifier for the request to cancel.
View on GitHub
TGURLHandler Protocol Reference
