I'm using a MKMapView in my application and use mapView.scrollEnabled=NO; but it's not working. Here is my code:
mapView=[[MKMapView alloc] initWithFrame:CGRectMake(20, 100, 282, 209)];
mapView.delegate=self;
mapView.scrollEnabled=YES;
[self.view addSubview:mapView];
Is there something wrong with my code?
You have used YES instead of NO in your code. Please use NO as below.
mapView.scrollEnabled = NO;
Swift
mapView.isScrollEnabled = false
Try to set
mapView.scrollEnabled=NO;
or set
mapView.userInteractionEnabled = NO;
but it does not allow you to zoom in or out and other things. click here for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With