PartViews

ICMessagePartContainerView

The ICMessagePartContainerView Contains all the part views that represent the content of an ICMessageData instance.

Properties:

messagePartViews

NSMutableArray

The array of all the part views that are contained by the container view.

Methods:

Syntax

Description

(void)addPartView:(ICMessagePartView *)partView

Adds a part view to the container view

(void)resizeConstraints:(CGSize)size

Resizes the container’s layout constraints

(void)setMessageData:(id)messageData withMessageParts:(NSArray *)messageParts

Associates a message and its message parts with the container view.

ICMessagePartView

This is an abstract that represents a message part. This class can represent a text or an attachment for example.

Properties:

delegate

id

See ICMessagePartViewDelegate description

messagePart

id

The message part associated to the view

messageData

Id

The message data associated to the view

dataSource

id

See ICMessagePartViewDataSource description

Methods:

Syntax

Description

(void)setMessagePart:(id)messagePart withMessageData:(id)messageData

Associates a message and its message part with the part view

(NSMutableArray *)getMenuItems

Get menu Items

(void)resizeInContainerSize:(CGSize)containerSize

Resizes the message part view

ICMessagePartViewDelegate

Methods:

(void)messagePartView:(ICMessagePartView *)messagePartView didUpdateHeight:(CGFloat)height

Informs when the height has changed.

(void)messagePartView:(ICMessagePartView *)messagePartView didRemoveMessagePart:(id)messagePart

Informs when a message part has been removed.

ICMessagePartViewDataSource

Methods:

(void)resizeInContainerSize:(CGSize)containerSize

Resizes the message part view

ICMessagePartViewFactory

This interface represents all the methods needed to create the part views that will be displayed in either an inbox cell or a conversation cell

(NSString *)contentType

Indicates the type of the message part handled by the factory.

(ICMessagePartView *)createMessagePartView

Creates a new ICMessagePartView depending on the content type of the message part.

ICAudioPartViewFactory

This class implements the ICMessagePartViewFactory and is responsible for the creation of the ICAudioPartView

ICFilePartViewFactory

This class implements the ICMessagePartViewFactory and is responsible for the creation of the ICFilePartView

ICImagePartViewFactory

This class implements the ICMessagePartViewFactory and is responsible for the creation of the ICImagePartView

ICVideoPartViewFactory

This class implements the ICMessagePartViewFactory and is responsible for the creation of the ICVideoPartView

ICTextPartView

This component displays a text from a message

Styling:
This class allows you to customise the text part view in conversation screen.

Properties:

textColor

UIColor

The text part view’s text color

font

UIFont

The text part view’s font

Sample Code

[[ICTextPartView appearance] setTextColor:[UIColor blackColor]];
[[ICTextPartView appearance] setFont:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular]];

ICURLPartView

This component displays a URL preview from a message

ICMediaPartView

This component displays an attachment from a message.

Properties:

mediaDelegate

id

See ICMediaPartViewDelegate description

mediaTapGestureRecognizer

UITapGestureRecognizer

The tap gesture recognizer that will be trigger when a user clicks on a media part view

downloadTapGestureRecognizer

UITapGestureRecognizer

The tap gesture recognizer that will be trigger when a user clicks on a download view

Methods:

(void)displayDownloadView

Displays the download view

(void)hideDownloadView

Hides the download view

(void)processWillStart

Tells the subclass that a process (upload or download) will start

(void)processDidEnd

Tells the subclass that a process (upload or download) will start

(void)showProcessIndicator

Shows the process indicator

(void)hideProcessIndicator

Hides the process indicator

ICAudioPartView

This component displays an audio attachment from a message.

Styling:
This class allows you to customise the audio part view in conversation screen.

Properties

durationTextColor

UIColor

The duration text color

durationFont

UIFont

The duration font

Sample Code

[[ICAudioPartView appearance] setDurationTextColor:[UIColor blackColor]];
[[ICAudioPartView appearance] setDurationFont:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular]];

ICFilePartView

This component displays a file attachment from a message.

Styling:
This class allows you to customise the file part view in conversation screen.

Properties:

fileTextColor

UIColor

The file text color

fileFont

