Inherits from SCField : NSObject
Declared in SCImageField.h

Overview

The SCImageField object identifies a Sitecore system item’s image field.
The field with [SCField type] is equal to “Image” has the SCImageField type.

It provides a getter for the image path and an asynchronous loader for the image with this path.

Tasks

Properties

fieldValue

The value of the field. [SCImageField fieldValue] is UIImage object. It is nil by default, so use [SCImageField readFieldValueOperation] to load UIImage of this field.

@property (nonatomic, readonly) id fieldValue

Discussion

The value of the field. [SCImageField fieldValue] is UIImage object. It is nil by default, so use [SCImageField readFieldValueOperation] to load UIImage of this field.

Declared In

SCImageField.h

imagePath

The path to the Sitecore media item’s image. Can be used to read an image, see [SCApiSession downloadResourceOperationForMediaPath:] or [SCImageField readFieldValueOperation]

@property (nonatomic) NSString *imagePath

Discussion

The path to the Sitecore media item’s image. Can be used to read an image, see [SCApiSession downloadResourceOperationForMediaPath:] or [SCImageField readFieldValueOperation]

Declared In

SCImageField.h

Instance Methods

readFieldValueOperation

Used for loading the field value which is a UIImage object. The image is taken for the same database and language the item has. If you need other image source, please consider [SCImageField readFieldValueOperationWithImageParams:] method.

- (SCAsyncOp)readFieldValueOperation

Return Value

SCAsyncOp block. Call it to get the expected result. The SCAsyncOpResult handler’s result is UIImage object or nil if error happens.

Discussion

Used for loading the field value which is a UIImage object. The image is taken for the same database and language the item has. If you need other image source, please consider [SCImageField readFieldValueOperationWithImageParams:] method.

Declared In

SCImageField.h

readFieldValueOperationWithImageParams:

Used for loading the field value which is a UIImage object with additional parameters.

- (SCAsyncOp)readFieldValueOperationWithImageParams:(SCDownloadMediaOptions *)params

Parameters

params

Options to process the media file before sending from the back end. The most frequent usage is resizing images to reduce the download size.
See SCDownloadMediaOptions class reference for details. You can also specify the database and language of the item to download.

Return Value

SCAsyncOp block. Call it to get the expected result. The SCAsyncOpResult handler’s result is UIImage object or nil if error happens.

Discussion

Used for loading the field value which is a UIImage object with additional parameters.

Declared In

SCImageField.h