UserDetailsViewController
provides a detailed view of a CometChat user’s profile and key interaction options, including:
CometChat.login()
before presenting the details screen.Component | Role |
---|---|
CometChatAvatar | Displays user’s profile picture with customizable styling. |
CometChatMessagesViewController | Opens the 1-on-1 chat interface when “Message” is tapped. |
CometChatCallButtons | Initiates audio/video calls (CometChat.startCall() ). |
CometChatUIKit.blockUser() | Blocks the selected user and updates UI accordingly. |
CometChatUIKit.unblockUser() | Unblocks a user if previously blocked. |
UserDetailsViewController
with the selected user’s data.
UserDetailsViewController.swift
Ensures the details screen loads with the correct user context.
UserDetailsViewController.swift
Applies theme-based styling and updates status label on appearance.
UserDetailsViewController.swift
Conditionally shows call options based on SDK availability.
UserDetailsViewController.swift
Manages user relationships and conversation lifecycle.
UserDetailsViewController.swift
Keeps profile status and block state in sync with real-time events.
CometChatAvatarStyle
to adjust shape and border.CometChatTheme
and CometChatTypography
for fonts and colors.Feature | Component / Method |
---|---|
Display user details | CometChatAvatar , UILabel |
Open chat | CometChatMessagesViewController(user:) |
Audio/video call | CometChat.startCall() via Call Buttons |
Block user | CometChatUIKit.blockUser(uid:) |
Unblock user | CometChatUIKit.unblockUser(uid:) |
Delete conversation | CometChat.deleteConversation() |