UNICORN - iOS
実体メソッド | プロパティ | 全メンバ一覧
UIImageView(Haneke) カテゴリ

実体メソッド

(void) - hnk_setImageFromFile:
 
(void) - hnk_setImageFromFile:placeholderImage:
 
(void) - hnk_setImageFromFile:success:failure:
 
(void) - hnk_setImageFromFile:placeholderImage:success:failure:
 
(void) - hnk_setImageFromURL:
 
(void) - hnk_setImageFromURL:placeholderImage:
 
(void) - hnk_setImageFromURL:success:failure:
 
(void) - hnk_setImageFromURL:placeholderImage:success:failure:
 
(void) - hnk_setImage:withKey:
 
(void) - hnk_setImage:withKey:placeholderImage:
 
(void) - hnk_setImage:withKey:success:failure:
 
(void) - hnk_setImage:withKey:placeholderImage:success:failure:
 
(void) - hnk_setImageFromEntity:
 
(void) - hnk_setImageFromEntity:placeholderImage:
 
(void) - hnk_setImageFromEntity:success:failure:
 
(void) - hnk_setImageFromEntity:placeholderImage:success:failure:
 
(void) - hnk_cancelImageRequest
 

プロパティ

HNKCacheFormathnk_cacheFormat
 

メソッド詳解

- (void) hnk_cancelImageRequest

Cancels the current image request, if any. It is recommended to call this from [UITableViewCell prepareForReuse] or [UICollectionViewCell prepareForReuse], or as soon as you don't need the image view anymore.

- (void) hnk_setImage: (UIImage*)  image
withKey: (NSString*)  key 

Resizes, displays and caches an appropiately sized image from the given image.

引数
imageOriginal image.
keyA key. Used by the cache to uniquely identify an image.
参照
- hnk_setImage:withKey:placeholderImage:success:failure:
- (void) hnk_setImage: (UIImage*)  image
withKey: (NSString*)  key
placeholderImage: (UIImage*)  placeholderImage 

Resizes, displays and caches an appropiately sized image from the given image.

引数
imageOriginal image.
keyA key. Used by the cache to uniquely identify an image.
placeholderImageImage to be used as a placeholder until the requested image is ready. The placeholder image will only be used if the requested image is not available in the memory cache. If nil, the image view will not change its image until the requested image is ready.
参照
- hnk_setImage:withKey:placeholderImage:success:failure:
- (void) hnk_setImage: (UIImage*)  image
withKey: (NSString*)  key
placeholderImage: (UIImage*)  placeholderImage
success: (void(^)(UIImage *image))  successBlock
failure: (void(^)(NSError *error))  failureBlock 

Resizes, displays and caches an appropiately sized image from the given image. If a success block is provided you will be responsible for setting the image.

引数
imageOriginal image.
keyA key. Used by the cache to uniquely identify an image.
placeholderImageImage to be used as a placeholder until the requested image is ready. The placeholder image will only be used if the requested image is not available in the memory cache. If nil, the image view will not change its image until the requested image is ready.
successBlockBlock to be called when the requested image is ready to be set. If provided, the block is reponsible for setting the image. Can be nil.
failureBlockBlock to be called if an error occurs. The most likely cause of error is that the given path does not contain an image. Can be nil. Retrieves an appropiately sized image (based on the bounds and contentMode of the UIImageView) from the memory or disk cache. Disk access is performed in background. If not cached, loads the original image from the given url, produces an appropiately sized image and caches the result, everything in background. If no success block is provided, the requested image will be set with a short fade transition, or synchronously and without transition when retrieved from the memory cache. If needed, the least recently used images in the cache will be evicted in background.
警告
If a success block is provided you will be responsible for setting the image.
- (void) hnk_setImage: (UIImage*)  image
withKey: (NSString*)  key
success: (void(^)(UIImage *image))  successBlock
failure: (void(^)(NSError *error))  failureBlock 

Resizes, displays and caches an appropiately sized image from the given image. If a success block is provided you will be responsible for setting the image.

引数
imageOriginal image.
keyA key. Used by the cache to uniquely identify an image.
successBlockBlock to be called when the requested image is ready to be set. If provided, the block is reponsible for setting the image. Can be nil.
failureBlockBlock to be called if an error occurs. The most likely cause of error is that the given path does not contain an image. Can be nil.
警告
If a success block is provided you will be responsible for setting the image.
参照
- hnk_setImage:withKey:placeholderImage:success:failure:
- (void) hnk_setImageFromEntity: (id<HNKCacheEntity>)  entity

