Kofax Mobile SDK API Reference
Instance Methods | Class Methods | List of all members
kfxImageStorage Class Reference

The image storage interface. More...

#import <kfxImageStorage.h>

Inheritance diagram for kfxImageStorage:

Instance Methods

(void) - setImage:forId:
 This methods allows to add an image to the storage. More...
 
(UIImage *) - getImageForId:
 This method allows to get the image from the storage. More...
 

Class Methods

(kfxImageStorage *) + sharedStorage
 This method allows to obtain image storage instance. More...
 
(NSString *) + generateId
 This methods allows to generate image identifier. More...
 

Detailed Description

The image storage interface.

This abstract singleton class provides the interfaces for image storage. Actual storage type (memory, disk, etc.) may vary depending on the implementation details.

Current implementation provides in-memory storage of maximum capacity 5. Images are poped from the storage in FIFO style - earlier image will be deleted first.

Method Documentation

+ (NSString*) generateId

This methods allows to generate image identifier.

Generates unique string id on each call.

Returns
Generated id.
- (UIImage*) getImageForId: (NSString *)  imageId

This method allows to get the image from the storage.

Image identifier should not be nil.

Parameters
imageIdImage id.
Returns
Returns image if it exists in the storage and nil otherwise.
- (void) setImage: (UIImage *)  image
forId: (NSString *)  imageId 

This methods allows to add an image to the storage.

Image should be provided along with string identifier, which will be used to get the image from the storage. Identifier should not be nil or empty string. If the storage already contains an image with specified id, it will be replaced. If image is nil and an image with imageId exists, it will be removed from the storage. If imageId is nil or empty, image storage will not be changed.

Parameters
imageImage to be stored.
imageIdImage id.
+ (kfxImageStorage*) sharedStorage

This method allows to obtain image storage instance.

This method should be called to get kfxIImageStorage instance.


The documentation for this class was generated from the following file:
Untitled Document © 2018 Kofax, Inc. All rights reserved. Use is subject to license terms.