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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:55:32+00:00 2026-06-01T16:55:32+00:00

I have two scroll-views placed side by side and they can be zoomed individually.

  • 0

I have two scroll-views placed side by side and they can be zoomed individually. I’ve done this by putting my view inside a scrollview and setting the zoom-scale for the scroll-views. So far, it works fine! Now, there’s a new requirement to zoom the two images together so that if I zoom one image, the other is zoomed automatically with the same zoom scale. I was given the roambi app as reference in which two scrollviews can be scrolled together by scrolling either one of them for convenience during comparison. Basically, what I’m doing is also comparison between the two views. I’ve gone through scrollview delegate methods but was unable to achieve the required results. How do I do this?

  • 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-01T16:55:32+00:00Added an answer on June 1, 2026 at 4:55 pm

    I had implemented something similar a while ago (I did it for buttons). This is how I did it:

    Take two UIScrollViews and reference them (I’ve used firstScrollView and secondScrollView)

    Take two UIButtons and reference them (I’ve used firstImgBtn and secondImgBtn). Set the delegates to both the scrollviews and use the following delegate methods:

    - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
        //return the respective button in the scrollview to be zoomed
        if(scrollView==firstScrollView){
            return firstImgBtn;
        }
        else{
            return secondImgBtn;
        }
    }
    
    - (void)scrollViewDidZoom:(UIScrollView *)scrollView{
        // zoom in the other scrollview when one has zoomed
        if(zoomTogether){//a bool to decide whether to zoom the two together or not
            if(scrollView==firstScrollView){
                secondScrollView.zoomScale = firstScrollView.zoomScale;
            }
            else{
                firstScrollView.zoomScale = secondScrollView.zoomScale;
            }
        }
    }
    

    This can be applied to any subclass of UIView-in your case it will be UIImageViews

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

Sidebar

Related Questions

I have a scroll view which switches between two views. The two views are
I have to add one text view and two radio buttons in the scroll
So here is the catch. I have two Scroll Views, one is filled with
i have two horizontal scroll views each containing a linear layout item under it.
I have a view controller that has three scroll views as subviews. I would
I have two little problems with my UIScrollView. I managed to create scroll view,
In my application I have a Gallery view and two buttons to scroll it
I have a two column TableLayout as the only child of a scroll view.
I have two datagrids side by side bound to different data tables and each
I have read Apple Scroll View Programming Guide for iOS but still confused about

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.