这是场景,我有这个Person对象数组.copyWithZone实现Person并按预期工作.
Person
copyWithZone
我有一个Person对象数组,但是当我创建数组的副本并修改原始数组中的内容(更改a的属性Person)时,它也会更改副本.所以我最好的猜测是,当我打电话copyWithZone时NSArray,它不会在其元素上调用它.请确认.
NSArray
cocoa
目标C的Google编码标准说我们不应该抛出异常,那么有什么替代方案@throw呢?
@throw
objective-c
cocoa ×1
objective-c ×1