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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:03:27+00:00 2026-05-31T20:03:27+00:00

I have a screen in my project that contains 3 UIScrollView . These scrollviews

  • 0

I have a screen in my project that contains 3 UIScrollView.
These scrollviews contain an image, when i am trying to zoom one of the scrollview
I dont know how but all of them are zooming together.

This is my code:

if ([FrameString isEqualToString:@"LB"]) {
    leftButton.hidden = YES;

    if (imageLeft == nil) {
        imageLeft = [[UIImageView alloc]initWithImage:pickedImage];
    }

    imageLeft.frame = CGRectMake(0 , 0, imageLeft.frame.size.width/4, imageLeft.frame.size.height/4);
    self.Scrollview.maximumZoomScale = 0.9;
    self.Scrollview.minimumZoomScale = 0.6;
    self.Scrollview.frame = CGRectMake(self.Scrollview.frame.origin.x, self.Scrollview.frame.origin.y, self.Scrollview.frame.size.width, self.Scrollview.frame.size.height);
    [self.Scrollview setContentSize:CGSizeMake(imageLeft.frame.size.width, imageLeft.frame.size.height)];
    self.Scrollview.clipsToBounds = YES;
    self.Scrollview.delegate = self;
    [self.Scrollview setScrollEnabled:YES];
    [self.Scrollview addSubview:imageLeft];
}

if ([FrameString isEqualToString:@"RDB"]) {
    RightDownButton.hidden = YES;
    if (RightDown == nil) {
        RightDown = [[UIImageView alloc]initWithImage:pickedImage];
    }

    RightDown.frame = CGRectMake(0 , 0, RightDown.frame.size.width/3, RightDown.frame.size.height/3);
    self.scrollview1.maximumZoomScale = 0.9;
    self.scrollview1.minimumZoomScale = 0.6;
    self.scrollview1.frame = CGRectMake(self.scrollview1.frame.origin.x, self.scrollview1.frame.origin.y, self.scrollview1.frame.size.width, self.scrollview1.frame.size.height);
    [self.scrollview1 setContentSize:CGSizeMake(RightDown.frame.size.width, RightDown.frame.size.height)];
    self.scrollview1.clipsToBounds = YES;
    self.scrollview1.delegate = self;
    [self.scrollview1 setScrollEnabled:YES];
    [self.scrollview1 addSubview:RightDown];

}
if ([FrameString isEqualToString:@"RUB"]) {
    rightUpButton.hidden = YES;
    if (RightUp == nil) {
        RightUp = [[UIImageView alloc]initWithImage:pickedImage];
    }

    RightUp.frame = CGRectMake(0 , 0, RightUp.frame.size.width/3, RightUp.frame.size.height/3);
    self.scrollview2.maximumZoomScale = 0.9;
    self.scrollview2.minimumZoomScale = 0.6;
    self.scrollview2.frame = CGRectMake(self.scrollview2.frame.origin.x, self.scrollview2.frame.origin.y, self.scrollview2.frame.size.width, self.scrollview2.frame.size.height);
    [self.scrollview2 setContentSize:CGSizeMake(RightUp.frame.size.width, RightUp.frame.size.height)];
    self.scrollview2.clipsToBounds = YES;
    self.scrollview2.delegate = self;
    [self.scrollview2 setScrollEnabled:YES];
    [self.scrollview2 addSubview:RightUp];
}
  • 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-31T20:03:28+00:00Added an answer on May 31, 2026 at 8:03 pm

    When zooming, its calling the same delegate for both the scrollViews. So irrespective of which scrollView is zooming, everything in the delegate method gets implemented.

    an easy way to fix this would be to set a tag for both the scrollviews

    like self.Scrollview.tag = 1 adn self.scrollview1.tag = 2

    check for the tag in the scrollView delegate methods

    and run it only if the tag matches the one you are interested in.

    eg:-

    - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
    
    if (scrollView.tag == TagYouAreInterestedIn){
        //do stuff
    
        }
       return view;
    }
    

    Hope this helps.

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

Sidebar

Related Questions

I have a solution that contains a setup project(made with VS2008 setup wizard). I
I have a screen with a ListBox of items. The item template contains an
I have a screen with pivot functionality, and I'd very much like just one
In an embedded program I have a screen object that needs to manage a
I have to make a maintenance release of a project that hasn't been touched
I have a disk image which contains a standard image using fuse. The Superblock
We have a project that is all about web accessibility compliance. About a week
I have this VB.Net 1.1 project that I have to make some changes to.
My project that I've spent almost 40hrs on is almost complete, but I have
Assuming I have a project that is: using UINavigationController that has the (a) main

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.