Why does Apple create it's views this way

Posted by John Smith on Stack Overflow See other posts from Stack Overflow or by John Smith
Published on 2010-04-30T21:49:59Z Indexed on 2010/04/30 21:57 UTC
Read the original article Hit count: 223

Filed under:
|
|
|

In the hope of fixing a bug of mine from another post i would like to know why apple writes this (for it's Elements example)

UIView *localContainerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
self.containerView = localContainerView;
[localContainerView release];

instead of the simpler method:

containerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];

?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk