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;