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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:16:23+00:00 2026-05-29T22:16:23+00:00

I have an app with a MKMapView and code that is called each time

  • 0

I have an app with a MKMapView and code that is called each time the map changes locations (in regionDidChangeAnimated). When the app initially loads, regionDidChangeAnimated is called on pans (swipes), pinches, taps and buttons that explicitly update the map coordinates. After loading other views and coming back to the map the regionDidChangeAnimated is only called for taps and the buttons that explicitly update the map. Panning the map and pinches no longer call regionDidChangeAnimated.

I have looked at this stackoverflow post which did not solve this issue. The forum posts on devforums and iphonedevsdk also did not work. Does anyone know what causes this issue? I am not adding any subviews to MKMapView.

  • 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-29T22:16:24+00:00Added an answer on May 29, 2026 at 10:16 pm

    I did not want to initially do it this way, but it appears to work with no problems so far (taken from devforums post in question):

    Add the UIGestureRecognizerDelegate to your header.
    Now add a check for the version number… If we’re on iOS 4 we can do this:

     if (NSFoundationVersionNumber >= 678.58){
    
          UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(pinchGestureCaptured:)];
          pinch.delegate = self;          
          [mapView addGestureRecognizer:pinch];
    
          [pinch release];
    
          UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureCaptured:)];
          pan.delegate = self;
          [mapView addGestureRecognizer:pan];
    
          [pan release];
     }
    

    Add the delegate methods to handle the gestures:

    #pragma mark -
    #pragma mark Gesture Recognizers
    
    - (void)pinchGestureCaptured:(UIPinchGestureRecognizer*)gesture{
        if(UIGestureRecognizerStateEnded == gesture.state){
             ///////////////////[self doWhatYouWouldDoInRegionDidChangeAnimated];
        }
    }
    
    - (void)panGestureCaptured:(UIPanGestureRecognizer*)gesture{
    
        if(UIGestureRecognizerStateEnded == gesture.state){
            ///////////////////[self doWhatYouWouldDoInRegionDidChangeAnimated];
        }
    }
    
    -(BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer{
       return YES;
    }
    
    -(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:   (UITouch *)touch{
        return YES;
    }
    
    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer   shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer    *)otherGestureRecognizer{
        return YES;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have an app that has listings - think classified ads - and each listing
I am making an app that has an MKMapView. I have a translucent UIToolbar
I have an application that uses MKMapView and at some point in the app
have an app that finds your GPS location successfully, but I need to be
I have an app that needs to open a new window (in the same
I have an app written in C# that lies on a network share. When
Is it possible to have iOS4 specific code (ie the MKMapView overlays) in an
I have a view with a map and a button (like the Maps app
In the app I'm currently designing I have a MKMapView with overlays on it
I have an activity that extends MapActivity, and inside onCreate() I have this code

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.