- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *reuseIdentifier = @"cellReuse";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
}
NSManagedObject *manageObject = [self.fetchResultController objectAtIndexPath:indexPath];
cell.textLabel.text = [manageObject valueForKey:@"title"];
cell.detailTextLabel.text = [manageObject valueForKey:@"subtitle"];
return cell;
}
我已经读过一本书,说cell是一种“可重用视图”。我在理解“可重用”时遇到了一些问题。UITableViewCell - 了解“可重复使用”
任何人可以在大约细胞的机制,一个简单的方法解释一下吗?
感谢乌尔样的回答;) – JackieLam 2013-05-02 05:02:32
+1非常给点答案:) – Anupdas 2013-05-02 06:10:02