tableview的基本属性即协议方法


//是否允许单元格多选
     _tableview.allowsMultipleSelection = YES;
//设置尾部视图
     _tableview.tableFooterView = [[UIView alloc]init];
//是否展示滑动条
     _tableview.showsVerticalScrollIndicator = NO;//竖直
 //关闭系统自带的分割线
_tableview.separatorStyle = UITableViewCellSeparatorStyleNone;

 _tableview.scrollEnabled = NO;  不予许tableView滑动

协议方法:
didDeselectRowAtIndexPath:  表示取消选中

- (UIView *)tabelview...titleHeader...  : 自定义tableView的section的视图

让tableview滑动到某个地方:
//滑动到顶部(UIScollview的方法)
[self.tableview scrollsToTop];
    
    //滑动到指定的地方(UITableview的方法):
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:3 inSection:0];
    [self.tableview scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionNone animated:YES];
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容