title: CLLocation Manager in Swift to get Location of User
body: <p>I am trying to convert an old app in ObjC to Swift as a practice exercise and have ran in to some issues.  The way I had it in the old app, it was establishing the CLLocation Manager and then I would use:</p>
  
  <pre><code>manager = [[CLLocationManager alloc]init];
  manager.delegate = self;
  manager.desiredAccuracy = kCLLocationAccuracyBest;    
  [manager startUpdatingLocation]
  </code></pre>
  
  <p>which would call automatically:</p>
  
  <pre><code>-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{
  }
  </code></pre>
  
  <p>and from there I could extract all the information I needed.  But in swift, there is no autocompletion of this method and I cannot figure out how to reproduce it.  The documentation says that </p>
  
  <pre><code>startUpdatingLocation()
  </code></pre>
  
  <p>will still be called by the delegate, but it isn't happening. </p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>import UIKit
  import corelocation
  
  class ViewController: UIViewController,CLLocationManagerDelegate{
  
  @IBOutlet var gpsResult : UILabel
  
  var manager:CLLocationManager!
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
  
      manager = CLLocationManager()
      manager.delegate = self
      manager.desiredAccuracy = kCLLocationAccuracyBest
      manager.startUpdatingLocation()
  }
  
  func locationManager(manager:CLLocationManager, didUpdateLocations locations:AnyObject[]) {
      println("locations = \(locations)")
      gpsResult.text = "success"
  }
  }
  </code></pre>
  
  <p>Any help or pointers on where to look would be appreciated.  Thanks.</p>
  
  <p>EDIT: Updated from Suggestions, but still not working</p>
  
  <p>EDIT2: Seems to be some bug not allowing the method to work properly in the ViewController</p>