title: Change map type (hybrid, satellite) via segmented control
body: <p>I am trying to change the map type using a segmented control button, I wish for it to change the type of the map with 3 options: Standard, Satellite and Hybrid. So far I have this code but nothing happens once a different map type is selected:</p>
  
  <pre><code>@IBAction func segmentedControlAction(sender: UISegmentedControl!) {
  
      if sender.selectedSegmentIndex == 0{
  
          mapView.mapType = MKMapType.Standard
      }
      else if sender.selectedSegmentIndex == 1{
  
          mapView.mapType = MKMapType.Satellite
      }
      else if sender.selectedSegmentIndex == 3{
  
          mapView.mapType = MKMapType.Hybrid
      }
  }
  </code></pre>
  
  <p>I am new to Swift and Xcode so any help is appreciated :)</p>
  
  <p>Thanks</p>