-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier ];
if(cell == nil){
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
cell.text = [[views objectAtIndex:indexPath.row] objectForKey:@"title"];
return cell;
}
Run Code Online (Sandbox Code Playgroud)
为什么我们在这里使用CellIdentifier,为什么它是静态的?