iOS 气泡聊天效果
来源:互联网 发布:繁忙的收发室 优化 编辑:程序博客网 时间:2024/04/29 03:50
首先的准备条件
1 第三方的包
2 添加 QuartzCore.framework
开始!
拉一个TableView 类型修改
然后创建关联
.h 这样
#import <UIKit/UIKit.h>
#import "UIBubbleTableViewDataSource.h"
#import "UIBubbleTableView.h"
#import "NSBubbleData.h"
@interface ViewController :UIViewController<UIBubbleTableViewDataSource>
{
//表
IBOutletUIBubbleTableView *table;
//放聊天的数据
NSMutableArray *bubbleData;
}
.m里面必须有这几个
#pragma mark - UIBubbleTableViewDataSource implementation
- (NSInteger)rowsForBubbleTable:(UIBubbleTableView *)tableView
{
return [bubbleDatacount];
}
- (NSBubbleData *)bubbleTableView:(UIBubbleTableView *)tableView dataForRow:(NSInteger)row
{
return [bubbleDataobjectAtIndex:row];
}
注意一点 :
在viewdiaload里面 必须有
table.bubbleDataSource =self;
好了现在开始添加数据
[bubbleDataaddObject:[NSBubbleDatadataWithText:@"dsfdafdasfasdfadsfdsafadsfdasfadsfasfsafdsafasdfadsfdasadas"andDate:[NSDatedateWithTimeIntervalSinceNow:400] andType:BubbleTypeMine]];
//刷新
[tablereloadData];
.m的全部代码
全部代码下载在这里
http://download.csdn.net/detail/aa741649143/5807795
- iOS 气泡聊天效果
- 聊天气泡效果实现
- iOS制作聊天气泡
- 仿微信聊天气泡效果实现
- 仿微信聊天气泡效果实现
- 仿微信聊天气泡效果实现
- 实现QQ聊天气泡效果
- 网页聊天气泡效果实现
- ios 仿微信,短信聊天气泡
- ios 仿微信,短信聊天气泡
- css3实现气泡效果的聊天框
- android 仿微信聊天气泡效果实现思路
- 【HTML5】实现QQ聊天气泡效果
- 纯CSS实现聊天框小尖角、气泡效果
- 使用css实现QQ聊天气泡效果
- 纯CSS实现聊天框小尖角、气泡效果
- DUILIB 实现微信气泡聊天效果
- 类似QQ的聊天气泡效果
- MySql存储过程—6、循环
- 抓取屏幕保存为AVI文件
- 蛙泳姿势教学
- Logistic Regression--逻辑回归算法汇总
- CAS 之 实现用户注册后自动登录
- iOS 气泡聊天效果
- codeforce小水题——
- android 自定义lib
- 黑马程序员java枚举
- win7 mysql 安装 报The security settings could not be applied to the database
- MySql存储过程—7、游标(Cursor)
- CDH4 impala安装配置
- SELECT语句执行顺序解析
- Struts2教程5:使用Validation框架验证数据