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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:30:15+00:00 2026-06-09T17:30:15+00:00

The scrollEnabled seems to be breakable once the user starts pinching in a MKMapView

  • 0

The scrollEnabled seems to be breakable once the user starts pinching in a MKMapView.

You still can’t scroll with one finger, but if you scroll with two fingers while zooming in and out, you can move the map.

I have tried :

  • Subclassing the MKMapKit to disable the scroll view inside it.
  • Implementing –mapView:regionWillChangeAnimated: to enforce the center.
  • Disabling scrollEnabled.

but with no luck.

Can anyone tell me a sure way to ONLY have zooming in a MKMapView, so the center point always stays in the middle ?

  • 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-09T17:30:17+00:00Added an answer on June 9, 2026 at 5:30 pm

    You can try to handle the pinch gestures yourself using a UIPinchGestureRecognizer:

    First set scrollEnabled and zoomEnabled to NO and create the gesture recognizer:

    UIPinchGestureRecognizer* recognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self
                                                                                     action:@selector(handlePinch:)];
    [self.mapView addGestureRecognizer:recognizer];
    

    In the recognizer handler adjust the MKCoordinateSpan according to the zoom scale:

    - (void)handlePinch:(UIPinchGestureRecognizer*)recognizer
    {
        static MKCoordinateRegion originalRegion;
        if (recognizer.state == UIGestureRecognizerStateBegan) {
            originalRegion = self.mapView.region;
        }    
    
        double latdelta = originalRegion.span.latitudeDelta / recognizer.scale;
        double londelta = originalRegion.span.longitudeDelta / recognizer.scale;
    
        // TODO: set these constants to appropriate values to set max/min zoomscale
        latdelta = MAX(MIN(latdelta, 80), 0.02);
        londelta = MAX(MIN(londelta, 80), 0.02);
        MKCoordinateSpan span = MKCoordinateSpanMake(latdelta, londelta);
    
        [self.mapView setRegion:MKCoordinateRegionMake(originalRegion.center, span) animated:YES];
    }
    

    This may not work perfectly like Apple’s implementation but it should solve your issue.

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

Sidebar

Related Questions

I just can't get my scroll view to actually scroll.. Everything displays fine except
I am trying to create programmatically a uitableview that can scroll and fit based
I have a tableView where the user can add contacts to. These contacts get
I have a search bar, i can search now, but when I enter a
I'm trying to make a class (ScrollableView : UIScrollView) that can always scroll vertically,
I'd like to scroll my content in a UIScrollView. But I think I a
I have two little problems with my UIScrollView. I managed to create scroll view,
I know it is a very simple Question, but the TextField is not Editable.
I'm not sure why, but I'm having trouble passing a data object (NSManagedObject) to
After searching, I found a solution for scroll disabling on UIWebview (support ios 3.2+):

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.