UIKit系列常见处理办法集合
局部刷新tabelvie
//局部section刷新
NSIndexSet * nd=[[NSIndexSet alloc]initWithIndex:1];//刷新第二个section
[tview reloadSections:nd withRowAnimation:UITableViewRowAnimationAutomatic];
//局部cell刷新
NSIndexPath *te=[NSIndexPath indexPathForRow:2 inSection:0];//刷新第一个section的第二行
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:te,nil] withRowAnimation:UITableViewRowAnimationMiddle];
UITableView隐藏多余的分割线
- (void)setExtraCellLineHidden: (UITableView *)tableView{
UIView *view = [UIView new];
view.backgroundColor = [UIColor clearColor];
[tableView setTableFooterView:view];
[view release];
}
cell 宽度
//cell内重写
- (void)setFrame:(CGRect)frame{
CGSize size = CGSizeMake(View_Width, 44);
frame.size = size;
[super setFrame:frame];
}
网友评论