问题
Case 1: create UITableViewCell with
initWithStyle:reuseIdentifier:
Case 2: create UITableViewCell with
[[NSBundle mainBundle] loadNibNamed:@"MyCell"
owner:self options:nil];
Case 1 will create reusable cell combined together with specific identifier,which will be pushed into the reusable queue.
Case 2 will create one cell from nib file, but can not be put into the reusable queue as case 1.
Question is
any solution for case 2 to make the cell be reusable ?
回答1:
In the XIB there is a setting for the UITableViewCell to set its reuse identifier. If you set it there, you can retrieve it as normal from the dequeue method.
来源:https://stackoverflow.com/questions/5945010/about-dequeuereusablecellwithidentifier