0
我添加一个UIView作为每个tableviewcell的contentView的子视图,我遇到一些主要问题。将UIView添加到tableviewcell的contentView
我附上了它正在做的一个屏幕截图。 http://i44.tinypic.com/11kw0ms.jpg 在每个单元格底部的那些黑条不应该在那里。
继承人我的代码:
页眉
@class CalendarCell;
@interface ...{
CalendarCell *calCell;
}
实施
#import "CalendarCell.h"
...In the cellForRowAtIndexPath method
cell.backgroundColor = [UIColor clearColor];
calCell = [[CalendarCell alloc]initWithNibName:@"CalendarCell" bundle:nil];
[calCell.view setFrame:CGRectMake(0, 0, 320, 60)];
[cell.contentView addSubview:calCell.view];
[calCell release];
return cell;