Skip to content

Instantly share code, notes, and snippets.

@Morse-Code
Created April 29, 2013 03:03
Show Gist options
  • Select an option

  • Save Morse-Code/5479479 to your computer and use it in GitHub Desktop.

Select an option

Save Morse-Code/5479479 to your computer and use it in GitHub Desktop.

Revisions

  1. Morse-Code created this gist Apr 29, 2013.
    22 changes: 22 additions & 0 deletions ToggleMapType.m
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    - (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;
    }

    }