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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:45:28+00:00 2026-05-19T04:45:28+00:00

I Have a UIScrollview with a UIImageView inside where I scroll from an image

  • 0

I Have a UIScrollview with a UIImageView inside where I scroll from an image to another.

I used the TapToZoom Apple sample code to implement the zoom but whenever I zoom the scrollview starts from the begining rather than the active image.

Here’s a piece of my code :

Init and populate the imageview :

table = [[NSMutableArray alloc] initWithCapacity:7];
for(int count = 1; count <= 7; count++)
{
    NSString *fileName = [NSString stringWithFormat:@"image%d.jpg", count];
    UIImage  *image    = [UIImage imageNamed:fileName];
    [table addObject:image];
    if (image == nil) {
        break;
    }
    imageView = [[UIImageView alloc] initWithImage:image];
    imageView.userInteractionEnabled = YES;
    imageView.multipleTouchEnabled = YES;

Implement Tap Gesture :

UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)];
    UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleDoubleTap:)];

The handleDoubleTap method zooms to the center of the the imageView and brings the scrollview to the begigining of the paging.

I searched a lot about this, but was unable to find a way to zoom on the actual displayed image.

Thanks in advance 🙂

  • 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-19T04:45:28+00:00Added an answer on May 19, 2026 at 4:45 am

    Checkout the PhotoScroller sample from Apple:

    http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html

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

Sidebar

Related Questions

I have a UIImageView that is housed inside a UIScrollView . The image in
I have a UIImageView inside of a UIScrollView. The parent scroll view allows zooming
I have an UIImageView with an image (map) inside of a UIScrollView. I add
in my app i have UIImageView inside UIScrollview which i can zoom in and
I have an image inside an UIImageView which is within a UIScrollView. What I
I have an UIImageView inside an UIScrollView. I want that the user can zoom
I have a UIScrollView and inside it there is a UIImageView with an image.
I have a UIScrollview with a UIImageview inside it showing a floor plan. I
i have an uiscrollview with a uiimageview inside. I subclass the uiscrollview but i
I have a uiscrollview and there is a uiimageview inside it. I want the

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.