ImageMedia
@interface ImageMedia : VoucherMedia
ImageMedia is a VouchrMedia for photos and animated photos.
-
Data representation of the
ImageMedia. This can be used for caching or to save the data of a photo before it has been uploaded.Declaration
Objective-C
@property (assign, readwrite, nonatomic, nullable) NSData *imageData;Swift
var imageData: Data? { get set } -
Whether the photo is animated.
Declaration
Objective-C
@property (readonly, nonatomic) BOOL animated;Swift
var animated: Bool { get } -
The width of the photo in pixels.
Declaration
Objective-C
@property (readonly, nonatomic) float width;Swift
var width: Float { get } -
The height of the photo in pixels.
Declaration
Objective-C
@property (readonly, nonatomic) float height;Swift
var height: Float { get } -
Default initializer for
ImageMedia.Declaration
Objective-C
+ (nonnull instancetype)imageMediaWithId:(NSInteger)mediaId data:(nullable NSData *)imageData animated:(BOOL)animated width:(float)width height:(float)height;Swift
convenience init(id mediaId: Int, data imageData: Data?, animated: Bool, width: Float, height: Float)Parameters
mediaId- The id of the media item.
imageData- Data representation of the image.
animated- Whether the photo is animated.
width- The width of the photo.
height- The height of the photo.
Return Value
Instance of
ImageMedia.
View on GitHub
ImageMedia Class Reference