Message Parts (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.

ICMessagePart

This interface represents a part of the message that the developer wants to display in a partial view.

Properties:

contentTypeNSStringThe message part content type

ICTextMessagePart

This class will retrieve all the text that will be displayed for a specific message.

Properties:

textNSStringThe message text

ICAttachmentMessagePart

This class will retrieve a single attachment that will be displayed for a specific message.

Properties:

filePathNSURLThe file path where the message is locally stored
attachmentICAttachmentThe attachment that should be displayed in the message part view

ICURLMessagePart

This class will retrieve a URL from which a preview will be displayed for a specific message

Properties:

urlNSURLThe URL that will be represented in the message part view

ICMessageComposerView

This view represents the composer to write down some messages and add some attachments to these messages. To add some attachments to the message some plugins must be registered. These plugins will allow the user to pick some photos/videos, share a location or record some audio message for example.

Styling:

This class allows you to customise the message composer view.

Properties:

delegateidSee ICMessageComposerViewDelegate description
composerTextViewICMessageComposerTextViewSee ICMessageComposerTextView description
borderWidthCGFloatThe border width
borderColorUIColorThe border color
cornerRadiusCGFloatThe corner radius
backgroundColorUIColorThe background color
composerBackgroundColorUIColorThe composer background color

Sample Code:

[[ICMessageComposerView appearance] setBorderWidth:2.0f];
[[ICMessageComposerView appearance] setBorderColor:[UIColor blueColor]];    
[[ICMessageComposerView appearance] setCornerRadius:10.0f];
[[ICMessageComposerView appearance] setBackgroundColor:[UIColor blueColor]];    
[[ICMessageComposerView appearance] setComposerBackgroundColor:[UIColor blueColor]];

Methods:

SyntaxDescription
(void) registerPlugins:(NSArray *)pluginsRegisters an array of plugins
(void) registerPlugin:(ICMessageComposerPlugin *)pluginRegisters a plugin

Below properties have been added to this class to implement accessibility to the elements of this class.

Properties:

PropertyDescription
@property (nonatomic) NSString *sendButtonAccessibilityText UI_APPEARANCE_SELECTOR;The Send Button's accessibility text
@property (nonatomic) NSString *attachmentButtonAccessibilityText UI_APPEARANCE_SELECTOR;The Attachment Button's accessibility text
@property (nonatomic) NSString *composerViewAccessibilityText UI_APPEARANCE_SELECTOR;The Attachment Button's accessibility text

Sample Code:

[[ICMessageComposerView appearance] setSendButtonAccessibilityText:@"Send"];
[[ICMessageComposerView appearance] setAttachmentButtonAccessibilityText:@"Attachments"];

ICMessageComposerViewDelegate

This interface will warn the delegate each time an action has been made on the
composer.

Methods:

SyntaxDescription
(void) didComposeMessage:(ICMessage )message withMessageParts:(NSArray )messagePartsTells the delegate that a message has been composed and provides the eventual message parts attached to that message
(void) presentPluginOptionsInAlertController:(UIAlertController *)alertControllerTells the delegate to present an alertController containing plugin options
(void) didSelectPlugin:(ICMessageComposerPlugin *)pluginTells the delegate that a plugin has been selected by the user
(void) messageComposerView:(ICMessageComposerView *)messageComposerView
didUpdateHeight:(CGFloat)height
Tells the delegate that the message composer view has updated its height
(void) messageComposerViewDidStartTyping:(ICMessageComposerView *)messageComposerViewTells the delegate that the user is typing
(void) messageComposerViewDidStopTyping:(ICMessageComposerView *)messageComposerViewTells the delegate that the user is not typing anymore

ICMessageComposerTextView

This class represents the part of the composer when the user types some text.

Styling:

This class allows you to customise the message composer text view.

Properties:

composerTextDelegateidSee ICMessageComposerTextViewDelegate description
messageTextColorUIColorThe message text color
messageFontUIFontThe message text font size
placeHolderTextNSStringThe place holder text
placeHolderTextColorUIColorThe place holder text color

Sample Code

[[ICMessageComposerTextView appearance] setMessageTextColor:[UIColor blueColor]];
[[ICMessageComposerTextView appearance] setMessageFont:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular]];
[[ICMessageComposerTextView appearance] setPlaceHolderText:@"placeholder"];    
[[ICMessageComposerTextView appearance] setPlaceHolderTextColor:[UIColor blueColor]];

