Made scroll direction detection fixed with better code with contentOffset