title: Swift- Find location after shake motion ends
body: <p>I know how to do shake gesture and how to find location separately, however I don't know how to find location after the user shakes the device. I have xcode version 6.4. </p>
  
  <p>Right now I have a motion ended function. And a showUserLocation function.<br>
  I would like to put a statement in motionEnded that calls the showUserLocation so that the location is found if the user shakes the phone. </p>
  
  <pre><code>override func motionEnded(motion: UIEventSubtype, withEvent event: UIEvent) {
  
        ?????  
  
      }
  
  // Showing the user location
  func showUserLocation(sender : AnyObject) {
      let status = CLLocationManager.authorizationStatus()
  
      //Asking for authorization to display current location
      if status == CLAuthorizationStatus.NotDetermined {
          locationManager.requestWhenInUseAuthorization()
      } else {
          locationManager.startUpdatingLocation()
      }
  </code></pre>