UIFont

The file font

Sample Code

[[ICFilePartView appearance] setFileTextColor:[UIColor blackColor]];
[[ICFilePartView appearance] setFileFont:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular]];

ICImagePartView

This component displays an image attachment from a message.

ICLocationPartView

This component displays a location attachment from a message.

ICVideoPartView

This component displays a video attachment from a message.

Styling:
This class allows you to customise the video part view in conversation screen.

Properties:

durationTextColor

UIColor

The duration text color

durationFont

UIFont

The duration font

stateBackgroundColor

UIColor

The state background color

Sample Code

[[ICVideoPartView appearance] setDurationTextColor:[UIColor blackColor]];
[[ICVideoPartView appearance] setDurationFont:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular]];
[[ICVideoPartView appearance] setStateBackgroundColor:[UIColor lightGrayColor]];

ICGenericTemplatePartViewFactory

This class implements the ICMessagePartViewFactory and is responsible for the creation of the ICGenericTemplatePartView.

ICGenericTemplatePartView

This component displays generic template attachments from a message.

Styling

ICGenericTemplateViewStyle

This class allows you to customise the generic template attachment messages inside a conversation.

Methods: - (instancetype)init; This method returns the ICGenericTemplateViewStyle instance with predefined view style. syntax: - (instancetype)init;

Returns: Returns instance of ICGenericTemplateViewStyle.

Sample Code:

ICGenericTemplateViewStyle *genericTemplateViewStyle = [ICGenericTemplateViewStyle new];

ICMessageStyle *messageStyle = [[ICMessageStyle alloc] init];

[messageStyle setGenericTemplateViewStyle: genericTemplateViewStyle]; [[ICIncomingMessageCollectionViewCell appearance] setStyle:messageStyle];

Properties:

Property

Description

@property (nonatomic, readwrite) UIColor
*backGroundColor;

The Template View Background Colour

@property (nonatomic, readwrite) UIImage
*backGroundImage;

Generic Template view Background Image

@property (nonatomic, readwrite) CGFloat

minimumLineSpacingBetweenElements; Minimum line spacing between the two template elements in Generic Template Element view

@property (nonatomic, readwrite)
ICGenericTemplateElementViewStyle *elementViewStyle;

Generic Template Element view style

@property (nonatomic, readwrite)
ICGenericTemplateElementDetailsViewStyle
*elementDetailViewStyle;

Generic Template Element Detail view style

Sample Code:

ICGenericTemplateViewStyle *genericTemplateViewStyle = [ICGenericTemplateViewStyle new];

genericTemplateViewStyle.backGroundColor = [UIColor redColor];

ICMessageStyle *messageStyle = [[ICMessageStyle alloc] init];

[messageStyle setGenericTemplateViewStyle: genericTemplateViewStyle]; [[ICIncomingMessageCollectionViewCell appearance] setStyle:messageStyle];

ICGenericTemplateElementCell

This class will be used to customise the template elements inside the generic template from a message.

Methods: -(void)configureCellWithTemplateElement:(ICGenericTemplateElement *)element message:(id<ICMessageData>)message elementStyle:(ICGenericTemplateElementViewStyle *)templateElementStyle;

This method configures the ICGenericTemplateElementCell instance built by the parameters message data, element and template element style which have been passed to this function.

Syntax: -(void)configureCellWithTemplateElement:(ICGenericTemplateElement *)element message:(id<ICMessageData>)message elementStyle:(ICGenericTemplateElementViewStyle *)templateElementStyle;

Parameters:

Parameter

Type

Description

element

ICGenericTemplateElement

Generic template element data that will be used to build the element view

message

ICMessageData

Message Data of the message

templateElementStyle

ICGenericTemplateElementViewStyle

The Generic Template Element view style

Styling:

ICGenericTemplateElementViewStyle

This class allows you to customise the template elements inside the generic template of a message in conversation screen.

Methods: - (instancetype)init; This method returns the ICGenericTemplateElementViewStyle instance with predefined view style

Syntax: - (instancetype)init;

Returns: Returns instance of ICGenericTemplateElementViewStyle.

Sample Code:

