UITableView cell disappears when scrolling

I have set up individual cells for a single cell in a UITableViewController to display a view that was longer than the screen. However, when testing, I notice that the cell will disappear (disappear) when scrolling down before it leaves the field of view. This does not represent anything, but I do not understand why it would disappear when scrolling down, especially when it did not leave the visible area anywhere.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { VendorDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:@"VendorDetailCell"]; cell.vendorImage.image = [UIImage imageWithData: self.imageData.data]; cell.vendorTitle.text = self.imageData.vendorTitle; cell.vendorDescription.text = self.imageData.vendorDescription; return cell; } 
+2
source share
1 answer

This can happen when a cell frame in a table view scrolls so that it is outside the frame of the table view.

  • Are you implementing tableView:heightForRowAtIndexPath: :?

  • Is this height the height of the cell?

  • Would it be better if a cell were split into several cells in one section of a table view?

+2
source

Source: https://habr.com/ru/post/1243541/


All Articles