• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[Q] Any document that shows differences of Cocoa programming for Mac and for the iPhone/iPod touch?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] Any document that shows differences of Cocoa programming for Mac and for the iPhone/iPod touch?


  • Subject: [Q] Any document that shows differences of Cocoa programming for Mac and for the iPhone/iPod touch?
  • From: JongAm Park <email@hidden>
  • Date: Mon, 14 Jul 2008 13:15:48 -0700

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [Q] Any document that shows differences of Cocoa programming for Mac and for the iPhone/iPod touch?
      • From: Stefan Arentz <email@hidden>
    • Re: [Q] Any document that shows differences of Cocoa programming for Mac and for the iPhone/iPod touch?
      • From: Waqar Malik <email@hidden>
    • Re: [Q] Any document that shows differences of Cocoa programming for Mac and for the iPhone/iPod touch?
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Re: What is the best way?
  • Next by Date: Re: Servicing Core Animations?
  • Previous by thread: Re: NSTextField labels and URLs
  • Next by thread: Re: [Q] Any document that shows differences of Cocoa programming for Mac and for the iPhone/iPod touch?
  • Index(es):
    • Date
    • Thread