MediaItem

public struct MediaItem : CustomStringConvertible, Equatable

A MediaItem holds the network url and aspectRatio of an image attached to a Tweet.

MediaItems are created automatically when a Tweet object is created.

You will only need to use the public properties.

  • url

    The URL where the image can be found

    Declaration

    Swift

    public let url: URL
  • The Aspect Ratio = Width/Height of the image

    Declaration

    Swift

    public let aspectRatio: Double
  • Text description of MediaItem

    Declaration

    Swift

    public var description: String { get }