NGridImageTextCell Class Reference

Inherits from NGridTextCell : NGridDecoratedCell : NGridCell : UIView
Declared in NGridImageTextCell.h

Overview

The NGridImageTextCell class provides cell with the text and/or images. See NGridTextCell for text setup. Text is laid out in parts of the cell not taken by the images.

– addImage:outputSize:alignment:zPosition:margin:key:

Adds the image, scaled to specified size, aligned in the cell and spaced from the border and the text. Image is identified internally by the key. Putting two images with the same key leaves only the last one.

- (void)addImage:(UIImage *)image outputSize:(CGSize)size alignment:(NGridImageAlignment)alignment zPosition:(NGridImageZOrder)zPosition margin:(CGFloat)margin key:(NSObject<NSCopying> *)key

Parameters

image

Image to put into the cell.

size

Size of the image in the cell.

alignment

Alignment of the image in the cell.

zPosition

Z position of the image in the cell.

margin

Margin width of the image in pixels.

key

Key of the image.

Declared In

NGridImageTextCell.h

– addImage:outputSize:alignment:zPosition:leftMargin:rightMargin:topMargin:bottomMargin:key:

Adds the image, scaled to the specified size, aligned in the cell and spaced from the border and the text. Image is identified internally by the key. Putting two images with the same key leaves only last one.

- (void)addImage:(UIImage *)image outputSize:(CGSize)size alignment:(NGridImageAlignment)alignment zPosition:(NGridImageZOrder)zPosition leftMargin:(CGFloat)leftMargin rightMargin:(CGFloat)rightMargin topMargin:(CGFloat)topMargin bottomMargin:(CGFloat)bottomMargin key:(NSObject<NSCopying> *)key

Parameters

image

Image to put into the cell.

size

Size of the image in the cell.

alignment

Alignment of the image in the cell.

zPosition

Z position of the image in the cell.

leftMargin

Width of the left image margin in pixels.

rightMargin

Width of the right image margin in pixels.

topMargin

Width of the top image margin in pixels.

bottomMargin

Width of the bottom image margin in pixels.

key

Key of the image.

Declared In

NGridImageTextCell.h

– removeImage:

Removes the image by the key.

- (void)removeImage:(id<NSCopying>)key

Parameters

key

Key identifying the image to remove.

Declared In

NGridImageTextCell.h

– clearImages

Removes all images (must be called if you are reusing cells).

- (void)clearImages

Declared In

NGridImageTextCell.h

  images

All images contained in a cell.

@property (readonly) NSDictionary *images

Declared In

NGridImageTextCell.h