0
boolの配列を初期化する際に問題がたくさんあります。 NSLog
を使用している場合は、(null)
のままです。私は40 NOの可変配列piecesInPlace
を設定しようとしています。テスト目的でsetupArrayWithFalses
をYES
に変更しようとしましたが、それでも(null)
を取得しました。boolの配列を初期化する - nullを返す
BOOL setupArrayWithFalses = NO;
for (int i=0; i<40; i++) {
[piecesInPlace addObject:[NSNumber numberWithBool:setupArrayWithFalses]];
}
NSLog(@"Value of object: %@", [piecesInPlace objectAtIndex:0]);
私はばかです!ありがとうございました – garethdn