TMDBImage Class Reference
Inherits from | NSObject |
---|---|
Declared in | TMDBImage.h TMDBImage.m |
Getting Sizes
+ sizeFromString:imageSize:
Returns the width or height of an image size string. If no size is explicitly
specified, such as the original
size, -1
is returned. The dimension, i.e.
either width or height (or original) is put in the outImageSize
parameter.
+ (CGFloat)sizeFromString:(NSString *)s imageSize:(TMDBImageSize *)outImageSize
Return Value
-1
if no valid size could be found, or if it is the original size.
Discussion
Returns the width or height of an image size string. If no size is explicitly
specified, such as the original
size, -1
is returned. The dimension, i.e.
either width or height (or original) is put in the outImageSize
parameter.
Declared In
TMDBImage.h
+ sizeClosestMatchingSize:inSizes:dimension:
Returns the size from sizes
that closest matches the specified size
.
+ (NSString *)sizeClosestMatchingSize:(float)size inSizes:(NSArray *)sizes dimension:(TMDBImageSize)dimension
Parameters
size |
The size in pixels that should be returned in string form. |
---|---|
sizes |
An array of |
dimension |
The dimension (width, height or original) that should be returned. |
Return Value
An NSString
representing the size
in the specified dimension
,
or nil if no such exist.
Discussion
Returns the size from sizes
that closest matches the specified size
.
The size equal to or larger than the specified size
, or if none such exist
the size that matches the closest, is returned.
Declared In
TMDBImage.h