聊天页类图
2021-08-03 10:55:54 22 举报
聊天页类图
作者其他创作
大纲/内容
M层
AsyncSocket
- (void)connectToHost:port;- (void)close;- (void)sendMessage;- (BOOL)isConnecting;
ChatRequestModel
NSString *command;NSString *message;NSInteger type;NSInteger size;CGFloat lat;CGFloat lng;
//发送、接收消息转换- (NSDictionary *)dictionaryValue;
数据通知
ChatViewController
- (void)viewDidLoad;- (void)viewWillAppear;- (void)viewWillDisappear;- (void)dealloc;
ChatViewModel
NSMutableArray *dataArray;
-(void)cacheData;-(void)featherData;
Client
ChatCell
- bindModel;
ChatDataSource
- (void)request:completion;
ChatModel
NSString *msgid; // 消息IDNSString *nickname; // 昵称NSString *avatar; // 消息主人的头像NSString *avatar_160; //160X160头像NSString *message; // 消息内容NSString *message_300; //当消息为图片时候,缩略图路径NSString *time; // 发送或接收时间NSInteger senderuid; // 消息发送者idNSInteger receiveruid; // 消息接收者id
- (id)initWithDictionary;
ChatView
- initWithFrame;
UI更新
VM层
V/VC层
0 条评论
下一页