Set content offset to view scroll

Is there a way to set the scroll view offset that is inside the view controller programmatically?

I need to install it based on different conditions.

+7
source share
2 answers

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]; } 
+12
source

Source: https://habr.com/ru/post/926363/


All Articles