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

@property (nonatomic, readwrite) UIImage
*closeButtonImage;

Generic Template Element detail view close button image

@property (nonatomic, readwrite) UIColor
*titleColor;

Generic Template Element detail Title Text Color

@property (nonatomic, readwrite) UIFont
*titleFont;

Generic Template Element detail Title Label Text Font

@property (nonatomic, readwrite) UIColor
*titleShadowColor;

Generic Template Element detail Title Label Text Shadow Color

@property (nonatomic, readwrite) UIColor
*titleBackgroundColor;

Generic Template Element detail Title Background Color

@property (nonatomic, readwrite)
NSTextAlignment titleTextAlignment;

Generic Template Element detail Title Text Alignment

@property (nonatomic, readwrite) int
titleTextNumberOfLines;

Generic Template Element detail Title max lines

@property (nonatomic, readwrite)
UIViewContentMode imageContentMode;

Generic Template Element detail Image content mode

@property (nonatomic, readwrite) CGFloat
imageCornerRadius;

Generic Template Element detail Image corner radius

@property (nonatomic, readwrite) UIColor
*imageBackGroundColor;

Generic Template Element detail Image view Background Color

@property (nonatomic, readwrite) UIColor *pageControlBackGroundColor;

Generic Template Element detail Page Control Background color

@property (nonatomic, readwrite) UIColor
*pageIndicatorTintColor;

Generic Template Element detail Page Control indicator tint color

@property (nonatomic, readwrite) UIColor
*currentPageIndicatorTintColor;

Generic Template Element detail Page Control current page indicator tint color

@property (nonatomic, readwrite) UIColor
*subtitleColor;

Generic Template Element detail Sub Title Text Color

@property (nonatomic, readwrite) UIFont
*subtitleFont;

Generic Template Element detail Sub Title Label Text Font

@property (nonatomic, readwrite) UIColor
*subtitleShadowColor;

Generic Template Element detail Sub Title Label Text Shadow Color

@property (nonatomic, readwrite) UIColor
*subtitleBackgroundColor;

Generic Template Element detail Sub Title Background Color

@property (nonatomic, readwrite)
NSTextAlignment subtitleTextAlignment;

Generic Template Element detail Sub Title Text Alignment

@property (nonatomic, readwrite) int
subtitleTextNumberOfLines;

Generic Template Element detail Sub Title max lines

@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) 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) NSTextAlignment primaryButtonTextAlignment;

Primary Button Text Alignment

@property (nonatomic, readwrite) BOOL
primaryButtonTextAllCaps;

Primary Button Text all caps

@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) 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

@property (nonatomic, readwrite)
NSTextAlignment
secondaryButtonsTextAlignment;

Secondary Buttons Text Alignment

@property (nonatomic, readwrite) BOOL
secondaryButtonsTextAllCaps;

Secondary Buttons Text all caps

Sample Code:

ICGenericTemplateViewStyle *genericTemplateViewStyle = [ICGenericTemplateViewStyle new];

ICGenericTemplateElementDetailsViewStyle * detailViewStyle = [ICGenericTemplateElementDetailsViewStyle new];

detailViewStyle.titleColor = [UIColor redColor];

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

genericTemplateViewStyle.elementDetailViewStyle = detailViewStyle;

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

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

ICTemplateButton

This class will be used to customise the template buttons inside the generic template element.

Methods:

  1. - (instancetype)initWithICButton:(ICButton *)buttonObj message:(ICMessage *)message;

This method returns instance of ICTemplateButton built by the parameters buttonObj, message which have been passed to this function.

Syntax: - (instancetype)initWithICButton:(ICButton *)buttonObj message:(ICMessage *)message;

Parameters:

Parameter

Type

Description

buttonObj

ICButton

The ICButton object

message

ICMessage

The ICMessage object

  1. - (instancetype)initWithICButton:(ICButton *)buttonObj message:(ICMessage *)message buttonStyle:(ICTemplateButtonStyle *)buttonStyle;

This method returns instance of ICTemplateButton built by the parameters buttonObj, message and buttonStyle which have been passed to this function.

Syntax: - (instancetype)initWithICButton:(ICButton *)buttonObj message:(ICMessage *)message buttonStyle:(ICTemplateButtonStyle *)buttonStyle;

Parameters:

Parameter

Type

Description

buttonObj

ICButton

The ICButton object

message

ICMessage

The ICMessage object

buttonStyle

ICTemplateButtonStyle

The ICTemplateButtonStyle object

Properties:

Property

Description

@property (nonatomic, weak)
id
templateButtonSelectionDelegate;

The template button selection delegate

Styling

ICTemplateButtonStyle

This class allows you to customise the template buttons inside the generic template elements.

Methods:

  1. - (instancetype)init; This method returns the ICTemplateButtonStyle instance with predefined style.

Syntax: - (instancetype)init;

Returns: Returns instance of ICTemplateButtonStyle.

Sample Code:

ICTemplateButtonStyle *buttonStyle = [[ICTemplateButtonStyle alloc] init];

