views:

50

answers:

1

In Interface Builder... when I drag a VIEW into the document window... and then double-click on it... it opens and displays the VIEW window. (As expected)

... but when I drag a VIEW CONTROLLER into the document window... and then double-click on it... it also opens and displays the VIEW window, too. (It says "view" right on it.)

Is that right? (Or am I totally misunderstanding things?)

I thought a VIEW was the actual object to draw/drag things into. No?

I thought a VIEW CONTROLLER was just the CODE for your view. No?

+2  A: 

I dont have experience with Interface Builder, but a a controller object provides the custom logic needed to bridge the application’s data to the views. In iPhone applications, a view controller is a specific type of controller object that you use to present and manage the views of your application.

Each ViewController has a View property associated to it, which is the one you are seeing in interface builder.

The view stored in this property represents the root view for the view controller’s view hierarchy. Whenever you present the view controller on screen (either modally or as part of view controller–based interface), this view is retrieved and displayed in the application window. The default value of this property is nil

Each view controller object is the sole owner of its view. You must not associate the same view object with multiple view controller objects.

Benjamin Ortuzar