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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:57:36+00:00 2026-05-23T23:57:36+00:00

On my iPad app, I have 2 mapViews that are the same size displayed

  • 0

On my iPad app, I have 2 mapViews that are the same size displayed next to each other. I want these to always show the same area. I achieve this now using the regionDidChangeAnimated: delegate method.

This does not always work that great (sometimes the regions are different after zooming) and there is a lag between the user moving one of the maps and the other one moving.

Is there a good way to duplicate the touches across both maps so that as a user is panning and zooming on one, it will automatically do the same thing on the other map at the same time?

One thing I looked at was creating a UITouch object with the same location value as the ones being crating in the map that is being moved, but that is not really a good solution.

Is there a way to just duplicate a set of touches on one UIView to another (since MKMapView is a UIView)?

Thanks,
Ross

  • 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-23T23:57:36+00:00Added an answer on May 23, 2026 at 11:57 pm

    You could use UIGestureRecognizer to help keep the maps more in sync as the user is manipulating one of the maps.

    For example, using the UIPanGestureRecognizer, the gesture recognizer action handler will fire multiple times while the user is panning the map–unlike regionDidChangeAnimated which fires only when the pan is finished.

    You’ll need to add a gesture recognizer to one or both maps and implement your custom gesture handler method. Also implement the shouldRecognizeSimultaneouslyWithGestureRecognizer delegate method and return YES so your gesture handler can work together with the map’s.

    Example:

    //add the gesture handler to map(s)...
    UIPanGestureRecognizer *pgr = [[UIPanGestureRecognizer alloc] 
        initWithTarget:self action:@selector(gestureHandler:)];
    pgr.delegate = self;
    [mapViewA addGestureRecognizer:pgr];
    [pgr release];
    
    //...
    
    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer 
        shouldRecognizeSimultaneouslyWithGestureRecognizer:
            (UIGestureRecognizer *)otherGestureRecognizer
    {
        return YES;
    }
    
    - (void)gestureHandler:(UIGestureRecognizer *)gestureRecognizer
    {
        [mapViewB setRegion:mapViewA.region animated:NO];
    }
    

    If you want to add the gesture recognizer to both, you’ll need to create a separate instance for each map (ie. you can’t add pgr to both maps). You might also want/need to add UIPinchGestureRecognizer and UITapGestureRecognizer. You can use the same handler method for all the recognizers though.

    I’d still implement regionDidChangeAnimated just in case a gesture is missed.

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

Sidebar

Related Questions

I have an iPad app where I have a view controller that is the
I'm building an iPad app that will have multiple paper pages and I'd like
I have a iPad app that can take a picture and then put it
I have an iPad app that I would like to make Universal, however this
I'm designing an iPad app that will have a custom grid in it. The
i need to create an iPad app where i have to show multiple tables(no
I have an iPad app that is not showing a table created programmatically. Where
I have an ipad app, that as user does some actions, uitextfields and buttons,
I have an iPad app that I would like to work in the sideways
I have an iPad app that has 4 buttons on the left side that

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.