UNICORN - iOS
|
#import <HNKCache.h>
実体メソッド | |
(id) | - initWithName: |
(UIImage *) | - resizedImageFromImage: |
プロパティ | |
BOOL | allowUpscaling |
CGFloat | compressionQuality |
NSString * | name |
CGSize | size |
HNKScaleMode | scaleMode |
unsigned long long | diskCapacity |
unsigned long long | diskSize |
HNKPreloadPolicy | preloadPolicy |
UIImage *(^ | preResizeBlock )(NSString *key, UIImage *image) |
UIImage *(^ | postResizeBlock )(NSString *key, UIImage *image) |
Image cache format. Defines the transformation applied to images as well as cache policies such as disk capacity.
- (id) initWithName: | (NSString*) | name |
Initializes a format with the given name.
name | Name of the format. |
- (UIImage *) resizedImageFromImage: | (UIImage*) | image |
Resized the given image based on the format. Used by the cache to create its images.
image | Image to resize. |
|
readwritenonatomicassign |
Allow upscalling. Images smaller than the format size will be upscaled if set to YES. NO by default. Has no effect if the scale mode is HNKScaleModeNone.
|
readwritenonatomicassign |
The quality of the resulting JPEG image, expressed as a value from 0.0 to 1.0. The value 0.0 represents the maximum compression (or lowest quality) while the value 1.0 represents the least compression (or best quality). 1.0 by default. Only affects opaque images.
|
readwritenonatomicassign |
The disk cache capacity for the format. If 0 Haneke will only use memory cache. 0 by default.
|
readnonatomicassign |
Current size in bytes of the disk cache used by the format.
|
readnonatomicassign |
Format name. Used by Haneke as the format subdirectory name in the disk cache and to uniquely identify the disk queue of the format. Avoid special characters.
|
readwritenonatomiccopy |
Block to be called after an image is resized. The returned image will be used by the cache. nil by default.
|
readwritenonatomicassign |
Preload policy. If set, Haneke will add some or all images cached on disk to the memory cache. HNKPreloadPolicyNone by default.
|
readwritenonatomiccopy |
Block to be called before an image is resized. The returned image will be resized. nil by default.
|
readwritenonatomicassign |
Format scale mode. Determines if images will fit or fill the format size or not. HNKScaleModeFill by default.
|
readwritenonatomicassign |
Format image size. Images will be scaled to fit or fill this size or ignore it based on scaleMode. Has no effect if the scale mode is HNKScaleModeNone.