Created
April 29, 2013 03:03
-
-
Save Morse-Code/5479479 to your computer and use it in GitHub Desktop.
MapKit map type three way toggle.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)toggleMapType:(id)sender | |
{ | |
NSLog(@"toggleMapType"); | |
mapType = (mapType + 1) % 3; | |
if (mapType == 0) { | |
self.dangerMap.mapType = MKMapTypeStandard; | |
} | |
else if (mapType == 1) { | |
self.dangerMap.mapType = MKMapTypeHybrid; | |
} | |
else if (mapType == 2) { | |
self.dangerMap.mapType = MKMapTypeSatellite; | |
} | |
else | |
{ | |
self.dangerMap.mapType = MKMapTypeStandard; | |
mapType = 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment