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;
有人可以解釋最後兩行中發生了什麼嗎?謝謝。