{"id":15034052,"url":"https://github.com/zyprosoft/zychat","last_synced_at":"2025-05-16T11:05:43.170Z","repository":{"id":34876376,"uuid":"38887019","full_name":"zyprosoft/ZYChat","owner":"zyprosoft","description":"聊天UI框架，针对高速高频刷新最近会话和对话页面做了优化处理,支持单聊，群聊,优化支持更多消息类型:文本表情混排,多图发送，Gif动画，短视频，语音，音乐分享，网页分享，鲜花特效。ZYChat-EaseMob是基于环信IM3.x版本的项目运用,附:ZYChat纯UI框架:","archived":false,"fork":false,"pushed_at":"2017-12-05T09:10:56.000Z","size":203028,"stargazers_count":1316,"open_issues_count":3,"forks_count":390,"subscribers_count":64,"default_branch":"master","last_synced_at":"2025-05-16T11:05:36.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/zyprosoft/ZYChat-Source-Origin","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"thedaviddias/Front-End-Checklist","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zyprosoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-10T15:17:16.000Z","updated_at":"2025-04-27T09:33:56.000Z","dependencies_parsed_at":"2022-09-09T02:20:22.511Z","dependency_job_id":null,"html_url":"https://github.com/zyprosoft/ZYChat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyprosoft%2FZYChat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyprosoft%2FZYChat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyprosoft%2FZYChat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyprosoft%2FZYChat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zyprosoft","download_url":"https://codeload.github.com/zyprosoft/ZYChat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518383,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T20:23:46.000Z","updated_at":"2025-05-16T11:05:38.152Z","avatar_url":"https://github.com/zyprosoft.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZYChat\n\n## (一) 是一个实战项目的聊天UI框架，针对高频次高速率刷新最近会话列表和实际对话页面做了缓冲优化,经过测试会话使用的性能和体验非常稳定。\n\n## (二) UI框架参考MVVM思想设计，并采用自身总结的一些常用设计模式,可以帮助你快速实现搭建多样式的列表页面，代码复用率可以有稳定的提升。\n\n## (三) ZYChat-EaseMob 是基于环信的UI项目应用实战，将ZYChat类库和实际项目使用结合。\n\n## (四) 消息类型目前扩展至: 文本，语音，音乐，网页，鲜花特效，短视频\n\n## (五) 想更深入的探讨学习请加QQ群:219357847\n\n## (六) 怎么运行? 需要先pod所需要的库，下载完成后，切到workspace所在目录，执行pod update命令完成pods安装即可打开workspace进行编译运行。\n\n### 项目运行截图\n\n![s_show](https://raw.githubusercontent.com/zyprosoft/ZYChat/master/ScreenShot/s_show.png \"s_show\")  \n\n###项目代码结构图\n\n![c_show](https://raw.githubusercontent.com/zyprosoft/ZYChat/master/ScreenShot/c_show.png \"c_show\")  \n\n### 项目新增功能\n\n* 1. 直接在聊天界面播放音乐\n* 2. 新增送花功能\n\n##项目核心模块注释\n\n# ChatDetail  具体聊天\n  *Resource 用到的图片\n  *UITableViewCell 聊天所有的cell使用\n  \n    *Base      聊天内容基类Cell,负责分发类型\n    \n    *ChatCell  聊天内容Cell,    负责处理聊天类型的消息展示\n    \n      *GJGCChatFriendBaseCell , 基础内容Cell，包含消息显示的：头像，昵称(根据会话类型显示隐藏),气泡,状态\n      \n      *GJGCChatFriendTextMessageCell, 文本内容显示\n      \n      *GJGCChatFriendImageMessageCell, 图片内容显示\n      \n      *GJGCChatFriendAudioMessageCell, 语音内容显示\n      \n      *GJGCChatFriendTimeCell, 时间块显示\n      \n    *SystemNoti 系统消息Cell,   负责展示系统消息\n    \n  *View 聊天时候用到的自定义视图和风格控制\n  \n    *GJGCCommonFontColorStyle 全局风格控制\n    \n    *GJGCCommonHeadView 全局头像显示\n    \n    *GJGCChatContentEmojiParser 文本解析成图文内容\n    \n    *GJGCRefreshHeader 下拉刷新\n    \n    *GJGCRefreshFooter 上拉加载\n    \n    *GJGCLoadingStatusHUD 加载HUD,基类初始化，全局可用\n    \n  *ViewController\n  \n    *Base 基础类,负责分发 系统消息或者对话消息类型\n  \n    *MessageExtend 消息类型扩展，基于环信的消息ext字段来扩展消息，以支持gif等更多类型消息\n    \n    *Friend 单聊会话，群聊本质上也是1v1会话，只是有一些特殊逻辑需要单独处理，为了避免庞大的DataManager和ViewController,需要分开\n    \n    *GifLoadManager 本地Gif包管理\n    \n    *Group 群聊管理\n    \n    *SystemAssist 系统消息管理\n    \n#RecentChat 最近会话\n\n  *GJGCRecentChatViewController  视图管理层\n  *GJGCRecentChatCell            单行会话展示\n  *GJGCRecentChatModel           内容模型\n  *GJGCRecentChatDataManager     模型管理层\n  *GJGCRecentChatStyle           风格管理\n  *GJGCRecentChatTitleView       服务器连接状态展示\n\n#Square  广场\n\n  *CreateGroup  创建群组\n  *PublicGroup  广场群组列表\n  \n#GroupCommonUI  群组资料和个人资料展示\n \n  *GJGCGroupInformationViewController 群组资料展示\n  *GJGCPersonInformationViewController 个人资料展示\n  \n\n#如何扩展消息类型\n\n 扩展消息类型需要做三件事情\n \n 1. 继承GJGCChatFriendBaseCell 来扩展对话消息\n 2. GJGCChatFriendConstans 在关系绑定中将内容类型和新扩展的消息类型绑定\n 3. 在创建内容模型的时候，将内容类型设置为新创建的内容类型即可绑定\n \n##例子\n\n *首先创建内容展示的样子，GJGCCHatFriendGifCell\n *在内容模型中定义        gifLocalId , 在 GJGCChatFriendConstans 中定义内容类型 GJGCChatFriendContentTypeGif\n * 在GJGCChatFriendConstans 实现 ContentType 和 Cell的绑定\n *在创建GJGCChatFriendContentModel的时候将内容设置为GJGCChatFriendContentTypeGif就可以实现加载对应的gifCell\n\n#如何基于环信的消息扩展字段配合GJGCMessageExtendModel实现扩展消息类型的目的\n\n *userInfo : 用户信息，始终从消息中带过去，根据App情况，也可以不用传过去节省流量，这里我们是没有服务器，所以传过去\n \n *data:   扩展消息的内容，看一下我们定义的一些常量key,对应的我们可以把需要扩展的内容填充\n \n *message_type: 扩展的消息类型，类似常规时候的 text,gif,voice这些类型的定义方式\n \n *is_message_extend: 是否是消息扩展，当不是扩展消息的时候，我们只读用户扩展信息userInfo就可以了\n \n *display_text: 扩展消息应该展示的文本，如果对方源码不支持此扩展消息，相应这个文本会有变化\n \n *is_support_display: 根据双方本地的内容协议支持来确定，是否支持正常显示这条扩展消息\n \n\n###工具类库注释 (Dependcy)\n\n*Base64   用于压缩编码字符串，在群信息压缩的环节使用\n\n*EaseMob  环信聊天服务SDK\n\n*fmdb     最好用的Sqlite,在上面做了一层简单的封装，支持对象化CURD操作\n\n*GJCFCachePathMananger 应用层全局的缓存目录管理\n\n*GJCUProgressView 自定义的一个进度展示\n\n*SDWebImage   最好用的图片缓存库，目前基本全部使用此类库来加载图片\n\n*JSONModel    实测使用最稳定的Json转模型，很好的自定义扩展，在项目中Json与模型转化和生成都运用到了\n\n*GJCURoundCornerView 取自另一个作者的一个控件，可以自定义四个角的圆角和试图的bord情况\n\n*GJCUCapture  根据Apple的AVCapture Demo 自定义的一个拍照的组件，母的是解决iOS7.0 iPhone4,5下的拍照黑屏问题\n\n*GJGCChatInputPnael  项目中对话使用的聊天输入控制面板\n\n*AFNetworking  最好用的网络库\n\n*AudioCoder    语音编码库，公开的\n\n*DownloadManager 任务化下载组件\n\n*FileUploadManager 任务化上传组件\n\n*FLAnimateImage  用于Gif表情展示\n\n*GJCFAssetsPicker 自定义图片选择\n\n*GJCFAuidoManager 播放和录音\n\n*GJCFCoreText     自定义图文混排组件\n\n*GJCFUitils       常用工具函数\n\n*GJCUAsyncImageView 自定义异步图片加载，不是非常稳定，目前底层全部改成SDWebImage加载\n\n*GJCUImageBrowase 大图浏览组件\n\n\n#为什么做这个聊天室？\n\n 大家都在做App，可能各种需求，各种蛋疼的坑，老板说，我们就是要有个IM消息服务，但是还得能自己定义，那么OK，我们的目标来了，谁来写呢，再写一遍，很麻烦，ZYChat经过对话详情页疯狂对发消息测试，没有任何问题，所以，我们要得是一个真实的对话聊天项目，并且它是开源的，大家都可以来做一些自己想做的扩展，我们需要关心的就是，我们要做的是什么，如何使用它，节省我们的时间。所以，ZYChat-EaseMob就诞生了。\n \n#帮助我改进\n\n我知道这个代码可能在很多大神面前都是不值得一提的东西，但是，我希望帮助到它能够帮助到得人就可以了。如果还有需要帮助咨询的，可以给我发邮件1003081775@qq.com，如果感兴趣可以联系我加入一起开发完善此项目,谢谢大家支持,更多需要详细解答问题的请加QQ群:219357847。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyprosoft%2Fzychat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzyprosoft%2Fzychat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyprosoft%2Fzychat/lists"}