surferbloggy 0 Newbie Poster

Hi, i have a UITableview filled by an xml it works, but if i load the cell from xib file and set the height of the cell to 196 the rows don't fit the view and from the third cell they are invisible becouse there isn't scrolling
how could i do to enable scrolling nd see all the rows??
this is the code how could i fix it? thank you for help

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    //return 0;
    return [[channel items] count];
}
- (CGFloat)tableView :(UITableView *)tableView heightForRowAtIndexPath :(NSIndexPath *)indexPath {

    return 196;

}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

    ///////////////////////
    static NSString *simpleTableIdentifier = @"SimpleTableCell";
    ZRK_RSSItem *item = [[channel items] objectAtIndex:[indexPath row]];
    CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
    if (cell == nil)
    {
        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil];
        cell = [nib objectAtIndex:0];
    }


    ///////////////////////////


    if ([[item imagesFromContent] count]>0) {


            [cell.thumbnail setImageWithURL:[NSURL URLWithString:[[item imagesFromContent] objectAtIndex:0]]
                           placeholderImage:[UIImage imageNamed:@"thumb.png"]];



    }
    //    -------------------------------------------------------------------------

    /*IF FEED BURNER DISPLAY YOUR IMAGES BUT YOU CANNOT SEE THEM ON TABLE VIEW CHANGE

     [item imagesFromItemDescription] AND [item.imagesFromItemDescription objectAtIndex:0]

     to

     [item imagesFromContent] AND [item.imagesFromContent objectAtIndex:0]
     **/



    cell.title.text = [item title];
    //[cell.title setBackgroundColor:[UIColor clearColor]];
    [cell.title setBackgroundColor:[UIColor redColor]];

    tableView.separatorColor = [UIColor darkGrayColor];

    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"MMM d, YY"];
    NSString *lastUpdated = [NSString stringWithFormat:@" %@",[formatter stringFromDate:[item publicationDate]]];
    cell.dateOfPub.text = lastUpdated;
    [cell.dateOfPub setBackgroundColor:[UIColor blackColor]];



     return cell;
    ////////////////////////////



    //////////////////////
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.