CometChatContacts
is a UIViewController
specifically designed to facilitate the display and management of users and groups within chat applications. It streamlines the process of showcasing all app users and available chat groups in a user-friendly interface, making it easier for users to connect and communicate effectively. Additionally, the view controller includes a UISegmentedControl
to switch between the users and groups list, enhancing navigation and usability.
Key Features:
Methods | Parameters | Description |
---|---|---|
title | String | Sets the title that will be displayed at the top of the CometChatContacts view. This method allows you to customize the title to provide relevant information or context to the users. |
usersTabTitle | String | usersTabTitle is used to set the users tab title for the CometChatContacts Component |
groupsTabTitle | String | groupsTabTitle is used to set the groups tab title for the CometChatContacts Component. |
usersConfiguration | UsersConfiguration | usersConfiguration is used to set the configurations for the CometChatUsers Component embedded in CometChatContacts Component. |
groupsConfiguration | GroupsConfiguration | groupsConfiguration is used to set the configurations for the CometChatGroups Component embedded in CometChatContacts Component. |
onItemTap | (_ controller: UIViewController?, user: User?, group: Group?) -> Void | onItemTap is used to set the action to be performed when a user or group is tapped. |
closeIcon | UIImage | closeIcon is used to set the close icon. |
onClose | () -> Void | onClose is used to set the action to be performed when close icon is tapped. |
submitIcon | UIImage | submitIcon is used to set the submit icon |
onSubmitIconTap | (_ selectedUsers: [User]? , _ selectedGroups: [Group]?) -> Void | onSubmitIconTap is used to set the action to be performed when submit icon is tapped |
hideSubmitButton | Bool | hideSubmitButton is used to hide the submit button in CometChatContacts Component. |
selectionLimit | Int | selectionLimit is used to set the selection limit for the CometChatUsers and CometChatGroups subviews embedded inside CometChatContacts. |
selectionMode | SelectionMode | selectionMode is used to set the selection mode for the CometChatUsers and CometChatGroups subviews embedded inside CometChatContacts. |
contactsStyle | ContactsStyle | the property contactsStyle is used to set the style for the CometChatContacts Component. |
tabVisibility | TabVisibility | the property tabVisibility is used to set the tab visibility for the CometChatContacts Component. Default value is usersAndGroups. |
Methods | Parameter | Description |
---|---|---|
titleTextColor | UIColor | used to set the text color of the title |
titleTextFont | UIFont | used to set the text font of the title |
tabTitleTextColor | UIColor | is used to set the tab title text color |
tabTitleTextFont | UIFont | used to set the tab title text font |
tabWidth | CGFloat | used to set the tab width |
tabHeight | CGFloat | used to set the tab height |
activeTabTitleTextColor | UIColor | used to set the active tab title text color |
activeTabBackground | UIColor | used to set the active tab background color |
closeIconTint | UIColor | used to set the close icon tint color |
selectionIconTint | UIColor | used to set the selection icon tint color |
errorStateTextColor | UIColor | used to set the error state text color |
errorStateTextFont | UIFont | used to set the error state text font |
submitButtonBackground | UIColor | used to set the submit button background color |
submitButtonTextColor | UIColor | used to set the submit button text color |
submitButtonTextFont | UIFont | used to set the submit button text font |
tableViewStyle | UITableView.Style | used to set the tableView style, default value is insetGrouped |