1
votes

I'm very new to programming and objective C so you'll have to go easy on me. I'm sure some of the code in the app is probably unnecessary. I've searched google and StackOverflow for an answer but none of the solutions have worked for me, either because they're not the right solution or I just misunderstand the answers. i have problem with my UIScrollView, the problem is that when i scroll down and since i let the UIScrollView go, it bounces back to the top and so i can't interact with the content I just scrolled to. my code is:

[self.scroller123 setScrollEnabled:YES];
[self.scroller123 setContentSize:CGSizeMake(320,1200)];

Thanks in advance

3
add some more code ? it is difficult to give answer wrt above .V-Xtreme
needs to set contentOffset when you scroll to specific point.wesley
i m using only above code for scrollersandeep
if it automatically scroll bounces to back when you scroll then scrollView height size not higher than content size. So we must re increase the scrollView height of content sizewesley
can you plz tell me where is scrollviewsize ?? i m just to makesuresandeep

3 Answers

0
votes

Don't use setContentSize to scroll, that is for setting the size of scrollable content (so you usually do this only once)

Use setContentOffset:CGPointMake(0,Y_TO_SCROLL_TO);

0
votes

Adjust your scrollview's content size height as per your requirement. That's it!!!

0
votes

Set content size of Scroll view something like bellow ..

[self.scroller123 setContentSize:CGSizeMake(self.scroller123.frame.size.width,__your_desired_height)];

and __your_desired_height should be equal to just the (height+origin of Y) of the last content inside your Scroll view .

Hope this will help you.