Set Content Offset for Scroll View
29,918
Solution 1
yes you can set the contentOffset of your scrollview- And the code will be like this -
if(your Condition)
{
[scrollView setContentOffset:CGPointMake(0,-50) animated:YES];
}
Solution 2
Yes,
scrollView.contentOffset
Documentation: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScrollView_Class/Reference/UIScrollView.html
Comments
-
Whatever Kitchen over 3 years
Is there a way to set the offset of a scroll view that is inside a view controller programatically?
I have to set it based on different conditions.