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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:10:09+00:00 2026-06-10T11:10:09+00:00

So, I have a ScrollView which has cards on it. ScrollView must be paging

  • 0

So, I have a ScrollView which has cards on it. ScrollView must be paging enabled.

The goal is that the user must be able to scroll it, even if it has only one card. Since i am having the frame of ScrollView of exactly the same width and height as a picture of a card, i decided to increase the width of a ScrollView.contentSize and add one point to it.

It turns out to be working fine, but it glitches a bit – when i drag the card to the left, and then grab it again it moves to right a little bit (i guess, for the value of that one point). If i increase the contentSize, the shift increases too (for example, if the content size is increased by ten, the shift value is ten points too). It really irritates me a lot and I want to get rid of it.

Any advice on how to do that? Help is much appreciated.

UPD: I tried to manually re-center the card in the scrollViewDidEndDecelerating but that didn’t help. My guess for now is that the problem can be solved by setting the content offset to the right value (because now it’s (0,0)), but I can’t figure out how to do it.

UPD2: Here is some code that i use for now:

calendarScrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, 334, 372)]; 
//The cards themselves are 334 points wide too
calendarScrollView.clipsToBounds = NO;
calendarScrollView.pagingEnabled = YES;
calendarScrollView.bounces = YES;
calendarScrollView.showsHorizontalScrollIndicator = NO;
calendarScrollView.delegate = self;

//This part is used in the cycle of creating the cards
for (...) {

...

if (onlyOneCard) {
  calendarScrollView.contentSize = CGSizeMake(335, 372);
  onlyOneCard = 0;
} else {
  calendarScrollView.contentSize = CGSizeMake(334+offsetInScrollView, 372); //offsetInScrollView is increased by 334 by every end of the iteration of the cycle
}

...

}
  • 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-10T11:10:11+00:00Added an answer on June 10, 2026 at 11:10 am

    You could set the scrollview’s bounces property to TRUE.

    It will then always bounce back if you’ve gone beyond the bounds of the scroll view. 🙂

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

Sidebar

Related Questions

I have a FrameLayout which has a ScrollView as the only child. During runtime
I have a UIViewController, which uses a UIScrollView and within that Scrollview it has
I have a scrollview which has to display a view larger than the available
I have a scroll view which has one UIView inside which contains the content.
i have a scroll view which represents a map, it has pins on it,
I have a MyTouch 4g user that has submitted the following screenshots (sorry can't
i have a scrollview which has images added as subviews. i need to be
I have a ScrollView which has two hidden images, one at the top and
I have a UIView that has a UIScrollView as a subview, which in turn
I have a scrollview which has multiple webviews, these webviews are loading some pages.

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.