I know that properties kind of encapsulate getter and setter methods. So whenever we say
myObject.property1 we actually cause to call [myObject property1]. From Apple documentation, Stanford iOS Courses and sample codes I can see that the usage of properties are encouraged. I aggree that using properties make a code look better and more understandable but what about performance? If I write a huge application will using properties have a noticableimpact on performance? Do professionals generally prefer direct setter and getter methods or properties?
I know that properties kind of encapsulate getter and setter methods. So whenever we
Share
There is no difference in performance when you use the bracket notation (
[myObject property1]) or the.notation (myObject.property1).This is more of a coding style than any thing else, so use the notation you are comfortable with or the same notation as your team if you don’t work alone.