TUIConversationListController Class Reference

Inherits from UIViewController
Declared in TUIConversationListController.h
TUIConversationListController.m

Overview

【模块名称】消息列表界面组件(TUIConversationListController)

【功能说明】负责按消息的接收顺序展示各个会话,同时响应用户的操作,为用户提供多会话的管理功能。 消息列表所展示的会话信息包括: 1、头像信息(用户头像/群头像) 2、会话标题(用户昵称/群名称) 3、会话消息概览(展示最新的一条的消息内容) 4、未读消息数(若有未读消息的话) 5、会话时间(最新消息的收到/发出时间)

Other Methods

– viewDidLoad

- (void)viewDidLoad

– dealloc

- (void)dealloc

– setupViews

- (void)setupViews

– viewModel

消息列表的视图模型 视图模型能够协助消息列表界面实现数据的加载、移除、过滤等多种功能。替界面分摊部分的业务逻辑运算。

- (TConversationListViewModel *)viewModel

Declared In

TUIConversationListController.h

– tableView:numberOfRowsInSection:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section

– tableView:heightForRowAtIndexPath:

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

– tableView:canEditRowAtIndexPath:

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath

– tableView:editingStyleForRowAtIndexPath:

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath

– tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath

– tableView:shouldIndentWhileEditingRowAtIndexPath:

- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath

– tableView:commitEditingStyle:forRowAtIndexPath:

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath

– didSelectConversation:

- (void)didSelectConversation:(TUIConversationCell *)cell

– tableView:cellForRowAtIndexPath:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

– adaptivePresentationStyleForPresentationController:

- (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller

Other Methods

  tableView

消息列表。 消息列表控制器通过 UITableView 的形式实现会话的统一展示。 UITableView 同时能够提供各个单元的删除、点击响应等管理操作。

@property (nonatomic, strong) UITableView *tableView

Declared In

TUIConversationListController.h

  delegate

委托类,负责实现 TUIConversationListControllerDelegagte 的委托函数。

@property (nonatomic, weak) id<TUIConversationListControllerDelegagte> delegate

Declared In

TUIConversationListController.h