ios logical code
//1.Scroll up and down on depend to do something
CGFloat lastContentOffset;
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
[self.view endEditing:YES];
if (lastContentOffset > scrollView.contentOffset.y)
{
// NSLog(@"Scrolling Up");
[[AppDelegate appDelegate] favoriteButtonDownAnimation];
}
else if (lastContentOffset < scrollView.contentOffset.y)
{
// NSLog(@"Scrolling Down");
[[AppDelegate appDelegate] favoriteButtonUpAnimation];
}
lastContentOffset = scrollView.contentOffset.y;
}