title: Assigning a Target for UISegmentedControl Swift 3
body: <p>I have a <code>UISegmentedControl</code> that aims to toggle between 3 types of map views "Standard", ".Hybrid", and "Satellite".  I am getting the following error on the line  ".addTarget" Line.</p>
  
  <blockquote>
    <p>"Editor placeholder in source file"</p>
  </blockquote>
  
  <pre><code>    let  segmentedControl = UISegmentedControl(items: ["Standard", "Hybrid", "Satellite"])
      segmentedControl.backgroundColor = UIColor.white.withAlphaComponent(0.5)
      segmentedControl.selectedSegmentIndex = 0
  
      // EVENT LISTENER FOR SEGMENT CONTROL
      segmentedControl.addTarget(self, action: "mapTypeChanged:", for: .valueChanged)
  
      func mapTypeChanged(segControl: UISegmentedControl){
          switch segControl.selectedSegmentIndex{
          case 0:
              mapView.mapType = .standard
          case 1:
              mapView.mapType = .hybrid
          case 2:
              mapView.mapType = .satellite
          default:
              break
          }
  
      }
  </code></pre>