1. UITableView隐藏没有数据的cell的边框线
- (void)setExtraCellLineHidden: (UITableView *)tableView
{
UIView *view =[ [UIView alloc]init];
view.backgroundColor = [UIColor clearColor];
[tableView setTableFooterView:view];
[view release];
}
2. 设置TableView的边框线,(需引进QuartzCore.framework)
Table.layer.borderWidth = 1;
Table.layer.borderColor = [UIColor redColor];
3. 设置TableView初始化时默认滚动到某一行
NSIndexPath *idxPath = [NSIndexPath indexPathForRow:i inSection:0]; //i为需要滚动到的行数
[Table scrollToRowAtIndexPath:idxPath atScrollPosition:UITableViewScrollPositionTop animated:NO];