San San - 1 year ago 90
Objective-C Question

How to stop scrolling in mkmapview?

I'm using a

in my application and use
but it's not working. Here is my code:

mapView=[[MKMapView alloc] initWithFrame:CGRectMake(20, 100, 282, 209)];
[self.view addSubview:mapView];

Is there something wrong with my code?

Answer Source

You have used YES instead of NO in your code. Please use NO as below.

mapView.scrollEnabled = NO;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download