我正在查看一些使用 UITableView 的 cellForRowAtIndexPath 的 UINib 方法的 Apple 示例代码:
-(UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath {
static NSString *QuoteCellIdentifier = @"QuoteCellIdentifier";
QuoteCell *cell = (QuoteCell*)[tableView dequeueReusableCellWithIdentifier:QuoteCellIdentifier];
if (!cell) {
UINib *quoteCellNib = [UINib nibWithNibName:@"QuoteCell" bundle:nil];
[quoteCellNib instantiateWithOwner:self options:nil];
cell = self.quoteCell;
self.quoteCell = nil;
我不太明白最后两行
cell = self.quoteCell;
self.quoteCell = nil;
有人可以解释最后两行发生了什么吗?谢谢。