Loads, resizes, displays and caches an appropiately sized image from the given entity.

引数
entityEntity from which the original image will be retrieved if needed. The entity will have to provide the original image or its data only if it can't be found in the cache.
参照
- hnk_setImageFromEntity:placeholderImage:success:failure:
- (void) hnk_setImageFromEntity: (id<HNKCacheEntity>)  entity
placeholderImage: (UIImage*)  placeholderImage 

Loads, resizes, displays and caches an appropiately sized image from the given entity.

引数
entityEntity from which the original image will be retrieved if needed. The entity will have to provide the original image or its data only if it can't be found in the cache.
placeholderImageImage to be used as a placeholder until the requested image is ready. The placeholder image will only be used if the requested image is not available in the memory cache. If nil, the image view will not change its image until the requested image is ready.
参照
- hnk_setImageFromEntity:placeholderImage:success:failure:
- (void) hnk_setImageFromEntity: (id<HNKCacheEntity>)  entity
placeholderImage: (UIImage*)  placeholderImage
success: (void(^)(UIImage *image))  successBlock
failure: (void(^)(NSError *error))  failureBlock 

Loads, resizes, displays and caches an appropiately sized image from the given entity. If a success block is provided you will be responsible for setting the image.

引数
entityEntity from which the original image will be retrieved if needed. The entity will have to provide the original image or its data only if it can't be found in the cache.
placeholderImageImage to be used as a placeholder until the requested image is ready. The placeholder image will only be used if the requested image is not available in the memory cache. If nil, the image view will not change its image until the requested image is ready.
successBlockBlock to be called when the requested image is ready to be set. If provided, the block is reponsible for setting the image. Can be nil.
failureBlockBlock to be called if an error occurs. The most likely cause of error is that the given path does not contain an image. Can be nil. Retrieves an appropiately sized image (based on the bounds and contentMode of the UIImageView) from the memory or disk cache. Disk access is performed in background. If not cached, loads the original image from the given url, produces an appropiately sized image and caches the result, everything in background. If no success block is provided, the requested image will be set with a short fade transition, or synchronously and without transition when retrieved from the memory cache. If needed, the least recently used images in the cache will be evicted in background.
警告
If a success block is provided you will be responsible for setting the image.
- (void) hnk_setImageFromEntity: (id<HNKCacheEntity>)  entity
success: (void(^)(UIImage *image))  successBlock
failure: (void(^)(NSError *error))  failureBlock 

Loads, resizes, displays and caches an appropiately sized image from the given entity. If a success block is provided you will be responsible for setting the image.

引数
entityEntity from which the original image will be retrieved if needed. The entity will have to provide the original image or its data only if it can't be found in the cache.
successBlockBlock to be called when the requested image is ready to be set. If provided, the block is reponsible for setting the image. Can be nil.
failureBlockBlock to be called if an error occurs. The most likely cause of error is that the given path does not contain an image. Can be nil.
警告
If a success block is provided you will be responsible for setting the image.
参照
- hnk_setImageFromEntity:placeholderImage:success:failure:
- (void) hnk_setImageFromFile: (NSString*)  path

Loads, resizes, displays and caches an appropiately sized image from the given path.

引数
pathPath from which the image will be loaded if it's not available in the cache.
参照
- hnk_setImageFromFile:placeholderImage:success:failure:
- (void) hnk_setImageFromFile: (NSString*)  path
placeholderImage: (UIImage*)  placeholderImage 

Loads, resizes, displays and caches an appropiately sized image from the given path.

引数
pathPath from which the image will be loaded if it's not available in the cache.
placeholderImageImage to be used as a placeholder until the requested image is ready. The placeholder image will only be used if the requested image is not available in the memory cache. If nil, the image view will not change its image until the requested image is ready.
参照
- hnk_setImageFromFile:placeholderImage:success:failure:
- (void) hnk_setImageFromFile: (NSString*)  path
placeholderImage: (UIImage*)  placeholderImage
success: (void(^)(UIImage *image))  successBlock
failure: (void(^)(NSError *error))  failureBlock 

Loads, resizes, displays and caches an appropiately sized image from the given path. If a success block is provided you will be responsible for setting the image.

