Reputation: 33
I just wanted to know if it is necessary to declare a property for every private variable I create in my Xcode projects. If it is, can someone explain me the reason? Thanks =)
Upvotes: 0
Views: 93
Reputation: 26058
Properties are useful if you want to add custom get-and-set logic for your variables. They typically are used more for public variables. There are certainly cases when you may want to also use them for private variables, but it is not "necessary".
Upvotes: 1