Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLImage Class Reference

Section Contents

Overview

Specifies which image shall be used e.g. in SDLAlerts or on SDLSoftbuttons provided the display supports it.

@since SDL 2.0

-initWithName:ofType:

Convenience init for displaying a dynamic image. The image must be uploaded to SDL Core before being displayed.

Objective-C

- (nonnull instancetype)initWithName:(nonnull NSString *)name
                              ofType:(nonnull SDLImageType)imageType;

Swift

init(name: String, ofType imageType: SDLImageType)

Parameters

name

The unique name used to upload the image to SDL Core

imageType

Describes whether the image is static or dynamic

Return Value

A SDLImage object

-initWithName:ofType:isTemplate:

Convenience init for displaying a dynamic image. The image must be uploaded to SDL Core before being displayed.

Objective-C

- (nonnull instancetype)initWithName:(nonnull NSString *)name
                              ofType:(nonnull SDLImageType)imageType
                          isTemplate:(BOOL)isTemplate;

Swift

init(name: String, ofType imageType: SDLImageType, isTemplate: Bool)

Parameters

name

The unique name used to upload the image to SDL Core

imageType

Describes whether the image is static or dynamic

isTemplate

Whether or not the image is a template that can be (re)colored by the SDL HMI. Static images are templates by default.

Return Value

A SDLImage object

-initWithName:

Convenience init for displaying a dynamic image. The image must be uploaded to SDL Core before being displayed.

Objective-C

- (nonnull instancetype)initWithName:(nonnull NSString *)name;

Swift

init(name: String)

Parameters

name

The unique name used to upload the image to SDL Core

Return Value

A SDLImage object

-initWithName:isTemplate:

Convenience init for displaying a dynamic image. The image must be uploaded to SDL Core before being displayed.

Objective-C

- (nonnull instancetype)initWithName:(nonnull NSString *)name
                          isTemplate:(BOOL)isTemplate;

Swift

init(name: String, isTemplate: Bool)

Parameters

name

The unique name used to upload the image to SDL Core

isTemplate

Whether or not the image is a template that can be (re)colored by the SDL HMI

Return Value

A SDLImage object

-initWithStaticImageValue:

Convenience init for displaying a static image. Static images are already on-board SDL Core and can be used by providing the image’s value.

Objective-C

- (nonnull instancetype)initWithStaticImageValue:(UInt16)staticImageValue;

Swift

init(staticImageValue: UInt16)

Parameters

staticImageValue

The image value assigned to the static image

Return Value

A SDLImage object

-initWithStaticIconName:

Convenience init for displaying a static image. Static images are already on-board SDL Core and can be used by providing the image’s value.

Objective-C

- (nonnull instancetype)initWithStaticIconName:
    (nonnull SDLStaticIconName)staticIconName;

Swift

init(staticIconName: SDLStaticIconName)

Parameters

staticIconName

A SDLStaticIconName value

Return Value

A SDLImage object

value

The static hex icon value or the binary image file name identifier (sent by SDLPutFile)

Required, max length = 65535

Objective-C

@property (readwrite, strong, nonatomic) NSString *_Nonnull value;

Swift

var value: String { get set }

imageType

Describes whether the image is static or dynamic

Required

Objective-C

@property (readwrite, strong, nonatomic) SDLImageType _Nonnull imageType;

Swift

var imageType: SDLImageType { get set }

isTemplate

Indicates that this image can be (re)colored by the HMI to best fit the current color scheme.

Objective-C

@property (assign, readwrite, nonatomic) NSNumber<SDLBool> *_Nonnull isTemplate;

Swift

unowned(unsafe) var isTemplate: NSNumber & SDLBool { get set }
View on GitHub.com
Previous Section Next Section