Methods:

SyntaxDescription
(void) clearClears the composer text view and show the place holder

ICMessageComposerPlugin

This abstract class represents a way to add an attachment to a message. It can
be a photo picker, an audio recorder, etc,

Properties:

titleNSStringThe plugin title

Methods:

SyntaxDescription
(void) addMessagePart:(id)messagePart
withThumbnail:(UIImage *)thumbnail
This method should be called when a message part has been selected and his associated thumbnail generated
+ (instancetype) pluginWithTitle:(NSString *)titleInstantiates a plugin
(void) presentFromViewController:(UIViewController *)viewControllerShows the graphic component associated with the plugin from a view controller
(void) addMessagePart:(id)messagePart toMessage:(ICMessage *)messageAssociates a message part to a message when the user has clicked on the Send button

ICMessageComposerAudioPlugin

This class represents a way to transform recorded audio to an audio attachment.

Below properties have been added to this class to implement accessibility to the elements of this class.

Properties:

PropertyDescription
@property (nonatomic, weak) NSString *titleLabelAccessibilityText;The title Label's accessibility text
@property (nonatomic) NSString *recordStateLabelAccessibilityText;The Record State Label accessibility text
@property (nonatomic, weak) NSString *recordStopStateLabelAccessibilityText;The Record Stop State Label accessibility text
@property (nonatomic, weak) NSString *recordAudioButtonAccessibilityText;The Record Button accessibility text
@property (nonatomic) NSString *cancelButtonAccessibilityText;The cancelButton's accessibility text
@property (nonatomic) UIColor *recordStateLabelTextColor;The Record State Label text color
@property (nonatomic) UIFont *recordStateLabelFont;The Record State Label font

Sample Code:

ICMessageComposerAudioPlugin *audioPlugin = [ICMessageComposerAudioPlugin pluginWithTitle:kICConversationViewControllerAudioPluginTitle];
audioPlugin.titleLabelAccessibilityText = self.audioTitleLabelAccessibilityText;       
audioPlugin.recordStateLabelAccessibilityText = self.audioRecordStateLabelAccessibilityText;

ICMessageComposerAudioPluginViewControllerDelegate

This class provides an easy way to record an audio

Properties:

ICMessageComposerAudioPluginViewController

Methods:

SyntaxDescription
(void)audioPluginViewController:(ICMessageComposerAudioPluginViewController )audioPluginViewController didFinishRecordingAudioAtURL:(NSURL )url withDuration:(CGFloat)durationTells the delegate that the audio has finished being recorded

Below properties have been added to this class to implement accessibility to the elements of this class.

Properties:

PropertyDescription
@property (nonatomic, weak) NSString *titleLabelAccessibilityText;The title Label's accessibility text
@property (nonatomic) NSString *recordStateLabelAccessibilityText;The Record State Label accessibility text
@property (nonatomic, weak) NSString *recordStopStateLabelAccessibilityText;The Record Stop State Label accessibility text
@property (nonatomic, weak) NSString *recordAudioButtonAccessibilityText;The Record Button accessibility text
@property (nonatomic) NSString *cancelButtonAccessibilityText;The cancelButton's accessibility text
@property (nonatomic) UIColor *recordStateLabelTextColor;The Record State Label text color
@property (nonatomic) UIFont *recordStateLabelFont;The Record State Label font

Sample Code:

ICMessageComposerAudioPluginViewController *audioViewController = [[ICMessageComposerAudioPluginViewController alloc] initWithNibName:kICMessageComposerAudioPluginNibName bundle:[NSBundle bundleForClass:[self class]]];    
audioViewController.titleLabelAccessibilityText = self.titleLabelAccessibilityText;    
audioViewController.recordStateLabelAccessibilityText = self.recordStateLabelAccessibilityText;

