Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
4.2 for Snow Leopard is only available to paid developers. It's not a free download. Just sayin'.

I thought Xcode For Snow Leopard was available in the Mac App Store for $5.00 without the need to be a paid developer. Is this no longer true? I have it in my purchase history and it's a separate item from Xcode for Lion/Mountain Lion which is free.
 
I have somewhat of a dilemma right now.

4.2 for Snow Leopard requires a Developer Account. I got that taken care of.

I downloaded the Xcode 4.2 for Snow Leopard but the damn thing won't install. It doesn't give me "Incomptaible OS" errors when I first open it up, it runs through the User Agreement dialog and then when I enter in my password to confirm an install, it just tells me an unknown error is preventing it from installing.


Do I need to uninstall 3.2? I haven't upgraded to Lion because I was unclear if it wipes all the files on the hard drive.
 
Apparently the apple certificate for installing 4.2 for Snow Leopard expired in March.

So I turned the clocks back and it's installed. I liked the older version more, but on a good note, the UICatalog from the apple developer compiles successfully now. I am going to pick it apart.
 
Last edited:
So, having installed 4.2 Xcode for Snow Leopard and compiled the UICatalog code, I was peeking more indepth throughout the structure.

A big question I have is how the app delegate adds the mainViewController. In the case of the UICatalog, I am not even sure what is being added via this line of code in the AppDelegate:

Code:
@implementation AppDelegate

@synthesize window, navigationController;

- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
{
	// low on memory: do whatever you can to reduce your memory foot print here
}

- (void)applicationDidFinishLaunching:(UIApplication *)application
{
	// To set the status bar as black, use the following:
	// application.statusBarStyle = UIStatusBarStyleBlackOpaque;

	// this helps in debugging, so that you know "exactly" where your views are placed;
	// if you see "red", you are looking at the bare window, otherwise use black
	// window.backgroundColor = [UIColor redColor];
	
	// add the navigation controller's view to the window
	[window addSubview: navigationController.view];
	[window makeKeyAndVisible];
}

- (void)dealloc
{
	[navigationController release];
    [window release];    
    [super dealloc];
}

@end

How is the viewController 'added' to the appDelegate?
 
How is the viewController 'added' to the appDelegate?

If you mean this line:
Code:
	[window addSubview: navigationController.view];
then it's not.

The navigationController's view property (which is presumably a view) is being added. And it's not being added to the appDelegate, it's being added to the object stored in the AppDelegate instance variable named window (which is presumably a window).

The navigationController has a view property. This does not mean the navigationController is a view. Similarly, the AppDelegate object has a window instance variable. Again, this does not mean the AppDelegate is a window, nor does it mean the window is the AppDelegate.

A horse has a tail, but that doesn't mean the horse is a tail, nor is a tail a horse. A car has a steering wheel, but the steering wheel is not a car.
 
The navigationController has a view property. This does not mean the navigationController is a view. Similarly, the AppDelegate object has a window instance variable. Again, this does not mean the AppDelegate is a window, nor does it mean the window is the AppDelegate.

A horse has a tail, but that doesn't mean the horse is a tail, nor is a tail a horse. A car has a steering wheel, but the steering wheel is not a car.

Interesting, (thanks for the metaphor), so the takeaway is that objects are added to properties of a specific class?

For example, UIWindow *window is an instance variable (and property) of AppDelegate, and view is a property of the Navigation Controller.

The property of Navigation Controller is assigned to the instance variable (and property) of App Delegate?

Am I rephrasing that correctly?
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.