Skip to main content
Version: Next

Images

ChatImages class provides a set of predefined images and icons used in chat interface. Supports both SF Symbols and custom images from application bundle.

info

To simplify configuration and reduce SDK size, SF Symbols are used as default icons

Description

ChatImages is a base class providing unified access to various application icons and images. All images are implemented through ChatImage class, which supports:

  • SF Symbols with size and color specification
  • Custom images from SDK resources
  • Unified tint color management (tintColor)

This approach ensures UI consistency and simplifies theming.

Main Image Groups

  • backButtonImage - Back button icon
  • nextButtonImage - Next button icon
  • closeButtonImage - Close icon

Messages

  • sendButtonImage - Send message
  • attachButtonImage - Attach file
  • menuCopyImage - Copy
  • menuQuoteImage - Quote

Chat States

  • emptyChatPlaceholderImage - Empty chat
  • errorChatPlaceholderImage - Chat loading error
  • avatarPlaceholderImage - Avatar placeholder

Reactions & Rating

  • likeEmptyImage - Inactive like
  • likeFullImage - Active like
  • dislikeEmptyImage - Inactive dislike
  • dislikeFullImage - Active dislike
  • starRatingEmptyImage - Inactive star
  • starRatingFullImage - Active star

Voice Messages

  • voiceButtonImage - Voice recording
  • voiceSendButtonImage - Voice sending
  • voicePlayImage - Playback
  • voicePauseImage - Pause

Message Status

  • sentStatusImage - Message sent
  • pendingStatusImage - Message in progress
  • readStatusImage - Message read

For complete list, see API Documentation

ChatImage Class

ChatImage class is a unified wrapper over UIImage, supporting:

  • SF Symbols
  • Custom images
  • Color configuration (tintColor)
  • Size management

Constructors

/// Custom image
init(named: String, tintColor: UIColor? = nil)

/// SF Symbol
init(system name: String, tintColor: UIColor? = nil)

/// SF Symbol with size
init(system name: String, size: CGFloat = 14, tintColor: UIColor? = nil)

Usage Example

import ChatCenterUI

let images = ChatImages()

// Customize icons
images.sendButtonImage = ChatImage(system: "paperplane.fill", tintColor: .blue)
images.backButtonImage = ChatImage(system: "chevron.left", tintColor: .black)
images.avatarPlaceholderImage = ChatImage(system: "person.circle.fill", tintColor: .gray)

// Use custom images from assets
images.sendButtonImage = ChatImage(named: "custom_send_icon", tintColor: .blue)

// Create theme with customized images
let components = ChatComponents(images: images)
let theme = ChatTheme(components: components)

chatCenterSDK.theme = theme
tip

For branding consistency, replace default icons with your custom images from application assets.