YMAImageAppearance

Objective-C

@interface YMAImageAppearance : NSObject <NSCopying, NSMutableCopying>

Swift

class YMAImageAppearance : NSObject, NSCopying, NSMutableCopying

Class with standard image appearance settings (non-editable). If you want to edit the standard appearance settings, use the YMAMutableImageAppearance class.

  1. Properties
  2. widthConstraint
  3. Methods
  4. +appearanceWithWidthConstraint:

Properties

widthConstraint

Limits the width of the image (YMASizeConstraint).

Declaration

Objective-C

@property (nonatomic, strong, readonly) YMASizeConstraint *_Nonnull widthConstraint;

Swift

var widthConstraint: YMASizeConstraint { get }

Methods

+appearanceWithWidthConstraint:

Creates an object of the YMAImageAppearance class (an image with the specified sizing constraint).

Declaration

Objective-C

+ (nonnull instancetype)appearanceWithWidthConstraint:
    (nonnull YMASizeConstraint *)widthConstraint;

Swift

convenience init(widthConstraint: YMASizeConstraint)

Parameters

widthConstraint

Limits the width of the image (YMASizeConstraint).

widthConstraint

Limits the width of the image (YMASizeConstraint).

Return Value

Configured image appearance.