I have created my own chart via drawRect
@interface FTChartsView : UIView
@implementation FTChartsView
-(void)drawRect:(CGRect)rect
{
...
}
I have also subclassed the UITableViewCell
@interface FTSummaryCellView : UITableViewCell
...
Now in the ViewController, when the cells are generated:
- (void)viewDidLoad
{
[super viewDidLoad];
UINib *nib = [UINib nibWithNibName:@"FTSummaryCellView" bundle:nil];
[[self tableView] registerNib:nib forCellReuseIdentifier:@"FTSummaryCellView"];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
FTSummaryCellView *cell = [tableView dequeueReusableCellWithIdentifier:@"FTSummaryCellView"];
FTChartsView *chart = [[FTChartsView alloc] init];
[cell addSubview:chart];
return cell;
}
The cell gets the chatrView added as subview. However chartsView's drawRect
, is never breaking and hence never showing.
What am I missing here please?