TKMedium

@interface TKMedium : NSObject

Entity preserving information about a remote displayable Medium, f.e. an Image or a Video.

  • ID

    Global identifier.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull ID;

    Swift

    var ID: String { get }
  • Medium type.

    Declaration

    Objective-C

    @property (readonly, atomic) TKMediumType type;

    Swift

    var type: TKMediumType { get }
  • Medium suitability.

    Declaration

    Objective-C

    @property (readonly, atomic) TKMediumSuitability suitability;

    Swift

    var suitability: TKMediumSuitability { get }
  • Medium width, if available.

    Declaration

    Objective-C

    @property (readonly, atomic) CGFloat width;

    Swift

    var width: CGFloat { get }
  • Medium height, if available.

    Declaration

    Objective-C

    @property (readonly, atomic) CGFloat height;

    Swift

    var height: CGFloat { get }
  • Medium title.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *title;

    Swift

    var title: String? { get }
  • Medium author, usually full name or similar.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *author;

    Swift

    var author: String? { get }
  • Medium provider.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *provider;

    Swift

    var provider: String? { get }
  • Medium license name.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *license;

    Swift

    var license: String? { get }
  • URL

    Medium source URL.

    Note

    Use this url in -displayableImageURLForSize: to get standard size image.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSURL *URL;

    Swift

    var url: URL? { get }
  • Medium source Preview URL.

    Note

    Use this url in -displayableImageURLForSize: to get smaller size image for preview.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSURL *previewURL;

    Swift

    var previewURL: URL? { get }
  • URL for the original source of the image.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSURL *originURL;

    Swift

    var originURL: URL? { get }
  • URL link to a Medium author.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSURL *authorURL;

    Swift

    var authorURL: URL? { get }
  • External ID of the Medium.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *externalID;

    Swift

    var externalID: String? { get }
  • Method for getting an URL to a Medium image with a given size.

    Declaration

    Objective-C

    - (nullable NSURL *)displayableImageURLForSize:(CGSize)size;

    Swift

    func displayableImageURL(for size: CGSize) -> URL?

    Parameters

    size

    Desired size of the image.

    Return Value

    URL for loading the resized image.