TTStaticImage
Objective-C
@interface TTStaticImage : NSObject
Swift
class TTStaticImage : NSObject
TomTom Search API main object. Contains methods to use Tomtom’s online static image engine and provides support for both async and sync calls.
-
Initializer with key for the TomTom API Service.
Declaration
Objective-C
- (instancetype _Nonnull)initWithKey:(NSString *_Nonnull)key;Swift
init(key: String)Parameters
keyKey - key needed to operate the service.
-
Static Image with async callback
Declaration
Objective-C
- (void)imageForQuery:(TTStaticImageQuery *_Nonnull)query withAsyncDelegate:(id<TTStaticImageDelegate> _Nonnull)delegate;Swift
func image(for query: TTStaticImageQuery, withAsyncDelegate delegate: TTStaticImageDelegate)Parameters
queryObject containing the data needed to perform a static image.
delegateDelegate that informs the subscriber when a search result is available. It contains a UIImage object.
-
Static Image request with async block
Declaration
Objective-C
- (void)imageForQuery:(TTStaticImageQuery *_Nonnull)query completionHandler: (void (^_Nonnull)(int *_Nullable, int *_Nullable))callbackImage;Swift
func image(for query: TTStaticImageQuery, completionHandler callbackImage: @escaping (UnsafeMutablePointer<Int32>?, UnsafeMutablePointer<Int32>?) -> Void)Parameters
queryObject containing the data needed to perform a static image.
callbackImageCompletionHandler that informs the subscriber when a search result is available. It contains a UIImage object.
-
Cancels the current static image request.
Declaration
Objective-C
- (void)cancel;Swift
func cancel()
TTStaticImage Class Reference