Inherits from NSObject
Conforms to NSCoding
Declared in TWTRMediaEntitySize.h

Properties

name

The name of the size. ‘large’, ‘medium’, etc.

@property (nonatomic, copy, readonly) NSString *name

Declared In

TWTRMediaEntitySize.h

resizingMode

Resize mode of the image size e.g. Fit, Crop.

@property (nonatomic, readonly) TWTRMediaEntitySizeResizingMode resizingMode

Declared In

TWTRMediaEntitySize.h

size

The actual size.

@property (nonatomic, readonly) CGSize size

Declared In

TWTRMediaEntitySize.h

Class Methods

mediaEntitySizesWithJSONDictionary:

Returns a dictionary of valid TWTRMediaEntitySize instances from the Twitter API response for media sizes.

+ (NSDictionary *)mediaEntitySizesWithJSONDictionary:(NSDictionary *)dictionary

Parameters

dictionary

A parsed dictionary of media sizes from the Twitter API response

Return Value

Dictionary of parsed TWTRMediaEntitySize instances keyed by size name.

Declared In

TWTRMediaEntitySize.h

Instance Methods

init

- (instancetype)init

initWithName:resizingMode:size:

Designated initializer.

- (instancetype)initWithName:(NSString *)name resizingMode:(TWTRMediaEntitySizeResizingMode)resizingMode size:(CGSize)size

Parameters

name

The name of the size. If nil will default to the empty string.

resizingMode

The resizing mode of this entity size.

size

The size of the entity.

Declared In

TWTRMediaEntitySize.h

isEqualToMediaEntitySize:

- (BOOL)isEqualToMediaEntitySize:(TWTRMediaEntitySize *)otherSize