What's the difference between adding pseudo-private ivars in a class extension or in the @implementation block?

后端 未结 2 1757
一个人的身影
一个人的身影 2020-12-10 18:55

What\'s the difference between putting pseudo-private instance variables in a class extension inside the .m file, or putting them in the newly introduced @implementation bra

2条回答
  •  清歌不尽
    2020-12-10 19:33

    Personally, I prefer to put my ivars in a single class extension in the implementation file, I think it's cleaner that way. I don't think there are any performance advantages or consequences to using one or the other, it's more about being able to code the way you want to.

提交回复
热议问题