I have a scrollview where I dynamically adjust its contentSize depending on what content is in the scrollview. The problem is that after having done all the adjustments it is not scrolled to the top. I tried with setting the contentOffset to 0,0 but that did not work as well.
I am using storyboard.. any idea what this could be?
Here some code
[scrollView setScrollEnabled:YES];
[scrollView setContentSize:CGSizeMake(320, 700)];
[scrollView setBackgroundColor:[UIColor colorWithRed:0.892 green:0.893 blue:0.892 alpha:1.0]];
Move the labels
// Move Description Label / Image
self.descriptionImageView.frame = CGRectMake(20, self.importantInfo.frame.origin.y + self.importantInfo.frame.size.height + 20, self.descriptionImageView.frame.size.width, descriptionImageView.frame.size.height);
self.descriptionLabel.frame = CGRectMake(self.descriptionImageView.frame.origin.x + self.descriptionImageView.frame.size.height + 20, self.importantInfo.frame.origin.y + self.importantInfo.frame.size.height + 20, self.descriptionLabel.frame.size.width, self.descriptionLabel.frame.size.height);
// Adjust scroll size so it does not scroll out the content
[scrollView setContentSize:CGSizeMake(scrollView.contentSize.width, description.frame.origin.y + description.frame.size.height + 20)];