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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:37:24+00:00 2026-05-30T01:37:24+00:00

I need in my project to make the scroll an image continuously, ie from

  • 0

I need in my project to make the scroll an image continuously, ie from the bottom of the image once scrolled by continuing to scroll to the top should start from the base and so on, in a sort of loop, how can I do to do this?

Thanks

  • 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-30T01:37:26+00:00Added an answer on May 30, 2026 at 1:37 am

    In this example i am taking total 5 images

    - (void)viewDidLoad {
            [super viewDidLoad];
    
            // add the last image (image4) into the first position
            [self addImageWithName:@"image4.jpg" atPosition:0];
    
            // add all of the images to the scroll view
            for (int i = 1; i < 5; i++) {
                [self addImageWithName:[NSString stringWithFormat:@"image%i.jpg",i] atPosition:i];
            }
    
            // add the first image (image1) into the last position
            [self addImageWithName:@"image1.jpg" atPosition:5];
    
            scrollView.contentSize = CGSizeMake(320, 2496);    
            [scrollView scrollRectToVisible:CGRectMake(0,416,320,416) animated:NO]; 
        }
    
        - (void)addImageWithName:(NSString*)imageString atPosition:(int)position {
            // add image to scroll view
            UIImage *image = [UIImage imageNamed:imageString];
            UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
            imageView.frame = CGRectMake(0,position*416,320, 416);
            [scrollView addSubview:imageView];
            [imageView release];
        }
    

    implement delegate method

    - (void)scrollViewDidEndDecelerating:(UIScrollView *)sender {    
        NSLog(@"%f",scrollView.contentOffset.y);
        // The key is repositioning without animation      
        if (scrollView.contentOffset.y == 0) {         
            // user is scrolling to the left from image 1 to image 4         
            // reposition offset to show image 4 that is on the right in the scroll view         
            [scrollView scrollRectToVisible:CGRectMake(0,1664,320,416) animated:NO];     
        }    
        else if (scrollView.contentOffset.y == 2080) {         
            // user is scrolling to the right from image 4 to image 1        
            // reposition offset to show image 1 that is on the left in the scroll view         
            [scrollView scrollRectToVisible:CGRectMake(0,416,320,416) animated:NO];         
        } 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my project I need to write small WYSIWYG editor (just let users make
I need to make a game in Java for a project. What I'm trying
I have a project in Java and I need to make a code listing
We are reaching a point in our project where we need to make a
In a .NET 3.0 project, I need to make some calls via P/Invoke (specifically
In my current project (presentation, slide software) I need to be able to make
I have a project in my IDE. I need to make a shared library
I need to make a project in java where I am going to create
for a project we need to call some webservices from vbscript. This is doable,
Hello I need to remake some old C++Builder (6) project and make it for

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.