摘要: - (UIView *)tableView:(UITableView *)tableViewviewForHeaderInSection:(NSInteger)section{ UIView *headerView = [[UIViewalloc] initWithFrame:CGRectMake(10, 0, 300, 30)];//创建一个视图 UIImageView *headerImageView = [[UIImageViewalloc] initWithFrame:CGRectMake(10, 0, 300, 30)]; UIImage *image = [UIImageim... 阅读全文
posted @ 2012-05-22 15:16 hellocby 阅读(4036) 评论(0) 推荐(0) 编辑
摘要: UITableView的强大更多程度上来自于可以任意自定义UITableViewCell单元格。通常,UITableView中的Cell是动态的,在使用过程中,会创建一个Cell池,根据每个cell的高度(即tableView:heightForRowAtIndexPath:返回值),以及屏幕高度计算屏幕中可显示几个cell。而进行自定义TableViewCell无非是采用代码实现或采用IB编辑nib文件来实现两种方式,本文主要收集代码的方式实现各种cell自定义。如何动态调整Cell高度- (UITableViewCell *)tableView:(UITableView *)tableVi 阅读全文
posted @ 2012-05-22 10:32 hellocby 阅读(306) 评论(0) 推荐(0) 编辑