tableView的一些方法

tableView设置可以滚动的背景图片
/ios7一句话搞定//没试过
【tableView  insertSubview:tableBackGroundView atIndex:0】;
/ios6
 [tableView insertSubview:tableBackGroundView atIndex:0];
除此之外
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section;
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;
上面的三个方法若被调用则要在被调用的方法加一句
[actionTableView sendSubviewToBack:tableBackGroundView];
刷新某行cell的方法
NSIndexPath *indexPath_1=[NSIndexPath indexPathForRow:1 inSection:0];
      NSArray *indexArray=[NSArray arrayWithObject:indexPath_1];
      [myTableView reloadRowsAtIndexPaths:indexArray withRowAnimation:UITableViewRowAnimationAutomatic];
iOS7上tableView的分割线左边短了一点
[_tableView setSeparatorInset:UIEdgeInsetsZero]
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章