Q:

Size a UIView to fit all of its contents in a uiScrollView

I am having a problem sizing a uiView inside of my uiScrollView to contain all of its subviews. Here is  am image of my layout (I shaded the UIView within the scroll view blue to highlight the problem) 
my layout
Here is what happens, though when I launch the app. This is what is rendered
rendered view
As you can see the blue content view is only sized to the screen dimensions of the phone, and all subviews below that are outside of the frame and I cannot interact with them. Can anyone tell me how scale this content view properly? This is an older app and I cannot use auto-layouts, only springs and struts.

A:

For ManualLayout You can simply use to get the height and y position of you last entered object.
Lets say you last added object is a UIView
so just add this code.
self.scrollView.constentSize = CGSizeMake(self.scrollView.frame.size.width + (lastAddedView.frame.origin.y + lastAddedView.frame.size.height /* Here you can add some more space if you feel neccessory*/));

