tags:

views:

35

answers:

1

I am having troubles with the UIScrollView.

I have a file called: ExhibitionViewController.h / m and a nib ExhibitionView.xib in which I have placed a UIScrollView.

I have a file called ExhibitionSubViewController.h / .m and ExhibitionSubView.xib which I would like to display within that UIScrollView and I cannot seem to get it to work.

What would be the correct code to do that?

+1  A: 

The iPhone programming model is "one view controller per screen", which takes some getting used to. You should load your subview with [NSBundle loadNibNamed:] and add it manually to your UIScrollView with addSubview. All of your code for managing those objects should live in ExhibitionViewController.

Seamus Campbell