- (void) loadVew
{
contentView = [[UIImageView alloc] initWithFrame];
...
self.view = contentView;
[contentView release];
...
}
As Luke said, you need to read the Objective C 2.0 language section
on properties.
First off, you should understand t
On Nov 12, 2008, at 10:00 AM, Stuart Malin wrote:
- (void) loadVew
{
contentView = [[UIImageView alloc] initWithFrame];
...
self.view = contentView;
[contentView release];
...
}
*If* this is exactly the code shown, and contentView is an instance
Read up on the objective-c 2.0 language and the use of properties,
specifically. This should help you understand what's going on here.
What happens is that when you set self.view = contentView, the behind
the scenes machinery is automatically sending a retain message to the
object. This is
First: sorry if iPhone questions now belong elsewhere, but I am
posting here because I want to validate my understanding of retain-
release in the Cocoa context. I've just acquired the book "The
iPhone Developer's Cookbook" by Erica Sadun. Her first "Hello World"
example (listing 1-4, if yo