引数
pathPath from which the image will be loaded if it's not available in the cache.
placeholderImageImage to be used as a placeholder until the requested image is ready. The placeholder image will only be used if the requested image is not available in the memory cache. If nil, the image view will not change its image until the requested image is ready.
successBlockBlock to be called when the requested image is ready to be set. If provided, the block is reponsible for setting the image. Can be nil.
failureBlockBlock to be called if an error occurs. The most likely cause of error is that the given path does not contain an image. Can be nil. Retrieves an appropiately sized image (based on the bounds and contentMode of the UIImageView) from the memory or disk cache. Disk access is performed in background. If not cached, loads the original image from disk, produces an appropiately sized image and caches the result, everything in background. If no success block is provided, the requested image will be set with a short fade transition, or synchronously and without transition when retrieved from the memory cache. If needed, the least recently used images in the cache will be evicted in background. If the success block is nil, the image will be set with a short fade transition, or inmmediatly if the image was retrieved from the memory cache.
警告
If a success block is provided you will be responsible for setting the image.
- (void) hnk_setImageFromFile: (NSString *)  path
success: (void(^)(UIImage *image))  successBlock
failure: (void(^)(NSError *error))  failureBlock 

Loads, resizes, displays and caches an appropiately sized image from the given path. If a success block is provided you will be responsible for setting the image.

引数
pathPath from which the image will be loaded if it's not available in the cache.
successBlockBlock to be called when the requested image is ready to be set. If provided, the block is reponsible for setting the image. Can be nil.
failureBlockBlock to be called if an error occurs. The most likely cause of error is that the given path does not contain an image. Can be nil.
警告
If a success block is provided you will be responsible for setting the image.
参照
- hnk_setImageFromFile:placeholderImage:success:failure:
- (void) hnk_setImageFromURL: (NSURL*)  url

Loads, resizes, displays and caches an appropiately sized image from the given url.

引数
urlUrl from which the image will be loaded if it's not available in the cache.
参照
- hnk_setImageFromURL:placeholderImage:success:failure:
- (void) hnk_setImageFromURL: (NSURL*)  url
placeholderImage: (UIImage*)  placeholderImage 

Loads, resizes, displays and caches an appropiately sized image from the given url.

引数
urlUrl from which the image will be loaded if it's not available in the cache.
placeholderImageImage to be used as a placeholder until the requested image is ready. The placeholder image will only be used if the requested image is not available in the memory cache. If nil, the image view will not change its image until the requested image is ready.
参照
- hnk_setImageFromURL:placeholderImage:success:failure:
- (void) hnk_setImageFromURL: (NSURL*)  url
placeholderImage: (UIImage*)  placeholderImage
success: (void(^)(UIImage *image))  successBlock
failure: (void(^)(NSError *error))  failureBlock 

Loads, resizes, displays and caches an appropiately sized image from the given url. If a success block is provided you will be responsible for setting the image.

引数
urlUrl from which the image will be loaded if it's not available in the cache.
placeholderImageImage to be used as a placeholder until the requested image is ready. The placeholder image will only be used if the requested image is not available in the memory cache. If nil, the image view will not change its image until the requested image is ready.
successBlockBlock to be called when the requested image is ready to be set. If provided, the block is reponsible for setting the image. Can be nil.
failureBlockBlock to be called if an error occurs. The most likely cause of error is that the given path does not contain an image. Can be nil. Retrieves an appropiately sized image (based on the bounds and contentMode of the UIImageView) from the memory or disk cache. Disk access is performed in background. If not cached, loads the original image from the given url, produces an appropiately sized image and caches the result, everything in background. If no success block is provided, the requested image will be set with a short fade transition, or synchronously and without transition when retrieved from the memory cache. If needed, the least recently used images in the cache will be evicted in background.
警告
If a success block is provided you will be responsible for setting the image.
- (void) hnk_setImageFromURL: (NSURL*)  url
success: (void(^)(UIImage *image))  successBlock
failure: (void(^)(NSError *error))  failureBlock 

Loads, resizes, displays and caches an appropiately sized image from the given url. If a success block is provided you will be responsible for setting the image.

引数
urlUrl from which the image will be loaded if it's not available in the cache.
successBlockBlock to be called when the requested image is ready to be set. If provided, the block is reponsible for setting the image. Can be nil.
failureBlockBlock to be called if an error occurs. The most likely cause of error is that the given path does not contain an image. Can be nil.
警告
If a success block is provided you will be responsible for setting the image.
参照
- hnk_setImageFromURL:placeholderImage:success:failure:

プロパティ詳解

- (HNKCacheFormat *) hnk_cacheFormat
readwritenonatomicstrong

The cache format used by the image view. Each image view has a default format created on demand. The default format size matches the bounds of the image view and will scale images based on the contentMode of the the image view. Modifying the default format is discouraged. Instead, you can set your own custom format. To apply the same custom format to various image views you must use the same format instance.


このカテゴリ詳解は次のファイルから抽出されました: