forin 報錯
*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSArrayM: 0x146784f00> was mutated while being enumerated.’
原因:遍歷數(shù)組的同時狮杨,在改變該數(shù)組的元素所致袭蝗。
解決:在外部重新創(chuàng)建一個NSMutableArray
forin 報錯
*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSArrayM: 0x146784f00> was mutated while being enumerated.’
原因:遍歷數(shù)組的同時狮杨,在改變該數(shù)組的元素所致袭蝗。
解決:在外部重新創(chuàng)建一個NSMutableArray