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 8985717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:23:11+00:00 2026-06-15T21:23:11+00:00

I need to limit the bouncing in a UIScrollView so that it bounces as

  • 0

I need to limit the bouncing in a UIScrollView so that it bounces as usual at the bottom but doesn’t go further than X pixels at the top (the bottom doesn’t matters).

Is there any way to restrict the bouncing size? I have think that maybe a method in the delegate such us scrollViewWillScroll (instead of scrollViewDidScroll) would allow me to consume those scroll events that move further than top+X but I have been unable to find a suitable one so far.

Any clues?

  • 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-15T21:23:12+00:00Added an answer on June 15, 2026 at 9:23 pm

    scrollViewDidScroll: is the correct method for this. Simple adjust the contentOffset in there.

    This example will restrict the top bounce to 20 pixels:

    - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
        if (scrollView.contentOffset.y < -20) {
            scrollView.contentOffset = CGPointMake(0, -20);
        }
    }
    

    Note that there is a bit of an unnatural delay until the view is scrolled back to 0,0 when the reason for the bounce was a decelerated swipe, and not a drag. But I think there is no way to prevent this. Basically the scrollView still bounces the full way but it doesn’t display it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to limit the number of characters that can be appended to an
i need a timer that works like this : imagine somebody have a limit
I have a foreach loop that i need to limit to the first 10
I need to limit my result to 3 row (an example), but if 3rd
My title doesn't quite sum up what I need correctly but hopefully it will
It is simple enough to get timestamp: new Date().getTime(); but I need to limit
I need to limit the results from a query, but I can't implement any
I need to limit the amount of time and cpu taken by external command
I need to limit the input from a user to only positive values, and
I really need to limit any unnecessary network traffic and server trips. Solution: common

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.