I’m on the Setting Up Views portion of chapter 27. On page 185 we added the following lines of code:
// add our threee UI element to the window [[self window] addSubview:taskTable]; [[self window] addSubview:taskField]; [[self window] addSubview:insertButton]; //Finalize the window and put it on the screen [[self window] setBackgroundColor:[UIColor whiteColor]]; [[self window] makeKeyAndVisible];
The receiver of the message is [self window]. Im not sure what this means and what the code is doing. I get that “self” is the instance of the the current class, but we also have “window”, which is an instance of UIWindow. So I think I have a message being sent to two different things.
Can someone help me interpret this?