iOS 5.0 をターゲットにする 次のコードで NSIndexPath オブジェクトの行またはセクションのプロパティにアクセスしようとすると、SIGABRT が表示されます。
NSIndexPath* path = [[NSIndexPath alloc] initWithIndex:0];
int row = path.row; //SIGABRT
int section = path.section;//SIGABRT
この例では、indexPathWithIndex を使用することを提案しています。
path = [NSIndexPath indexPathWithIndex:0];
結果は一貫したままです。なぜこれが起こるのか、誰かに説明がありますか? iOS 5.0 で NSIndexPath を操作できないということですか?
ありがとうございます。