CometChatCreateGroup
serves as a versatile Component, empowering users to create diverse group types, encompassing public, private, and password-protected options. This functionality grants users the flexibility to tailor their group settings to suit their preferences and requirements.
CometChatCreateGroup
component is composed of the following BaseComponents:
Components | Description |
---|---|
CometChatListBase | CometChatListBase serves as a comprehensive container component, encompassing essential elements such as a title (navigationBar), search functionality (search-bar), background, and a container to embed a list view. This design provides a cohesive and intuitive user experience, facilitating seamless navigation and interaction within the component. |
CreateGroup
, as a custom view controller, offers flexible integration options, allowing it to be launched directly via button clicks or any user-triggered action. Additionally, it seamlessly integrates into tab view controllers. With CreateGroup, users gain access to a wide range of parameters and methods for effortless customization of its user interface.
The following code snippet exemplifies how you can seamlessly integrate the CreateGroup component into your application.
setOnCreateGroupClick
action is activated when you click the create Group button. This returns the created groups.
You can override this action using the following code snippet.
On Error
and improve error handling.
SetOnBack
feature. This capability allows you to customize the behavior associated with navigating back within your app. Utilize the provided code snippet to override default behaviors and tailor the user experience according to your specific requirements.
Component
. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using RequestBuilders
of Chat SDK.
The CreateGroup
component does not have any exposed filters.
Component
. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
Events emitted by the Create Group component is as follows.
Event | Description |
---|---|
onGroupCreate | This event will be triggered when the logged-in user initiates the creation of a group. |
onCreateGroupClick() | This event is utilized to execute specific tasks when the logged-in user clicks the “Create Group” button. |
CreateGroupStyle
to the Create Group
Component to customize the styling.
Property | Description | Code |
---|---|---|
Background | Sets the background color for create group | set(background: UIColor) |
CornerRadius | Sets the corner radius for create group | set(cornerRadius: CometChatCornerStyle) |
BorderWidth | Sets the border width for create group | set(borderWidth: CGFloat) |
BorderColor | Sets the border color for create group | set(borderColor: UIColor) |
TitleTextColor | Sets the title color for create group | set(titleTextColor: UIColor) |
TitleTextFont | Sets the title font for create group | set(titleTextFont: UIFont) |
NamePlaceholderTextColor | Sets the placeholder color for name | set(namePlaceholderTextColor: UIColor) |
NamePlaceholderTextFont | Sets the placeholder font for name | set(namePlaceholderTextFont: UIFont) |
NameInputTextFont | Sets the text font for name | set(nameInputTextFont: UIFont) |
NameInputTextColor | Sets the text color for name | set(nameInputTextColor: UIColor) |
PasswordInputTextColor | Sets the text color for password | set(passwordInputTextColor: UIColor) |
PasswordInputTextFont | Sets the text font for password | set(passwordInputTextFont: UIFont) |
PasswordPlaceholderColor | Sets the placeholder color for password | set(passwordPlaceholderColor: UIColor) |
PasswordPlaceholderFont | Sets the placeholder font for password | set(passwordPlaceholderFont: UIFont) |
TabColor | Sets the tab color for group types | set(tabColor: UIColor) |
TabTextFont | Sets the tab text font for group types | set(tabTextFont: UIFont) |
TabTextColor | Sets the tab text color for group types | set(tabTextColor: UIColor) |
SelectedTabTextFont | Sets the selected tab text font for group types | set(selectedTabTextFont: UIFont) |
SelectedTabTextColor | Sets the selected tab text color for group types | set(selectedTabTextColor: UIColor) |
InputBackgroundColor | Sets the input view background color | set(inputBackgroundColor: UIColor) |
InputCornerRadius | Sets the input view corner radius | set(inputCornerRadius: CGFloat) |
CreateButtonTextColor | Sets the create button text color | set(createButtonTextColor: UIColor) |
CreateButtonTextFont | Sets the create button text font | set(createButtonTextFont: UIFont) |
CancelButtonTextColor | Sets the cancel button text color | set(cancelButtonTextColor: UIColor) |
CancelButtonTextFont | Sets the cancel button text font | set(cancelButtonTextFont: UIFont) |
Property | Description | Code |
---|---|---|
Title | Custom title for the component | .set(title: String, mode: UINavigationItem.LargeTitleDisplayMode) |
BackButtonText | Custom text for the back button | .set(backButtonTitle: String?) |
SearchPlaceholderText | Custom placeholder text for search field | .set(searchPlaceholder: String) |
ShowBackButton | Whether to hide the back button | .show(backButton: Bool) |
ErrorStateText | Custom error state text | .set(errorStateText: String) |
BackButtonIcon | Custom back button icon | .set(backButtonIcon: UIImage) |
Create Group
component does not provide additional functionalities beyond this level of customization.