- (id)dequeueReusableCellWithIdentifier:(NSString *)identifier;
- (id)dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath NS_AVAILABLE_IOS(6_0);
tableView:cellForRowAtIndexPath:
static NSString *CellIdentifier = @"Cell";
if (cell == nil)
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
dequeueReusableCellWithIdentifier: forIndexPath:
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
如果使用nib方式加載cell:獲取cell時如果沒有可重用cell,將創建新的cell并調用其中的awakeFromNib方法