ICMessageComposerLocationPlugin

This class represents a way to transform a selected location to a location attachment

Below properties have been added to this class to implement accessibility to the elements of this class.

Properties:

PropertyDescription
@property (nonatomic, weak) NSString *titleLabelAccessibilityText;The title Label's accessibility text
@property (nonatomic, weak) NSString *locationLabelAccessibilityText;The location Label accessibility text
@property (nonatomic, weak) NSString *placeSearchBarAccessibilityText;The location place search bar accessibility text
@property (nonatomic, weak) NSString *cancelButtonAccessibilityText;The cancel Button's accessibility text
@property (nonatomic, weak) NSString *sendButtonAccessibilityText;The send Button's accessibility text

Sample Code:

ICMessageComposerLocationPlugin *locationPlugin = [ICMessageComposerLocationPlugin pluginWithTitle:kICConversationViewControllerLocationPluginTitle];
locationPlugin.titleLabelAccessibilityText = @” audioTitleLabelAccessibilityText”;

ICMessageComposerLocationPluginViewController

This class provides an easy way to pick a location

Properties:

Below properties have been added to this class to implement accessibility to the elements of this class.

Properties:

PropertyDescription
@property (nonatomic, weak) NSString *titleLabelAccessibilityText;The title Label's accessibility text
@property (nonatomic, weak) NSString *locationLabelAccessibilityText;The location Label accessibility text
@property (nonatomic, weak) NSString *placeSearchBarAccessibilityText;The location place search bar accessibility text
@property (nonatomic, weak) NSString *cancelButtonAccessibilityText;The cancel Button's accessibility text
@property (nonatomic, weak) NSString *sendButtonAccessibilityText;The send Button's accessibility text

Sample Code:

ICMessageComposerLocationPluginViewController *locationViewController = [[ICMessageComposerLocationPluginViewController alloc] initWithNibName:@"ICMessageComposerLocationPluginViewController" bundle:[NSBundle bundleForClass:[self class]]];
locationViewController.titleLabelAccessibilityText = self.titleLabelAccessibilityText;   
locationViewController.cancelButtonAccessibilityText = self.cancelButtonAccessibilityText;

ICMessageComposerLocationPluginViewControllerDelegate

Methods:

(void)locationPluginViewController:(ICMessageComposerLocationPluginViewController )locationPluginViewController didFinishPickingLocation:(CLLocation )location :(NSString *)address inRegion:(MKCoordinateRegion)regionTells the delegate that the user has picked a location

ICMessageComposerFilePlugin

This class represents a way to transform a selected file to a file attachment

ICMessageComposerImagePlugin

This class represents a way to transform a selected image to an image attachment

Properties:

sourceTypeUIImagePickerControllerSourceTypeThe source type of the image. It can be the library or directly the camera

ICImageViewController

This class provides a way to show an image in full screen

Properties:

ImageUIImageThe image that will be displayed in full screen

ICFileViewController

This class displays a preview of a file

Methods:

SyntaxDescription
(void)showFilePreview:(NSURL *)filePathShows a file preview from a file path

ICMediaHandler

Handles an interaction with a media with a default behavior.

Methods:

+ (instancetype) sharedGives a single instance of an ICMediaHandler
(void)handleMediaMessagePart:(ICMediaMessagePart )mediaMessagePart fromViewController:(UIViewController )viewControllerHandles a media message part with a default behavior

ICMessageComposerTextViewDelegate

SyntaxDescription
(void)composerTextView (ICMessageComposerTextView *)composerTextView didUpdateHeight:(CGFloat)heightTells the delegate that the height of the composer text view has changed
(void)composerTextViewDidStartTyping:(ICMessageComposerTextView *)composerTextViewTells the delegate that the user is typing
(void)composerTextViewDidStopTyping:(ICMessageComposerTextView *)composerTextViewTells the delegate that the user is not typing anymore