SQL データ ソースの操作方法を学ぼうとしたところ、Apple のサンプルに SQLiteTutorial というサンプル名が見つかりました。悪いことに、Apple はサンプルを更新していないため、Apple のサンプル ファイルを開くと、多くの非推奨の警告が表示されます ... .
その場合、コードは
// Set up the cell
SQLiteTutorialAppDelegate *appDelegate = (SQLiteTutorialAppDelegate *)[[UIApplication sharedApplication] delegate];
Animal *animal = (Animal *)[appDelegate.animals objectAtIndex:indexPath.row];
[cell setText:animal.name];
return cell;
そしてXcodeはsetTextは非推奨だと言いましたが、これを修正する方法が見つかりませんでした。
私が取り組んでいるチュートリアルはこちらです: http://dblog.com.au/iphone-development-tutorials/iphone-sdk-tutorial-reading-data-from-a-sqlite-database/
アプリのデリゲートに他の警告があります
// Execute the "checkAndCreateDatabase" function
[self checkAndCreateDatabase];
// Query the database for all animal records and construct the "animals" array
[self readAnimalsFromDatabase];
// Configure and show the window
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
}
Xcode は、SQLiteTutorialAppDelegate が checkAndCreateDatabase と readAnimalsFromDatabase に応答しない可能性があることを教えてくれました
そして RootViewController の最後のもの、インスタンスメソッド initWithData:cache が見つかりません

/ Load the animals image into a NSData boject and then assign it to the UIImageView
NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:[animal imageURL]]];
UIImage *animalImage = [[UIImage alloc] initWithData:imageData cache:YES];
self.animalView.animalImage.image = animalImage;
}
答えがあればありがとう。