Custom Cell over lapping.

Posted by user338322 on Stack Overflow See other posts from Stack Overflow or by user338322
Published on 2010-05-24T20:05:50Z Indexed on 2010/05/24 20:11 UTC
Read the original article Hit count: 165

Filed under:
|

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;

}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk-3.0