私のプロジェクトでは、非推奨の警告があります。initWithFrame:reuseIdentifier:は非推奨です
それが何を意味するのかわかりません。誰かがこの警告を解決する方法を教えてもらえますか?
これがショートコードです
- (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];
}
// Set up the cell...
NSString *cellValue = [itemsList objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;
return cell;
}
そして警告はその行にあります:
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];