Performance difference between dot notation versus method call in Objective-C

前端 未结 5 2059
执笔经年
执笔经年 2020-12-15 09:21

You can use a standard dot notation or a method call in Objective-C to access a property of an object in Objective-C.

myObject.property = YES;
5条回答
  •  暖寄归人
    2020-12-15 09:49

    Check out article from Cocoa is My Girlfriend. The gist of it, is that there is no performance penalty of using one over the other.

    However, the notation does make it more difficult to see what is happening with your variables and what your variables are.

提交回复
热议问题