When should I use @synthesize explicitly?

后端 未结 7 1669

As far as I know, since XCode 4.4 the @synthesize will auto-generate the property accessors. But just now I have read a sample of code about NSUndoManage

7条回答
  •  情话喂你
    2020-11-29 15:24

    Thanks for clarifying that. I had a similar problem.

    @synthesize firstAsset, secondAsset, audioAsset;
    @synthesize activityView;
    

    So now, having commented them out, I went through and replaced each occurrence with, for example

    self.firstAsset It seems I could also use firstAsset, but I find I miss seeing the "" too often.

提交回复
热议问题