SMIImageAsset

Objective-C

@protocol SMIImageAsset <SMIFileAsset>

Swift

protocol ImageAsset : FileAsset

Represents an image asset.

  • The content of the SMIImageAsset. This is initially nil. You must call fetchContentWithCompletion to retrieve the data from disk.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) UIImage *image;

    Swift

    var image: UIImage? { get }
  • The expected width in pixels of the image. This is available before the image is fetched from disk, and can be used to shape the UI based on the final image data.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat width;

    Swift

    var width: CGFloat { get }
  • The expected height in pixels of the image. This is available before the image is fetched from disk, and can be used to shape the UI based on the final image data.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat height;

    Swift

    var height: CGFloat { get }