Thursday 15 April 2010

ios - Random display of UIImageView in UITableView cells when scrolling -


I have a custom separator in every cell (added to the IB), I want to delete / hide it on the basis Specific Status:

  - (UITableViewCell *) TableView: (UITableView *) Table View CellForOutPath: (NSIndexPath *) Index Path {Fixed NSString * CellIdentifier = @ "satellite"; Satellite cell * cell = [tableview decouwer reusable cell wit identifier: cell identifier]; If (! Cell) {cell = [[satellites cell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier]; } If ([[Arofe radios ObjectAntindex: IndexPath.OR] Evelatostring: @ ""]] {{Cell.Sepetter Image Deletion ProView}; Cell.separatorImage = Zero; } Cell.satelliteName.text = [arrayofSatellitesName object import index: indexPath.row]; Return cell; }   

While launching the scene, all is OK, but the problem is that, on scrolling, the separator (UIImageView) is randomly displayed in each cell.

If I understand you correctly, you want to use the same cell prototype but It looks different depending on the data. If this is the case, then I will not remove the separator image from the supervisor, just hide it (like. cell.separator image. Hidden = yes; ). In such a case, in the other case, if you have the statement, you show it (eg. cell.separatorImage.hidden = NO; ).

Or I think, if you have a specific reason to remove it from the supervision, just make sure to make another statement for that statement, and add it back to the cell (like. [Cell ad sbueview: cell separator image]; ).

No comments:

Post a Comment