ICGenericTemplateViewStyle *genericTemplateViewStyle = [ICGenericTemplateViewStyle new];

ICGenericTemplateElementViewStyle *elementStyle = [ICGenericTemplateElementViewStyle new];

genericTemplateViewStyle.elementViewStyle = elementStyle;

ICMessageStyle *messageStyle = [[ICMessageStyle alloc] init];

[messageStyle setGenericTemplateViewStyle: genericTemplateViewStyle]; [[ICIncomingMessageCollectionViewCell appearance] setStyle:messageStyle];

Properties:

Property

Description

@property (nonatomic, readwrite) CGFloat
elementWidth;

Generic Template Element width

@property (nonatomic, readwrite) CGFloat
elementHeight;

Generic Template Element height

@property (nonatomic, readwrite) UIColor
*backGroundColor;

Generic Template Element view Background Color

@property (nonatomic, readwrite) UIImage
*backGroundImage;

Generic Template Element view Background Image

@property (nonatomic, readwrite) CGFloat
cornerRadius;

Generic Template Element view corner radius

@property (nonatomic, readwrite) CGFloat
imageCornerRadius;

Generic Template Element Image corner radius

@property (nonatomic, readwrite)
UIViewContentMode imageContentMode;

Generic Template Element Image content mode

@property (nonatomic, readwrite) UIColor
*titleBackgroundColor;

Generic Template Element Title Background Color

@property (nonatomic, readwrite)
NSTextAlignment titleTextAlignment;

Generic Template Element Title Text Alignment

@property (nonatomic, readwrite) int titleTextNumberOfLines;

Generic Template Element Title max lines

@property (nonatomic, readwrite) UIColor
*titleColor;

Generic Template Element Title Text Color

@property (nonatomic, readwrite) UIFont *titleFont;

Generic Template Element Title Label Text Font

@property (nonatomic, readwrite) UIColor
*titleShadowColor;

Generic Template Element Title Label Text Shadow Color

@property (nonatomic, readwrite) UIColor
*subtitleBackgroundColor;

Generic Template Element Sub Title Background Color

@property (nonatomic, readwrite)
NSTextAlignment subtitleTextAlignment;

Generic Template Element Sub Title Text Alignment

@property (nonatomic, readwrite) int
subtitleTextNumberOfLines;

Generic Template Element Sub Title max lines

@property (nonatomic, readwrite) UIColor
*subtitleColor;

Generic Template Element Sub Title Text Color

@property (nonatomic, readwrite) UIFont
*subtitleFont;

Generic Template Element Sub Title Label Text Font

@property (nonatomic, readwrite) UIColor
*subtitleShadowColor;

Generic Template Element Sub Title Label Text Shadow Color

@property (nonatomic, readwrite) CGFloat
primaryButtonHeight;

Primary Button height

@property (nonatomic, readwrite) UIColor
*primaryButtonTextColor;

Primary Button Text Color

@property (nonatomic, readwrite) UIColor
*primaryButtonTintColor;

Primary Button Tint Color

@property (nonatomic, readwrite) UIColor
*primaryButtonBackgroundColor;

Primary Button Background Color

@property (nonatomic, readwrite) UIFont
*primaryButtonFont;

Primary Button Font

@property (nonatomic, readwrite)
NSTextAlignment primaryButtonTextAlignment;

Primary Button Text Alignment

@property (nonatomic, readwrite) BOOL
primaryButtonTextAllCaps;

Primary Button Text all caps

@property (nonatomic, readwrite) UIImage
*primaryButtonBackGroundImage;

Primary Button Background Image

@property (nonatomic, readwrite) CGFloat
primaryButtonCornerRadius;

Generic Template Element primary button corner radius

@property (nonatomic, readwrite) CGFloat
primaryButtonBorderWidth;

Generic Template Element primary button border width

@property (nonatomic, readwrite) UIColor *primaryButtonBorderColor;

Generic Template Element primary button border colour

@property (nonatomic, readwrite) CGFloat
moreButtonWidth;

More button width

@property (nonatomic, readwrite) CGFloat
moreButtonHeight;

More button height

@property (nonatomic, readwrite) CGFloat
moreButtonCornerRadius;

