PartViews (Discontinued)
Note
Please note that we have announced end of sale for iOS UI SDK. It is no longer offered as a standard Webex Connect capability.
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]];
ICFormPartViewFactory
This class implements the ICMessagePartViewFactory and is responsible for the creation of the ICFormPartView.
ICFormPartView
This component displays form template attachments from a message.
Styling:
ICFormViewStyle
This class will be used to customise the Form view style.
The following properties and methods have been added to this class in this release.
Methods:
initWithMessageType
This method returns the ICFormViewStyle instance with predefined view style based on the message type.
Syntax: - (instancetype)initWithMessageType:(BOOL) isIncomingMessage;
Parameters:
Parameter | Type | Description |
---|---|---|
isIncomingMessage | BOOL | If true, returns the ICFormViewStyle for incoming form else returns the style for outgoing/submitted form. |
Returns: Returns instance of ICFormViewStyle.
Sample Code:
ICFormViewStyle *incomingFormStyle = [[ICFormViewStyle alloc] initWithMessageType:YES];
incomingFormStyle.backGroundColor = [UIColor grayColor];
ICMessageStyle *incomingMessageStyle = [[ICMessageStyle alloc] init];
incomingMessageStyle.formStyle = incomingFormStyle;
[[ICIncomingMessageCollectionViewCell appearance] setStyle: incomingMessageStyle];
Properties:
Property | Description |
---|---|
@property (nonatomic, readwrite) UIColor*backGroundColor; | The Form View Background Colour |
@property (nonatomic, readwrite) UIColor*formTitleColor; | The Form View Title Colour |
@property (nonatomic, readwrite) UIFont*formTitleFont; | The Form View Title Font |
@property (nonatomic, readwrite) UIColor*formTitleShadowColor; | The Form View Title Text Shadow Colour |
@property (nonatomic, readwrite) UIColor*submitButtonTextColor; | The Form Submit Button Text Colour |
@property (nonatomic, readwrite) UIColor*submitButtonTintColor; | The Form Submit Button Tint Colour |
@property (nonatomic, readwrite) UIColor*submitButtonBackgroundColor; | The Form Submit Button Background Colour |
@property (nonatomic, readwrite) UIFont*submitButtonFont; | The Form Submit Button Font |
@property (nonatomic, readwrite) ICFormFieldStyle*fieldStyle; | The Form Field Style |
@property (nonatomic) UIColor *pickerCellTitleTextColor; | The title text color |
@property (nonatomic) NSTextAlignment pickerCellTitleTextAlignment; | The title text Alignment |
@property (nonatomic) NSTextAlignment multiSelectPickerCellTitleTextAlignment; | The multi select picker cell title text Alignment |
@property (nonatomic) CGSize pickerCellCheckBoxSize; | The size of the Check Box imageview |
@property (nonatomic) UIImage *pickerCellSelectedCheckBoxImage; | The selected Check Box Image |
@property (nonatomic) UIImage *pickerCellDeselectedCheckBoxImage; | The deselected Check Box Image |
ICFormFieldContainerView
This class will handle the form fields rendering inside the form part view.
ICFormFieldView
This class will be responsible for displaying the different form fields like number field, email field, text field, date picker field, drop down field and multi select drop down field.
Styling:
ICFormFieldStyle
This class will be used to customise the Form field.
The following properties and methods have been added to this class in this release.
Methods:
initWithMessageType
This method returns the ICFormFieldStyle instance with predefined view style based on the message type.
Syntax: - (instancetype)initWithMessageType:(BOOL) isIncomingMessage
Parameter | Type | Description |
---|---|---|
isIncomingMessage | BOOL | If true, returns the ICFormFieldStyle for incoming cell else returns the style for outgoing cell. |
Sample Code:
ICFormFieldStyle *incomingFormFieldStyle = [[ICFormFieldStyle alloc] initWithMessageType:YES];
ICFormFieldStyle *outgoingFormFieldStyle = [[ICFormFieldStyle alloc] initWithMessageType:NO];
Properties:
Property | Description |
---|---|
@property (nonatomic, readwrite) UIColor *titleColor; | The Form Field Title Label Text Color |
@property (nonatomic, readwrite) UIFont * titleFont; | The Form Field Title Label Text Font |
@property (nonatomic, readwrite) UIColor *titleShadowColor; | The Form Field Title Label Text Shadow Colour |
@property (nonatomic, readwrite) UIColor * backgroundColor; | The Form Field Background Colour |
@property (nonatomic, readwrite) UIColor *textColor; | The Form Field Text Colour |
@property (nonatomic, readwrite) UIFont *textFont; | The Form Field Text Font |
@property (nonatomic, readwrite) UIColor *textShadowColor; | The Form Field Text Shadow Colour |
@property (nonatomic, readwrite) UIColor *errorTextColor; | The Form Field Error Label Text Colour |
@property (nonatomic, readwrite) UIFont *errorTextFont; | The Form Field Error Label Text Font |
@property (nonatomic, readwrite) UIColor *errorTextShadowColor; | The Form Field Error Label Text Shadow Colour |
@property (nonatomic, readwrite) ICFormMultiSelectPickerFieldStyle *multiSelectPickerFieldStyle; | Multi Select Picker Field Style |
ICFormTextFieldViewFactory
This class implements the ICFormFieldViewFactory and is responsible for the creation of the ICFormTextFieldView.
ICFormTextFieldView
This class implements the ICFormFieldView and is responsible for rendering the form fields like text field, number field, email fields.
ICFormPickerFieldViewFactory
This class implements the ICFormFieldViewFactory and is responsible for the creation of the ICFormPickerFieldView.
ICFormPickerFieldView
This class implements the ICFormFieldView and is responsible for rendering the drop down form field.
Properties:
Property | Description |
---|---|
@property (nonatomic) NSString *cancelButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The cancel button's accessibility text |
@property (nonatomic) NSString *doneButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The done button's accessibility text |
ICFormTextFieldView
This class implements the ICFormFieldView and is responsible for rendering the form fields like text field, number field, email fields.
ICFormDateFieldViewFactory
This class implements the ICFormFieldViewFactory and is responsible for the creation of the ICFormDateFieldView.
ICFormDateFieldView
This class implements the ICFormFieldView and is responsible for rendering the date form field.
Properties:
Property | Description |
---|---|
@property (nonatomic) NSString *cancelButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The cancel button's accessibility text |
@property (nonatomic) NSString *doneButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The done button's accessibility text |
ICFormMultiSelectPickerFieldViewFactory
This class implements the ICFormFieldViewFactory and is responsible for the creation of the ICFormMultiSelectPickerFieldView.
ICFormMultiSelectPickerFieldView
This class implements the ICFormFieldView and is responsible for rendering the multi select drop down form field.
Properties:
Property | Description |
---|---|
@property (nonatomic) NSString *cancelButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The cancel button's accessibility text |
@property (nonatomic) NSString *doneButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The done button's accessibility text |
Styling:
ICFormMultiSelectPickerFieldStyle
This class will be used to customise the Multi Select Dropdown Form field.
The following properties and methods have been added to this class in this release.
Methods: - (instancetype)init;
Creates the ICFormMultiSelectPickerFieldStyle instance with default colours & fonts for Multi select drop down View.
Sample Code:
ICFormMultiSelectPickerFieldStyle *multiSelectPickerStyle = [[ICFormMultiSelectPickerFieldStyle alloc] init];
Returns: Returns instance of ICFormMultiSelectPickerFieldStyle.
Properties:
Property | Description |
---|---|
@property (nonatomic) UIColor *toolBarBackgroundColor; | The tool bar background color |
@property (nonatomic) UIFont *cancelButtonFont; | The cancel button font |
@property (nonatomic) UIColor *cancelButtonTextColor; | The cancel button text color |
@property (nonatomic) UIColor *cancelButtonBackgroundColor; | The cancel button background color |
@property (nonatomic) NSString *cancelButtonTitle; | The cancel button's title |
@property (nonatomic) UIFont *doneButtonFont; | The done button font |
@property (nonatomic) UIColor *doneButtonTextColor; | The done button text color |
@property (nonatomic) UIColor *doneButtonBackgroundColor; | The done button background color |
@property (nonatomic) NSString *doneButtonTitle; | The done button's title |
@property (nonatomic) UIFont *pickerCellTitleFont; | The title font |
ICFormMultiSelectPickerCell
This class is subclassed from UITableViewCell and is responsible for rendering the multi select drop down items.
Properties:
Property | Description |
---|---|
@property (nonatomic) NSString *checkBoxAccessibilityText UI_APPEARANCE_SELECTOR; | The check box's accessibility |
@property (nonatomic) NSString *titleLabelAccessibilityText UI_APPEARANCE_SELECTOR; | The title label's accessibility text |
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:
- (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 |
- (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:
- (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];
- (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];
}
ICFormMultiSelectPickerFieldViewFactory
This class implements the ICFormMultiSelectPickerFieldViewFactory and is responsible for the creation of ICFormMultiSelectPickerFieldView.
ICFormMultiSelectPickerFieldView
This component displays multi select drop down field view from a form message.
The following properties have been added to this class to provide the accessibility for the elements of this class.
Properties:
Property | Description |
---|---|
@property (nonatomic) NSString *cancelButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The cancel button's accessibility text |
@property (nonatomic) NSString *doneButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The done button's accessibility text |
ICFormMultiSelectPickerCell
This component displays multi select drop down options in a cell from a form message.
The following properties have been added to this class to provide the accessibility for the elements of this class.
Properties:
Property | Description |
---|---|
@property (nonatomic) NSString * checkBoxAccessibilityText UI_APPEARANCE_SELECTOR; | The check box's accessibility text |
@property (nonatomic) NSString * titleLabelAccessibilityText UI_APPEARANCE_SELECTOR; | The title label's accessibility text |
Styling
ICFormMultiSelectPickerFieldStyle
This class allows you to customise the multi select drop down field of form messages inside a conversation.
Methods: - (instancetype)init;
This method returns the ICFormMultiSelectPickerFieldStyle instance with predefined view style.
Syntax: - (instancetype)init;
Returns: Returns instance of ICFormMultiSelectPickerFieldStyle.
Sample Code:
ICFormViewStyle *formStyle = [ICFormViewStyle new];
ICFormMultiSelectPickerFieldStyle *pickerStyle = [ICFormMultiSelectPickerFieldStyle new];
ICFormFieldStyle *fieldStyle = [[ICFormFieldStyle alloc] initWithMessageType:TRUE];
[fieldStyle setMultiSelectPickerFieldStyle:pickerStyle];
[formStyle setFieldStyle:fieldStyle];
ICMessageStyle *messageStyle = [[ICMessageStyle alloc] init];
[messageStyle setFormStyle:formStyle]; [[ICIncomingMessageCollectionViewCell appearance] setStyle:messageStyle];
[[ICOutgoingMessageCollectionViewCell appearance] setStyle:messageStyle];
Property | Description |
---|---|
@property (nonatomic) UIColor *toolBarBackgroundColor; | The tool bar background color |
@property (nonatomic) UIFont *cancelButtonFont; | The cancel button font |
@property (nonatomic) UIColor *cancelButtonTextColor; | The cancel button text color |
@property (nonatomic) UIColor *cancelButtonBackgroundColor; | The cancel button background color |
@property (nonatomic) NSString *cancelButtonTitle; | The cancel button's title |
@property (nonatomic) UIFont *doneButtonFont; | The done button font |
@property (nonatomic) UIColor *doneButtonTextColor; | The done button text color |
@property (nonatomic) UIColor *doneButtonBackgroundColor; | The done button background color |
@property (nonatomic) NSString *doneButtonTitle; | The done button's title |
@property (nonatomic) UIColor *pickerCellBackgroundColor; | The cell background color |
@property (nonatomic) UIFont *pickerCellTitleFont; | The title font |
@property (nonatomic) UIColor *pickerCellTitleTextColor; | The title text color |
@property (nonatomic) NSTextAlignment pickerCellTitleTextAlignment; | The title text Alignment |
@property (nonatomic) NSTextAlignment multiSelectPickerCellTitleTextAlignment; | The multi select picker cell title text Alignment |
@property (nonatomic) CGSize pickerCellCheckBoxSize; | The size of the Check Box imageview |
@property (nonatomic) UIImage *pickerCellSelectedCheckBoxImage; | The selected Check Box Image |
@property (nonatomic) UIImage *pickerCellDeselectedCheckBoxImage; | The deselected Check Box Image |
ICFormDateFieldView
Below properties have been added to this class to implement accessibility to the elements of this class.
Properties:
Property | Description |
---|---|
@property (nonatomic) NSString *cancelButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The cancel button's accessibility text |
@property (nonatomic) NSString *doneButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The done button's accessibility text |
Sample Code:
[[ICFormDateFieldView appearance] setCancelButtonAccessibilityText:@"Cancel"];
[[ICFormDateFieldView appearance] setDoneButtonAccessibilityText:@"Done"];
ICFormPickerFieldView
Below properties have been added to this class to implement accessibility to the elements of this class.
Properties:
Property | Description |
---|---|
@property (nonatomic) NSString *cancelButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The cancel button's accessibility text |
@property (nonatomic) NSString *doneButtonAccessibilityText UI_APPEARANCE_SELECTOR; | The done button's accessibility text |
Sample Code:
[[ICFormPickerFieldView appearance] setCancelButtonAccessibilityText:@"Cancel"];
[[ICFormPickerFieldView appearance] setDoneButtonAccessibilityText:@"Done"];
Updated about 1 year ago