网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

IOSUITableView表格视图详解

IOS 表格视图类UITableView

成都创新互联是一家专业的成都网站建设公司,我们专注成都网站设计、成都网站制作、外贸网站建设、网络营销、企业网站建设,买友情链接广告投放平台为企业客户提供一站式建站解决方案,能带给客户新的互联网理念。从网站结构的规划UI设计到用户体验提高,创新互联力求做到尽善尽美。

实现的协议:UITableViewDataSource,UITableViewDelegate

必须实现下面的3个方法:

self.tableView.separatorStyle=UITableViewCellSeparatorStyleSingleLine;  

- (NSInteger)numberOfSectionsInTableView:(UITableView*)tableView {

  return 1;

}

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

  return 3;

}

- (UITableViewCell*)tableView:(UITableView*)tableView

  cellForRowAtIndexPath:(NSIndexPath*)indexPath

{

    

    //使单元格右侧显示一个箭头

   cell.accessoryType =UITableViewCellAccessoryDisclosureIndicator;

    cell.selectionStyle =UITableViewCellSelectionStyleNone; 


}

可选的方法:

- (void)tableView:(UITableView*)tableView

  didSelectRowAtIndexPath:(NSIndexPath*)indexPath

{

}

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

  return ( 1 == indexPath.section );

}

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

  return @"标题";

}

- (void)tableView:(UITableView*)tableView willBeginEditingRowAtIndexPath:(NSIndexPath*)indexPath {

}

- (void)tableView:(UITableView*)tableView didEndEditingRowAtIndexPath:(NSIndexPath*)indexPath {

}

- (void)tableView:(UITableView*)tableView

  commitEditingStyle:(UITableViewCellEditingStyle)editingStyle

   forRowAtIndexPath:(NSIndexPath*)indexPath

{

  if ( UITableViewCellEditingStyleDelete == editingStyle ) {

  }

}


本文题目:IOSUITableView表格视图详解
分享网址:http://bjjierui.cn/article/jhejsh.html

其他资讯