Sunday, December 1, 2013

tableview when selecting a multiple choice, while the record also chose Article X of the problem

Create a cell at the time no problem, right? Find Great God! ! !

code:
- (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath
{
static NSString * CellIdentifier = @ "SimpleTableIdentifier";

UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];

if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier] autorelease];
}
int row = [indexPath row];
NetContactersModel * model = [self.netContacters objectAtIndex: row];
cell.textLabel.text = model.userName;
return cell;
}
Reply:
Creates no problem. Tieshanglai code option you can take a look.
Reply:
Reusing the same cell problem,
In the - (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath
Inside judgment, the re-selected settings
Reply:
cited a floor reply:
create no problem. Tieshanglai code option you can take a look.

Has been solved, thanks to answer.
Reply:
reference to the second floor of the reply:
reuse the same cell problem,
In the - (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath
Inside judgment, the re-settings selected

Well, has been resolved, you said this is the reason ~

No comments:

Post a Comment