• 서비스
  • 가격
  • 리소스
  • 기술지원
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.
Feedback

iOS(SwiftUI)

Component Overview

MessageInput is a SwiftUI-based message input component that enables users to compose and send a variety of message types, including text, images, videos, files, and voice messages. It features an integrated emoji picker, supports multiple style configurations, and offers extensive customization options.
Message Input Interface
Emoji Picker



Component Integration

MessageInput is included in TUIKit SwiftUI. To use MessageInput, integrate TUIKit SwiftUI into your project. For detailed integration steps, see the TUIKit SwiftUI documentation.

Component Structure

MessageInput consists of the main input component and a style configuration protocol, providing message input capabilities and supporting customization.

Initialization Parameters

Parameter
Type
Description
conversationID
String
Conversation ID used to identify the current chat session
config
MessageInputConfigProtocol
Input style configuration that controls which function buttons are displayed

Public API

Method
Parameters
Description
init
conversationID: String, config: MessageInputConfigProtocol
Initializes the message input component

Basic Usage

To get started, initialize the MessageInput component with a conversation ID:
import AtomicX
import SwiftUI

struct ChatView: View {
var body: some View {
VStack {
Spacer()
MessageInput(
conversationID: "conversation_123"
)
}
}
}

Customization

You can control which feature buttons appear on the input bar:
// Customize the displayed function buttons
MessageInput(
text: $inputText,
conversationID: conversationID,
config: ChatMessageInputConfig(
isShowAudioRecorder: false, // Hide audio recording
isShowPhotoTaker: true, // Show photo capture
isShowMore: true, // Show "More" options
isShowSendButton: true // Show send button
)
)
The following images show different customization effects:
Default Input Box
Input Box with Audio Recording Hidden
Input Box with All Features Hidden