Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
- if (scrollView.contentOffset.y >= scrollView.contentSize.height - scrollView.frame.size.height)
- {
- NSLog(@"Moving Up");
- [UIView beginAnimations:nil context:nil];
- [UIView setAnimationDuration:0.3];
- [UIView setAnimationCurve:UIViewAnimationCurveLinear];
- self.view.frame = CGRectMake(0, -200, self.view.frame.size.width, self.view.frame.size.height);
- [UIView commitAnimations];
- }else if (scrollView.contentOffset.y <= scrollView.contentSize.height - scrollView.frame.size.height){
- NSLog(@"Moving Down");
- [UIView beginAnimations:nil context:nil];
- [UIView setAnimationDuration:0.3];
- [UIView setAnimationCurve:UIViewAnimationCurveLinear];
- self.view.frame = CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height);
- [UIView commitAnimations];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement