NSMutableArray addObject: -[__NSArrayI addObject:]: unrecognized selector sent to instance

后端 未结 9 1063
太阳男子
太阳男子 2020-11-30 21:28

I have tried to initialize my NSMutableArray 100 ways from Sunday, and NOTHING is working for me. I tried setting it equal to a newly allocated and initialized NSMutableArra

9条回答
  •  悲哀的现实
    2020-11-30 21:45

    The synthesized setter for @property (copy) sends a copy message to the array, which results in an immutable copy.

    You have no choice but the implement the setter yourself here, as detailed in the Objective-C guide.

提交回复
热议问题