views:

60

answers:

2

When I create a new UIViewController in xcode, it offers to make me an associated nib for the interface. However, when I create a UIView, it does not. If my understanding of MVC is correct, views should really be the parts that contain the interface elements (i.e. the nib) while view controllers are the parts that hook the functionality to the views they control.

I'm sure I'll be able to get it working together either way, so this is more of an exploratory question.

This seems like a case where I'm missing some fundamental understanding of how these two parts should be used. What am I missing?

A: 

Because UIView is usually not used in such way. However http://stackoverflow.com/questions/238620/how-do-i-associate-a-nib-xib-file-with-a-uiview

Meke
No, that's my question. *Why* is it not used that way?
Nick
Because UIViewController is already filling that purpose.
Meke
You're getting there. Elaborate on the purpose of both of these objects and why my assumption of their purpose is wrong.
Nick
The are what they're called: UIView draws data (an image) but know nothing about it (that is is an image of a person).UIViewController feeds the data (THIS image) to its views.
Meke