Custom Cell over lapping.
- by user338322
I am trying to use a custom cell,
My custom cell is of size 320*220 pixels.
My table size is 320* by 1500 which is large enough
I have set custom cell's view in scale to fill mode.
But when i fill the table using custom cell all i see is first row. i have total four rows to be filld in a custom way. but they gets overlapped and i can not see any of the table..
They do look, but overlapped, Any hints .. about why its happening
Do i need to make changes into nib?
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"CustomCell";
CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil];
for (id oneObject in nib)
if ([oneObject isKindOfClass:[CustomCell class]])
cell = (CustomCell *)oneObject;
}
cell.iconImage.image = [UIImage imageNamed:[NSString stringWithFormat:@"beach%d.jpg",indexPath.row+1]];
cell.title.text=[[RArrray objectAtIndex:indexPath.row] objectForKey:@"Beach"];
return cell;
}