iphone - myView.frame Vs. self.myView.frame -


I know that this is often appropriate for using @property accessor, and I It is important to know that it is important to use myView = x instead of mView = x , but:

  1. is not MyView.frame is enough? TheElements contains the self.wikipediaButton.frame = buttonFrame; . If I am not getting / setting the property of my house, should I not leave self ?

  2. Also [auto] Wikipedia button addTarget: ...]; But should not I also leave self here? Should not I always call a function on ivar, not property? Ie, [wikipediaButton addTarget: ...];

Thank you!

Matt

Both will work.

The main reason for using gates within a class is that code changes are easy. If you decide to store your data in a different fashion or make it dynamically on request, there is a point of change. With ideas it is not necessary that most of the time , but when you change that scene with the entire visual hierarchy (to be part of your original scene), it can be easy.


Comments