Tuesday, 6 August 2013

Any advantage of using 'self.view.frame.size.height', over storing it in a variable instead?

Any advantage of using 'self.view.frame.size.height', over storing it in a
variable instead?

Suppose, an app has a view controller with a plethora of views inside,
whose frames are relative to the view controller's frame. Is there any
advantage/disadvantage of using self.view.frame.size.height/width, over
storing their values in variables, and using them instead ??
Advantages/disadvantages in terms of memory usage, CPU usage, time-delay,
et cetera. And, in the core of it, are these values of height, width, or
related parameters stored in memory somewhere, or are they
fetched/calculated every time the code requests them ??

No comments:

Post a Comment