views:

108

answers:

1

In objective c (iphone) are the nib files (xib) the View part of the MVC? When you set a property of an object in IB where is that actually stored in the xib file?

+1  A: 

Yes, in general your View layer is represented by your nib files.

Properties that you declare in your own controllers are not 'stored' in nib files; they are a part of your controller instances. View objects in nibs will have their own properties, which are stored in memory when the objects have been recreated out of the nibs. Values that you set in view objects using the IB inspectors are stored in the nib, and are set on the objects when you load the nib.

Paul Lynch
So on a UIScrollView for example if I set the scrolling to horizontally only using IB. How does it "remember" that I quite IB and reopen it?
Jonathan
Sorry, I misread - yes, properties that you set in IB on view classes are stored in the nib, and loaded when you load the nib (will correct my answer).
Paul Lynch