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

  • Home
  • SEARCH
  • 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 7047059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:43:29+00:00 2026-05-28T02:43:29+00:00

I ve set of images (created dynamically) which are placed in a single row

  • 0

I ve set of images (created dynamically) which are placed in a single row in my UIScrolView.. I want to trace the changes in the locations (i.e I want to get the x,y position of all the images)while scrolling ….

Things I ve tried:

1.I stored all the images in an array
2.Then I printed the locations of images in this delegate

-(void)scrollViewDidScroll:(UIScrollView *)scrollView

But I can’t get result what I want….Instead of that I get the positions of the images which I specified…..How can I get rid of 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-28T02:43:30+00:00Added an answer on May 28, 2026 at 2:43 am

    I’m not entirely sure I understand what you mean by the location of the images but I think you want the contentOffset property of UIScrollView. If you subtract the x and y values of that from the offset of the frames of your images then you will effectively get where the images are relative to your UIScrollView‘s parent.

    Edit: Here’s some code to get you started:

    - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
        CGPoint offset = scrollView.contentOffset;
        for (UIView *view in scrollView.subviews) {
            CGPoint thisOrigin = view.frame.origin;
            thisOrigin.x -= offset.x;
            thisOrigin.y -= offset.y;
            NSLog(@"thisOrigin = %@", NSStringFromCGPoint(thisOrigin));
        }
    }
    

    That will get the origin of the images in the coordinate system of the UIScrollView‘s bounds. If you want just the origin of the images within the coordinate system of the UIScrollView‘s contents then you just want view.frame.origin itself. But I don’t think that’s what you want since you said “But I can’t get result what I want….Instead of that I get the positions of the images which I specified”.

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

Sidebar

Related Questions

How to get the perticluar image from large set images in one image using
I have a code in which all UI items created by dynamically. I have
Buttons are created dynamically and images are given to them through parsed urls, so
I dynamically create images in a loop (flash builder 4.5) and when I set
i got images from SD card folder and added them to LinearLayout dynamically which
I have created a Python file to generate a Mandelbrot set image. The original
I am trying to create a rather simple effect on a set of images.
I have a set of images in a folder call 'uploads/', all the files
How can I set all images in one line and display only the first
I display set of images(small). I need to show the larger image(300*300) at some

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.