WTTargetCollectionResource Class Reference
Inherits from | NSObject |
---|---|
Declared in | WTTargetCollectionResource.h |
Overview
Target Collection Resources can either retrieve image targets from a .wtc file or object targets from a .wmc file. The file can be loaded eitherfrom the application bundle or a remote server. If the file was loaded from a server, no internet connection is required anymore after the loading finished successfully.
URL
Specifies the URL that will be used to locate and load the file.
@property (nonatomic, copy, readonly) NSURL *URL
Discussion
Specifies the URL that will be used to locate and load the file.
Declared In
WTTargetCollectionResource.h
loading
Specifies if the target collection resource is currently loading the file, or if it already finished (successfully or not)
@property (nonatomic, assign, readonly) BOOL loading
Discussion
Specifies if the target collection resource is currently loading the file, or if it already finished (successfully or not)
Declared In
WTTargetCollectionResource.h
– load:
Use this method to start the actual loading process of the resource.
- (void)load:(WTTargetCollectionResourceCompletionHandler)completionHandler
Parameters
completionHandler |
A completion handler that is called in case the resource is available or failed loading. |
---|
Discussion
This method either loads a local resource or starts a network connection to a server to download the resource, specified by URL.
The loading process happens on a background thread
Declared In
WTTargetCollectionResource.h
– cancel
Causes the target collection resource to cancel any ongoing loading operation.
- (void)cancel
Discussion
Cancel should only be called when the target collection resource is actively loading a file. Callind cancel after the loading operation finished has no effect.
Declared In
WTTargetCollectionResource.h