5 つのオブジェクトを持つ NSMutableArray があります
[0] StateGeographicComponent * 0x0a455ba0
[1] StateGeographicComponent * 0x11c374b0
[2] StateGeographicComponent * 0x08e5f720
[3] StateGeographicComponent * 0x11c15430
[4] StateGeographicComponent * 0x0a458f20
次のコード行を実行した後:
[self.gameComponents removeObjectAtIndex:0];
単にインデックス 0 のオブジェクトを削除し、すべてをインデックス上にスライドさせる代わりに、私は期待していました。インデックス [0] のオブジェクトは nil に設定され、インデックス [4] のオブジェクトは削除されます。
[0] id 0x00000000
[1] StateGeographicComponent * 0x11c374b0
[2] StateGeographicComponent * 0x08e5f720
[3] StateGeographicComponent * 0x11c15430
私にはかなり困惑..