I\'m currently setting up a UIScrollView with the following structure
UIScrollView
--ContentView (UIView)
--ContainerView1 (UIView)
--UILabel1
--UILa
//use the below code to set the content size of a scroll view.
float newHeight=0.0f;
for(UIView *subViews in [scrollViewObj subviews])
{
if([subViews isKindOfClass:[UIView class]])
{
newHeight=newHeight+(subViews.frame.origin.x+subViews.frame.size.height);
}
}
NSLog(@"%f",newHeight);
[scrollView setContentSize:CGSizeMake(300, newHeight)];//change the width as you need