您的位置:首页 > 产品设计 > UI/UE

UITableView中常用方法

2015-10-12 16:37 507 查看
/ 当某行没选择时候,调用此方法
- (void)tableView:(UITableView  *)tableViewdidSelectRowAtIndexPath:(NSIndexPath *)indexPath
// 初始化每行时候,调用此方法
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath
// 用于返回table中有几个分组
- (NSInteger )numberOfSectionsInTableView:(UITableView *)tableView; 
// 用于返回每个分组中有多少行
- (NSInteger )tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
// 用于设置指定行的行高
- (CGFloat )tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 
// 用于设置分组头的高度
- (CGFloat )tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
//用于设置分组的标题

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section

//用于返回分组的视图

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: