<http://lists.apple.com/archives/Xcode-users/2008/Jul/msg00276.html>

Still under NDA.

--Waqar
On Jul 14, 2008, at 3:15 PM, JongAm Park wrote:

Hello, all.

Because the final SDK for the iPhone came out, I started to take a look at it. Although I knew that Window/View hierarchies are different on the Mac and the iPhone, I found that there were some fundamental difference in programming model.

For example, this code from http://developer.apple.com/iphone/gettingstarted/docs/creatingiphoneapps.action ,
it creates a view controller and add its view as a window's sub view.

Listing 2. Creating the content view

- (void) applicationDidFinishLaunching:(UIApplication *)application
{
  // Set up the view controller
UIViewController *aViewController = [[UIViewController alloc] initWithNibName:@"MoveMeView" bundle :[NSBundle mainBundle]];
  self.viewController = aViewController;
  [aViewController release];

  // Add the view controller's view as a subview of the window
  UIView *controllersView = [viewController view];
  [window addSubView:controllersView];
  [window makeKeyAndVisible];
}


However, for the Mac, something like the view controller was not necessary, right? and a content view is not added manually like the code above. ( I don't mean that "Oh, there is no UIViewController and UIView". I know that those are made for the iPhone. ) When a window and its view are made using the Interface Builder, they were handled automatically for the Mac.
Isn't this true for the iPhone?

(Well, I just looked up "NSViewController" document and it says that it was added to the Leopard. Is there any document which explains why it is added and how the programming model is changed due to the addition of it? )

Thank you.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to