ICTemplateButton *templateButton = [[ICTemplateButton alloc] initWithICButton:buttonObject message:_message buttonStyle:buttonStyle];
  1. - (instancetype)initWithButtonType:(BOOL)isPrimaryButton; This method returns the ICTemplateButtonStyle instance with predefined style based on isPrimaryButton value.

Syntax: - (instancetype)initWithButtonType:(BOOL)isPrimaryButton;

Returns: Returns instance of ICTemplateButtonStyle.

Parameters:

Parameter

Type

Description

isPrimaryButton

BOOL

The Bool variable that will be used to choose between the primary and secondary button styles

Sample Code:

ICTemplateButtonStyle *buttonStyle = [[ICTemplateButtonStyle alloc] initWithButtonType:YES];

ICTemplateButton *templateButton = [[ICTemplateButton alloc] initWithICButton:buttonObject message:_message buttonStyle:buttonStyle];

Properties:

Property

Description

@property (nonatomic, readwrite) UIColor
*backGroundColor;

Generic Template Button Background Color

@property (nonatomic, readwrite) UIImage
*backGroundImage;

Generic Template Button Background Image

@property (nonatomic, readwrite) UIColor
*titleColor;

Generic Template Button Text Color

@property (nonatomic, readwrite) UIFont
*titleFont;

Generic Template Button Text Font

@property (nonatomic, readwrite) CGFloat
cornerRadius;

Generic Template Button corner radius

@property (nonatomic, readwrite) CGFloat
borderWidth;

Generic Template Button border Width

@property (nonatomic, readwrite) UIColor
*borderColor;

Generic Template Button border Color

Sample Code:

ICTemplateButtonStyle *buttonStyle = [[ICTemplateButtonStyle alloc] initWithButtonType:YES];

buttonStyle.backGroundColor = [UIColor greenColor];

buttonStyle.titleColor = [UIColor blackColor];

ICTemplateButton *templateButton = [[ICTemplateButton alloc] initWithICButton:buttonObject message:_message buttonStyle:buttonStyle];

Protocols

Below are the protocols that have been introduced in this release.

ICGenericTemplatePartViewSelectionDelegate

@protocol ICGenericTemplatePartViewSelectionDelegate <NSObject>

This protocol handles the template button selection made by the user. Below is the method that is been declared in this protocol.

- (void)didSelectTemplateButton:(ICButton *_Nonnull)selectedTemplateButton withMessageData:(id<ICMessageData>_Nonnull)messageData;

This method will be used to handle the template button selections made by the user.

Syntax: - (void)didSelectTemplateButton:(ICButton *_Nonnull)selectedTemplateButton withMessageData:(id<ICMessageData>_Nonnull)messageData;

Parameters:

Parameter

Type

Description

messageData

ICMessageData

messageData of the message

selectedTemplateButton

ICButton

the template button that has been selected

Sample Code:

if (self.templatePartViewSelectionDelegate != nil

&& [self.templatePartViewSelectionDelegate respondsToSelector:@selector(didSelectTemplateButton:withMessageData:)])

{

[self.templatePartViewSelectionDelegate didSelectTemplateButton:selectedTemplateButton withMessageData:messageData];

}

ICGenericTemplateElementSelectionDelegate

@protocol ICGenericTemplateElementSelectionDelegate <NSObject>

This protocol handles the template button selection made by the user. Below is the method that is been declared in this protocol.

- (void)didSelectTemplateButton:(ICButton *_Nonnull)selectedTemplateButton withMessageData:(id<ICMessageData>_Nonnull)messageData;

This method will be used to handle the template button selections made by the user.

Syntax: - (void)didSelectTemplateButton:(ICButton *_Nonnull)selectedTemplateButton withMessageData:(id<ICMessageData>_Nonnull)messageData;

Parameters:

Parameter

Type

Description

messageData

ICMessageData

messageData of the message

selectedTemplateButton

ICButton

the template button that has been selected

Sample Code:

if (self.templatePartViewSelectionDelegate != nil

&& [self.templatePartViewSelectionDelegate respondsToSelector:@selector(didSelectTemplateButton:withMessageData:)])

{

[self.templatePartViewSelectionDelegate didSelectTemplateButton:selectedTemplateButton withMessageData:messageData];

}

ICTemplateButtonSelectionDelegate

@protocol ICTemplateButtonSelectionDelegate <NSObject>

This protocol handles the template button selection made by the user. Below is the method that is been declared in this protocol.

- (void)didSelectTemplateButton:(ICButton *_Nonnull)selectedTemplateButton withMessageData:(id<ICMessageData>_Nonnull)messageData;

This method will be used to handle the template button selections made by the user.

Syntax: - (void)didSelectTemplateButton:(ICButton *_Nonnull)selectedTemplateButton withMessageData:(id<ICMessageData>_Nonnull)messageData;

Parameters:

Parameter

Type

Description

messageData

ICMessageData

messageData of the message

selectedTemplateButton

ICButton

the template button that has been selected

Sample Code:

if (self.templateElementSelectionDelegate != nil

&& [self.templateElementSelectionDelegate respondsToSelector:@selector(didSelectTemplateButton:withMessageData:)])

{

[self.templateElementSelectionDelegate didSelectTemplateButton:selectedTemplateButton withMessageData:messageData];

}