objective c - iPhone Sdk: UITableViewCells copy themselves randomly -


I'm trying to figure it out, but I can not do it for some reason .... Every time my UITableView Reaches a fixed length due to the number of rows and squares, the cells do not randomly desire to copy themselves into different cells at the end of the table or do not seem to programming ... Someone else has this problem or it How is it resolved? Any help is appreciated! Tank Edit: The "line" property is a counter that is counted as 13 and then gets reset to 0 and counted again and I always want the string "newUpdate" displayed in this row, but at the same time Do not want to empty the rest of the cells, I want them to keep their old content, until they overwrite because the counter starts at 0 again.

  #import "ServerUpdateViewController.h" @Explementation ServerUpdateViewController @synthesize newUpdate; @ Synthesis line; - (NSInteger) numberOfSectionsInTableView: (UITableView *) tableview {return1; } // Customize the number of rows in the table view. - (NSInteger) Table view: (UITableView *) Table view numberOffros inspection: (NSINtega) section {return 15; } - (NSString *) Table View: (UITableView *) Table Title ForHeaderInSection: (NSInteger) section {return @ "All updates to server"; } // Customize the appearance of the table view cells - (UITableViewCell *) TableView: (UITableView *) Table View CellForOutPath: (NSIndexPath *) Index Pathway {Fixed NSString * CellIdentifier = @ "cell"; UITableViewCell * cell = [tableview] dequeueReusableCellWithIdentifier: CellIdentifier]; If (cell == null) {cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier] autorelease]; } If (indexPath.row == self.row) {cell.textLabel.text = self.newUpdate; } // Set the cell ... Return cell; } - (zero) Delok [[Super Delooc]]; }  

@end

You can re-use cells Are there. In your cellForRowAtIndexPath: method, you need to fully configure to call each time.


Comments