RSDAnimatedImageThemeElementObject

public struct RSDAnimatedImageThemeElementObject : RSDAnimatedImageThemeElement, RSDDecodableBundleInfo, Codable

RSDAnimatedImageThemeElementObject is a Codable concrete implementation of RSDAnimatedImageThemeElement.

  • The list of image names for the images to include in this animation.

    Declaration

    Swift

    public let imageNames: [RSDFileWrapper]
  • The animation duration for the image animation.

    Declaration

    Swift

    public let animationDuration: TimeInterval
  • This is used to set how many times the animation should be repeated where 0 means infinite.

    Declaration

    Swift

    public let animationRepeatCount: Int?
  • The preferred placement of the image.

    Declaration

    Swift

    public let placementType: RSDImagePlacementType?
  • The bundle identifier for the image resource bundle.

    Declaration

    Swift

    public let bundleIdentifier: String?
  • The image size.

    Declaration

    Swift

    public var size: CGSize { get }
  • The unique identifier for the image

    Declaration

    Swift

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

    Declaration

    Swift

    public var factoryBundle: Bundle?
  • Default initializer.

    Declaration

    Swift

    public init(imageNames: [String], animationDuration: TimeInterval, bundleIdentifier: String? = nil, placementType: RSDImagePlacementType? = nil, size: CGSize? = nil, animationRepeatCount: Int = 0)

    Parameters

    imageNames

    The names of the images.

    bundleIdentifier

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

    animationDuration

    The animation duration.

    placementType

    The preferred placement of the image. Default = nil.

    size

    The image size. Default = nil.

  • Available for iOS and tvOS.

    The animated images to display.

    Declaration

    Swift

    public func images(compatibleWith traitCollection: UITraitCollection?) -> [RSDImage]

    Parameters

    traitCollection

    The trait collection.

    Return Value

    The images for this step.

  • The animated images to display.

    Declaration

    Swift

    public func images() -> [RSDImage]

    Return Value

    The images for this step.

  • A method for fetching the image.

    Declaration

    Swift

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

    Parameters

    size

    The size of the image to return.

    callback

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