Basically I have a uiscrollview
. The uiscrollview scrolls down when i push a certain button. However once the content offset
has been set it will not allow me to scroll the uiscrollview back to the to.
For example...
If I set the content off set to 100 and animated:yes. The scrollview will scroll to that position and allow me to continue to scroll down the page but when trying to scroll up you pull up and see the upper par of the view but it then bounces back down.
Here is my code:
Firstly when the button is pressed I call the void function:
[self downExecute:scroller];
Secondly I run the void statement which set's my content off set...
- (void)downExecute:(id)sender {
NSLog(@"scroll down");
CGFloat currentOffset = scroller.contentOffset.y;
CGFloat newOffset;
newOffset = currentOffset + 100;
[UIScrollView animateWithDuration:0.3 animations:^(void) {
[scroller setContentOffset:CGPointMake(0.0,newOffset)];
}completion:^(BOOL finished) {
}];
}
Any Help would be greatly appreciated...