Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7757423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:05:29+00:00 2026-06-01T13:05:29+00:00

I would like to find out if a scrollView is scrolled up or down.

  • 0

I would like to find out if a scrollView is scrolled up or down. Ideally, I’d like to have only one call if the scrollView is scrolled up or down. I tried this but it will obviously not tell me anything about the direction:

-(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
    NSLog(@"%.2f", scrollView.contentOffset.y);
}

contentOffset will always be 0 – it doesn’t matter whether I scrolled up or down. Now I could simply check in -(void)scrollViewDidScroll: if the offset is positive or negative, but this is called constantly. scrollViewWillBeginDragging has the advantage of being called only once and this is what I need. Is there something like scrollViewDidBeginDragging? I didn’t find anything in the docs. Any smart workaround?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:05:30+00:00Added an answer on June 1, 2026 at 1:05 pm

    Create a declared property to let us know that the tableview is starting to scroll. Let’s use a BOOL called scrollViewJustStartedScrolling.

    In scrollViewWillBeginDragging set it to true:

    self.scrollViewJustStartedScrolling = YES;
    

    In scrollViewDidScroll do something like:

    if (self.scrollViewJustStartedScrolling) {
        // check contentOffset and do what you need to do.
        self.scrollViewJustStartedScrolling = NO;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is by no means essential, but I would like to find out how
I have a PHP variable of type Array and I would like find out
I have two methods in the same class and would like to find out
I have a Java application and I would like to find out the location
I have a CruiseControl.NET configured project and would like to find out how long
I would like to find out the date of the Monday in this year's
I have a large block of text, and I would like to find out
I have multiple dynamic checkboxes. I would like to find out what checkbox was
I currently have a C# form, although I would like to find out how
I have an image with transparent background. I would like to find out whether

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.