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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:49:36+00:00 2026-05-28T04:49:36+00:00

first question here, be nice :P I am trying to make an infinite UIScrollView

  • 0

first question here, be nice 😛

I am trying to make an infinite UIScrollView (i used the “StreetScroller” apple demo project). When the UIScrollView is almost at the end of the contentSize, the contentOffset is set to the center of the contentSize and all the subviews are moved so it is transparent for the user.

It works correctly when you scroll slowly, but when you scroll too fast and that you reach the end of the UIScrollView, things become weird.

In my case i use a UIScrollView with frame.size.width = 320 and contentSize.x = 3 * frame.size.width.
And this is what happen in the logs when you scroll too fast and that you reach the end of the contentSize (so if x > 560 when scrolling to the right) :

–> The UIScrollView is scrolling because of inertia

SetContentOffset called width x : 504.730072
SetContentOffset called width x : 516.878967
SetContentOffset called width x : 528.489990
SetContentOffset called width x : 540.347656
SetContentOffset called width x : 550.754028
SetContentOffset called width x : 561.200378

–> The UIScrollView reach the end of the contentSize so we recenter

The next call of setContentOffset is for recentering the view
SetContentOffset called width x : 320.000000

–> Here is the problem, UIScrollView does not take contentOffset.x changes in account, it continues the animation with the last contentOffset.x value used….

SetContentOffset called width x : 571.421753
The next call of setContentOffset is for recentering the view
SetContentOffset called width x : 320.000000
SetContentOffset called width x : 581.283447
The next call of setContentOffset is for recentering the view
SetContentOffset called width x : 320.000000
SetContentOffset called width x : 610.100952

And this continues until the animation finishes.

If somebody has a solution for setting the contentOffset and forcing UIScrollView to update its animation 🙂

I read almost all the topic on stackoverflow and other websites about infinite UIScrollView, and i did not see any working solution to change the contentOffset during the animation, and i tried to recenter in all the different UIScrollView delegate methods. And i don’t want to change the contentSize during scrolling (it works only when you scroll at right or bot…)

  • 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-05-28T04:49:37+00:00Added an answer on May 28, 2026 at 4:49 am

    I just noticed this issue in the Apple StreetScroller example running in iOS Simulator 4.3.

    I saw this question here: Infinite UIScrollView gets strange behavior in iOS4.3 not iOS5 and just tested in the iOS 5 simulator and can confirm that it runs as expected there.

    No idea what the issue is with that same code in 4.3.

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

Sidebar

Related Questions

First question on here so please be nice :) I know very little about
My first question on here so be nice! I am a junior developer with
this is my first question here. I've made a small quiz project about the
first question here. I'm developing a program in C# (.NET 3.5) that displays files
First question here: it is a very short yet fundamental thing in Java that
First question here so hello everyone. The requirement I'm working on is a small
this is my first question here so I hope I can articulate it well
this is my first question here :) I know that I should not check
Greetings to all! This is my first question here on stackoverflow. I have a
Ok, I need help. This is my first question here. Background: I am working

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.