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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:57:43+00:00 2026-06-17T01:57:43+00:00

So I have a UICollectionView with custom UIViews for each cell. The UIView takes

  • 0

So I have a UICollectionView with custom UIViews for each cell. The UIView takes up the whole screen and you can horizontally navigate to each of the 4 different UIView/cells. This all works fine and uses a pager to indicate which page of the collectionview you are on.

I have looked around google and the like to see if I could get it to loop back to the beginning after you navigate passed the last cell. So for example:

I start at the 3rd cell, navigate to the 4th, then when i swipe to the right, it will go back to the first cell (pager will reflect that you are on the first page) and continue on from there.

Is this easy to do? Or am I missing something?

Thanks,
Jake

  • 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-17T01:57:44+00:00Added an answer on June 17, 2026 at 1:57 am

    You only need 3 UIViews, to hold the image to the left of your current view, the image to the right of the current view, and the middle view, the one that is currently onscreen.

    So lets say we have UIImages A B C D and UIViews 1 2 and 3

    We are looking at View 2, image B. Page left will take us to image A, page right to image C.

    As you swipe left/ page right, view 3 becomes the onscreen view with image C. When paging comes to rest, you swap the views contents around so the user is actually looking at the middle UIView2 again, with image C. View 1 has image B, view 3 has image D.

    Scroll right again, and do the same shuffle. Now you have

    View 1 -> image C
    View 2 -> image D
    View 3 -> image A
    

    Next page right

    View 1 -> image D
    View 2 -> image A
    View 3 -> image B
    

    so on, ad infinitum in either direction

    There is a nice WWDC video on this subject from 2011. Its worth digging out. It’s the UIScrollView demo video (Documentation as PDF) You don’t need Collection Views to do this, although there is no reason why you shouldn’t…

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

Sidebar

Related Questions

I have a UICollectionView with some custom cells, it uses the flow layout and
I have a collection view that contains different custom cells. These cells contain different
I have created a UICollectionView and would like to have all the cells shake
We have a UICollectionView with a custom layout very similar to UITableView (it scrolls
I'm starting to experiment with custom UICollectionView layouts. I have a UICollectionView in my
I have UICollectionView with UICollectionViewCell created in storyboard. I customized cell by adding to
I have a UICollectionView displaying image thumbnails. Each Image View in the grid has
I have a UICollectionView that has only a few cells (about 20). Performance for
I have a UICollectionView. It scrolls horizontally, has only a single row of items,
So my rootViewController contains a UICollectionView with a Custom UICollectionViewCell. I have a label

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.