开发者

NSMutableArray question

开发者 https://www.devze.com 2023-01-29 05:30 出处:网络
Can you reset a nsmutable array it after deletions to put it back to its original sta开发者_如何学编程te with all the initial variables before deletions? Are you saying that you want to delete everyth

Can you reset a nsmutable array it after deletions to put it back to its original sta开发者_如何学编程te with all the initial variables before deletions?


Are you saying that you want to delete everything, and then magically bring it all back? You can't.

If you want to be able to undo stuff, you need to write code that remembers deleted information in anticipation of the possibility of needing to undo.


No, but if memory isn't an issue, you could duplicate the array before the deletion.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号