Saturday, January 11, 2014

Is that reuse problem?



Each cell in are added UITextView,
But after entering, moving back and forth was pulled when the data inside UITextView gone, the younger novice ah,
Great God how to solve this, ah, reuse problem, but how to let it make data storage,


- (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath
{This is the beginning of the,,,
NSLog (@ "indesect ===% d, row =% d", indexPath.section, indexPath.row);
NSString * identifier = [NSString stringWithFormat: @ "identifier% d% d", indexPath.section, indexPath.row];
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier: identifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleSubtitle reuseIdentifier: identifier] autorelease];
}
for (UIView * subview in [cell.contentView subviews])
{
[Subview removeFromSuperview];

}
}


How to modify ah,
Reply:
UITextView plus agents, textViewDidEndEditing when the contents of the input saved to nsdictionary in, key ideas corresponding to each cell in, cell displays the time to get the data from the dictionary
Reply:
In fact, not upstairs as a little bit of trouble. You just move your Cell registered to TableView handed it to manage just fine.
TableView has RegisterNib or RegisterClass two ways.
Reply:
cited a floor ROSEBELL reply:
UITextView plus agents, textViewDidEndEditing when the contents of the input saved to nsdictionary in, key ideas corresponding to each cell, the when the cell displays the data obtained from the dictionary
just have thought of this, and, thank you slightly, try to see tomorrow
Reply:
reference to the second floor ran0809 reply:
upstairs did not in fact, a little bit of trouble. You just move your Cell registered to TableView handed it to manage just fine.
TableView has RegisterNib or RegisterClass two ways.


Brothers, I was a novice, oh, this method how to use it
Reply:
If your custom class or Cell NIb with you this tableview when viewdidload use this method to register, the data source methods like direct dequeue. Ensure Identifier as you can. You try to be studied, is relatively simple.
Reply:
reference to the second floor ran0809 reply:
upstairs did not in fact, a little bit of trouble. You just move your Cell registered to TableView handed it to manage just fine.
TableView has RegisterNib or RegisterClass two ways.



Just tried, it seems not too
Reply:
reference to the 6th floor u012619303 reply:
Quote: references to the second floor ran0809 reply:

In fact, not upstairs as a little bit of trouble. You just move your Cell registered to TableView handed it to manage just fine.
TableView has RegisterNib or RegisterClass two ways.



Just tried, it seems not too


Estimate your code has a problem, so I would not be writing this. You know a little around to find the best person to ask

No comments:

Post a Comment