Add nib into UIScrollView
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 ExhibitionSu开发者_如何转开发bViewController.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?
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.
精彩评论