RSDFetchableImageThemeElementObject

public struct RSDFetchableImageThemeElementObject : RSDFetchableImageThemeElement, RSDDecodableBundleInfo, Codable

RSDFetchableImageThemeElementObject is a Codable concrete implementation of RSDFetchableImageThemeElement.

  • The name of the image.

    Declaration

    Swift

    public let imageName: RSDFileWrapper
  • The bundle identifier for the image resource bundle.

    Declaration

    Swift

    public let bundleIdentifier: String?
  • The preferred placement of the image. Default placement is iconBefore if undefined.

    Declaration

    Swift

    public let placementType: RSDImagePlacementType?
  • The image size. If undefined then default sizing will be used.

    Declaration

    Swift

    public var size: CGSize { get }
  • The default bundle from the factory used to decode this object.

    Declaration

    Swift

    public var factoryBundle: Bundle?
  • The unique identifier for the image

    Declaration

    Swift

    public var imageIdentifier: String { get }
  • Default initializer.

    Declaration

    Swift

    public init(imageName: String, bundleIdentifier: String? = nil, placementType: RSDImagePlacementType? = nil, size: CGSize? = nil)

    Parameters

    imageName

    The name of the image.

    bundleIdentifier

    The bundle identifier for the image resource bundle. Default = nil.

    placementType

    The preferred placement of the image. Default = nil.

    size

    The image size. Default = nil.

  • A method for fetching the image.

    Declaration

    Swift

    public func fetchImage(for size: CGSize, callback: @escaping ((String?, RSDImage?) -> Void))

    Parameters

    size

    The size of the image to return.

    callback

    The callback with the image, run on the main thread.