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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:13:17+00:00 2026-05-17T00:13:17+00:00

I have like 20 items which the user can pick from. Now I want

  • 0

I have like 20 items which the user can pick from. Now I want to make a UIScrollView with enabled pagination, that allows to scroll for ever. If the end is reached, the start is appended, and so on.

What would be the simplest way to do something like this? I fear that when I reach an offset of lets say y=10000.0f, it may affect memory. Not sure.

Also a smooth “forever scrolling experience” is important. So just setting the offset to 0/0 when the end is reached will most likely not work… I remember I tried that a year ago, and the UIScrollView animated the whole thing backwards (wrong direction, from end to start) when the offset was set to something else.

  • 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-17T00:13:18+00:00Added an answer on May 17, 2026 at 12:13 am

    A large offset does not consume extra memory; it just requires that CoreAnimation deals with large numbers. This is fine, except…

    CGFloat is a float on device (IIRC it’s a double on Mac OS X). This means it can represent integers up to about 224 (about 16.7 million), thus half-integers up to around 8 million (and the “retina display” has half-size pixels). If the user scrolls very far, then you’ll lose accuracy. I’m not sure where precisely this happens. You can try setting contentSize and contentOffset to very large values and seeing what happens.

    If you really need UIDatePicker-style “forever” scrolling, you have a few options:

    • Implement your own. It’s not too difficult, and performance won’t be that bad (I think you get a scrollViewDidScroll: callback per frame).
    • Make the contentSize “sufficiently big” (around 1 million, but note that it should be a multiple of the page size) and the content offset somewhere in the middle. Reset the contentOffset to the the middle-ish when the user’s stopped scrolling:
      • scrollViewDidEndDragging:willDecelerate: (but only if decelerate == NO)
      • scrollViewDidEndDecelerating:
      • scrollViewDidEndScrollingAnimation:
      • scrollViewDidScrollToTop: (possibly; I’m not sure if it sends scrollViewDidEndScrollingAnimation: too).

    This means the user can hit the end and bounce if they try really hard (a million iPhone “points” is about 160 m). Oh well.

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

Sidebar

Related Questions

I have some items that I'd like the user to be able to filter
I have swing application in which there is MS excel like functionality. User can
I have some option-item combination in my application from which the user can choose
Currently, I have a table view that the user can add items and delete
Hey guys, I have an table in which the user can tap on items
I want to have a text box that the user can type in that
I have a view to display a list of items. The user can edit,
Rails newbie here. I have a list of items which can have a status
I have an unordered list <ul> with list items <li> which I'd like to
i have an application in which a user can lock a certain commodity and

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.