3
我使用的cellForRowAtIndexPath的UINib方法的UITableView看一些苹果的示例代码:为什么customCell属性设置为无使用UINib
-(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;
有人可以解释最后两行中发生了什么吗?谢谢。