views:

38

answers:

1

I have another issue related to Views, and i've ended up here dealing with Views and Windows in general. My understanding of all the fundamentals of iPhone development has been turned upside down.

Can somebody explain, or point to a reference, the difference between these 2 templates?

Ex: My app doesnt show a Window in the Interface Builder. Should I have one? When should i have one and when should I not?

+2  A: 

The Window-based Application template provides just an application delegate and a window.

A View-based application will start you off with an application delegate and a window, as well as a view.

Your application doesn't show a Window because the view that you are (most likely) viewing and editing now is loaded by the Window, which is in a separate XIB.

esqew
So in a View Template, the window exists, but doesnt show up in the Interface Builder?
AlvinfromDiaspar
For my View-based applications, my `UIWindow` element is contained in the `MainWindow.xib` file.
esqew
Ah yes. I noticed i do have a MainWindow.xib which indeed has the Window object as well as the ViewController for the view. So what is the pt of having a Window template? Doesnt all apps have to have a Window and at least 1 View?
AlvinfromDiaspar
Yes, but that view can be either a `UIView`, `MKMapView`, `UIWebView`, etc.
esqew