概述

大约 3 分钟

概述

环信单群聊 UIKit 是基于环信即时通讯云 IM SDK 开发的一款即时通讯 UI 组件库,提供各种组件实现会话列表、聊天界面、联系人列表及后续界面等功能,帮助开发者根据实际业务需求快速搭建包含 UI 界面的即时通讯应用。

你可以查看 UIKit 源码open in new window

在 UIKit 中主要使用状态管理 V2 版本,如果开发者项目中主要使用状态管理 V1 版本,使用时可参考自定义组件混用场景指导open in new window

UIKit 基本项目结构

└── chatuikit
    ├── ChatUIKitClient                      // UIKit SDK 入口
    ├── ChatUIKitConfigs                     // UIKit SDK 配置类
    ├── pages                                // UIKit 页面
    │   ├── ChatPage                           // 聊天页面
    │   ├── ConversationListPage               // 会话列表页面
    │   ├── ContactListPage                    // 联系人列表页面
    │   └── CreateGroupPage                    // 创建群组页面
    ├── components                           // UIKit 组件模块
    │   ├── chat                               // 聊天组件模块
    │   │   ├── ChatView                         // 聊天集成组件
    │   │   ├── ChatComponents                   // 聊天页面相关子组件
    │   │   ├── MessageComponents                // 消息相关子组件
    │   │   ├── MessageBuilders                  // 消息相关自定义构件函数
    │   │   └── bubbles                          // 消息不同类型气泡组件
    │   │       ├── MessageTextBubbleView          // 文本消息气泡组件
    │   │       ├── MessageImageBubbleView         // 图片消息气泡组件
    │   │       └── ......                         // 其他消息气泡组件
    │   ├── conversation                       // 会话列表组件模块
    │   │   ├── ConversationListView             // 会话列表集成组件
    │   │   ├── ConversationComponents           // 会话相关子组件
    │   │   └── ConversationBuilders             // 会话相关自定义构件函数
    │   └── contact                            // 联系人组件模块
    │       ├── ContactListView                  // 联系人列表集成组件
    │       ├── ContactComponents                // 联系人列表相关子组件
    │       └── ContactBuilders                  // 联系人相关自定义构件函数
    ├── viewmodels                           // UIKit SDK ViewModel 文件夹
    ├── model                                // UIKit SDK 数据类文件夹
    ├── repositories                         // UIKit SDK 数据仓库类文件夹
    └── constants                            // UIKit SDK 常量类文件夹

功能介绍

单群聊 UIKit 中业务相关的 UI 页面主要包含在以下三个 Page 中:ChatPageConversationListPageContactListPage。下图展示单群聊 UIKit 的主要功能:

聊天页面功能

ChatPage 是提供所有聊天组件的容器。

会话列表页面功能

ConversationListPage 是提供会话列表组件的容器。

通讯录页面功能

ContactListPage 是提供联系人列表的容器。

页面搜索功能

单群聊 UIKit 提供以下搜索功能: