Error accessing generated ivars when I override setters and getters in Modern Objective-C

后端 未结 3 1280
猫巷女王i
猫巷女王i 2021-01-01 13:57

I know now the new Objective-C compiler lets you not need to synthesize your properties anymore. I have one file that has two classes in it. My .h for a simple helper clas

3条回答
  •  轮回少年
    2021-01-01 14:54

    Here is the results of some testing I did last year: iOS automatic @synthesize without creating an ivar.

    In short, you need to use @synthesize or declare an iVar explicitly.

提交回复
热议问题