Objective-C is @synthesize required or optional?

前端 未结 2 757
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-14 06:10

sorry I\'m a newbie iOS developer, recently I\'ve briefly heard that @synthesize is now @synthesize in a certain version of Xcode and that the compiler will auto synthesize

2条回答
  •  失恋的感觉
    2020-12-14 06:54

    No we don't need to do that as of Xcode 4.4, which added a feature called Default Synthesis Of Properties.

    Simply put, it generates this automatically:

    @synthesize name = _name;
    

提交回复
热议问题