iphone Programming Glossary: sizeofcontent
How to set content size of UIScrollView dynamically http://stackoverflow.com/questions/10518790/how-to-set-content-size-of-uiscrollview-dynamically iphone objective c uiview uiscrollview share improve this question One more easy way void viewDidLoad float sizeOfContent 0 UIView lLast scrollView.subviews lastObject NSInteger wd lLast.frame.origin.y NSInteger ht lLast.frame.size.height sizeOfContent..
Calculate the contentsize of scrollview http://stackoverflow.com/questions/3046449/calculate-the-contentsize-of-scrollview It worked for me and I had the same problem with the control using dynamic content. Calculate scroll view size float sizeOfContent 0 int i for i 0 i myScrollView.subviews count i UIView view myScrollView.subviews objectAtIndex i sizeOfContent view.frame.size.height.. float sizeOfContent 0 int i for i 0 i myScrollView.subviews count i UIView view myScrollView.subviews objectAtIndex i sizeOfContent view.frame.size.height Set content size for scroll view myScrollView.contentSize CGSizeMake myScrollView.frame.size.width.. Set content size for scroll view myScrollView.contentSize CGSizeMake myScrollView.frame.size.width sizeOfContent I do this in the method called viewWillAppear in the controller for the view that holds the scrollview. It is the last thing..
|