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
Navigation
backButtonImage- Back button iconnextButtonImage- Next button iconcloseButtonImage- Close icon
Messages
sendButtonImage- Send messageattachButtonImage- Attach filemenuCopyImage- CopymenuQuoteImage- Quote
Chat States
emptyChatPlaceholderImage- Empty chaterrorChatPlaceholderImage- Chat loading erroravatarPlaceholderImage- Avatar placeholder
Reactions & Rating
likeEmptyImage- Inactive likelikeFullImage- Active likedislikeEmptyImage- Inactive dislikedislikeFullImage- Active dislikestarRatingEmptyImage- Inactive starstarRatingFullImage- Active star
Voice Messages
voiceButtonImage- Voice recordingvoiceSendButtonImage- Voice sendingvoicePlayImage- PlaybackvoicePauseImage- Pause
Message Status
sentStatusImage- Message sentpendingStatusImage- Message in progressreadStatusImage- 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.