Like I understand it, if I would take the View XIB, I had an Content View where I can put UI control elements inside.
But what's an Window then? Isn't that pretty much the same thing?
Like I understand it, if I would take the View XIB, I had an Content View where I can put UI control elements inside.
But what's an Window then? Isn't that pretty much the same thing?
A window is two views: the frame view (which contains controls that only AppKit has access to, like the zoom, hide, close, and maximize buttons, and the title bar and proxy icon), and the content view, which you control.
If you're designing an area you're going to embed within another view, or hand off to an API that wants a view (for example, to create a panel or sheet), then use a view. If you're designing something to specifically be a window, like a document window, then use a window.
With a window, you have additional abilities to control its appearance and behavior, for example, to make it modal, give it a proxy icon, list it in the Windows menu, order it relative to other windows, etc. that you can't do with a plain view.
On the iPhone each app typically has one window and multiple views. In your case you would design your UI in the View XIB and at runtime that would be added to your app's window. You can use the MainWindow XIB to setup a view controller to swap views in and out of your app as needed.
For more information about windows and views see the Windows and Views section of the iPhone Application Programming Guide