Code Monkey home page Code Monkey logo

uuchattableview's Introduction

UUChatTableView

Cocoa UI component for chat bubbles with text, images and audio support

GIF 动画演示

Flipboard playing multiple GIFs

截图 - ScreenShot

图片一 图片一

群聊(GroupChat)效果图(新添UI细节)

图片三
图片三

使用类介绍 - Introduce

类名 作用及用法
UUMessage 内容数据Model,储存文字、语音、头像、图片、时间等等
UUMessageFrame cell的model,设置气泡聊天的布局
UUMessageCell 呈现UI,并做cell的事件处理(语音、图片、头像点击)
UUMessageContentButton 气泡内容的封装及copy功能
UUInputFunctionView tableView底部的视图,相当于ToolBar
UUImageAvatarBrowser 放大图片功能,其实这是障眼法详细查看
UUAVAudioPlayer 语音功能封装,实现本地和线上URL播放,缺点是还没有做像SDWebImage那样的本地缓存
UUProgressHUD Window层上得HUD,功能简易
第三方库 说明
MJRefresh 下拉加载更多聊天记录
AFNetworking 仅使用UIKit+AFNetworking,类似 SDWebImage
VoiceLib 忘记了来自哪里的,找半天没有找到。语音录入及格式转化成MP3

使用方法 - Usage

声明一下| ----- | ----- 当前的数据是在固定模式下随机模拟的,不包含用户输入的所有可能性| 有不习惯Xib编程的有问题可以问我,以前我因为不会而不想去改变 | 我还没有去试iOS6下得适配,要是你测试过油问题可以修改提交或者告诉我 | 有人提到群聊功能,只需要在getDic方法添加其他人信息即可点击查看| 感谢丁南修复语音播放及其他的一些bug|

添加代理

UUInputFunctionViewDelegate

// 返回文字内容
- (void)UUInputFunctionView:(UUInputFunctionView *)funcView sendMessage:(NSString *)message;
// 返回图片数据
- (void)UUInputFunctionView:(UUInputFunctionView *)funcView sendPicture:(UIImage *)image;
// 返回语音数据和录音时长
- (void)UUInputFunctionView:(UUInputFunctionView *)funcView sendVoice:(NSData *)voice time:(NSInteger)second;

UUMessageCellDelegate

//cell的头像点击
- (void)headImageDidClick:(UUMessageCell *)cell userId:(NSString *)userId;
//图片点击可有可无
- (void)cellContentDidClick:(UUMessageCell *)cell image:(UIImage *)contentImage;

Swift版

Code版

StoryBoard版

Swift2.0版将完全使用autolayout(storyboard或code)。

uuchattableview's People

Contributors

zhipingyang avatar ijinmao avatar kyonli avatar yangzhiping avatar jkdntc avatar yangyangyyluck avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.