More button corner radius

@property (nonatomic, readwrite) UIColor
*moreButtonTextColor;

More Button Text Color

@property (nonatomic, readwrite) UIColor
*moreButtonTintColor;

More Button Tint Color

@property (nonatomic, readwrite) UIColor
*moreButtonBackgroundColor;

More Button Background Color

@property (nonatomic, readwrite) UIFont
*moreButtonFont;

More Button Font

@property (nonatomic, readwrite) UIImage
*moreButtonBackGroundImage;

More Button Background Image

@property (nonatomic, readwrite) CGFloat
secondaryButtonsHeight;

Secondary Buttons height

@property (nonatomic, readwrite) UIColor
*secondaryButtonsTextColor;

Secondary Buttons Text Color

@property (nonatomic, readwrite) UIColor
*secondaryButtonsTintColor;

Secondary Buttons Tint Color

@property (nonatomic, readwrite) UIColor
*secondaryButtonsBackgroundColor;

Secondary Buttons Background Color

@property (nonatomic, readwrite) UIFont
*secondaryButtonsFont;

Secondary Buttons Font

@property (nonatomic, readwrite)
NSTextAlignment
secondaryButtonsTextAlignment;

Secondary Buttons Text Alignment

@property (nonatomic, readwrite) BOOL
secondaryButtonsTextAllCaps;

Secondary Buttons Text all caps

@property (nonatomic, readwrite) UIImage
*secondaryButtonsBackGroundImage;

Secondary Buttons Background Image

@property (nonatomic, readwrite) CGFloat
secondaryButtonsCornerRadius;

Generic Template Element secondary buttons corner radius

@property (nonatomic, readwrite) CGFloat secondaryButtonsBorderWidth;

Generic Template Element secondary buttons border width

@property (nonatomic, readwrite) UIColor
*secondaryButtonsBorderColor;

Generic Template Element secondary buttons border colour

Sample Code:

ICGenericTemplateViewStyle *genericTemplateViewStyle = [ICGenericTemplateViewStyle new];

ICGenericTemplateElementViewStyle *elementStyle = [ICGenericTemplateElementViewStyle new];

elementStyle.backGroundColor = [UIColor redColor];

elementStyle.titleColor = [UIColor redColor];

elementStyle.titleFont = [UIFont systemFontOfSize:14.0f];

genericTemplateViewStyle.elementViewStyle = elementStyle;

ICMessageStyle *messageStyle = [[ICMessageStyle alloc] init];

[messageStyle setGenericTemplateViewStyle: genericTemplateViewStyle]; [[ICIncomingMessageCollectionViewCell appearance] setStyle:messageStyle];

ICGenericTemplateElementDetailsViewStyle

This class allows you to customise the template element detail view.

Methods:

  • (instancetype)init; This method returns the ICGenericTemplateElementDetailsViewStyle instance with predefined details view style.

Syntax: - (instancetype)init;

Returns: Returns instance of ICGenericTemplateElementDetailsViewStyle.

Sample Code:

ICGenericTemplateViewStyle *genericTemplateViewStyle = [ICGenericTemplateViewStyle new];

ICGenericTemplateElementDetailsViewStyle * detailViewStyle = [ICGenericTemplateElementDetailsViewStyle new];

genericTemplateViewStyle.elementDetailViewStyle = detailViewStyle;

ICMessageStyle *messageStyle = [[ICMessageStyle alloc] init];

[messageStyle setGenericTemplateViewStyle: genericTemplateViewStyle]; [[ICIncomingMessageCollectionViewCell appearance] setStyle:messageStyle];

Properties:

Property

Description

@property (nonatomic, readwrite) UIColor
*backGroundColor;

Generic Template Element detail view Background Color

@property (nonatomic, readwrite) UIImage
*backGroundImage;

Generic Template Element detail view Background Image

@property (nonatomic, readwrite) CGFloat
titleLableHeight;

Generic Template Element detail view title height

@property (nonatomic, readwrite) CGFloat
closeButtonWidth;

Generic Template Element detail view close button width

@property (nonatomic, readwrite) CGFloat
closeButtonHeight;

Generic Template Element detail view close button height