Add nib to UIScrollView

I'm having problems with UIScrollView.

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

I have a file called ExhibitionSubViewController.h / .m and ExhibitionSubView.xib that I would like to display in this UIScrollView, and I cannot get it to work.

What will be the correct code for this?

+4
source share
1 answer

The iPhone programming model is a “one-touch viewing controller” that gets a little used to it. You must load your view using [NSBundle loadNibNamed:] and manually add it to your UIScrollView using addSubview. All your code to manage these objects must live in ExhibitionViewController.

+1
source

All Articles