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]
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章