Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLImage

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: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: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 (nonatomic, strong) NSString *_Nonnull value;

Swift

var value: String { get set }

imageType

Describes whether the image is static or dynamic

Required

Objective-C

@property (nonatomic, strong) 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 (nonatomic) NSNumber<SDLBool> *_Nonnull isTemplate;

Swift

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