         refresh(refreshControl)
 
         if CLLocationManager.authorizationStatus() == .NotDetermined {
-            locationManager.delegate = self
-            locationManager.requestLocation()
+            locationManager.requestWhenInUseAuthorization()
         }
     }
 

        tableView.reloadData()
    }

    // MARK: CLLocationManagerDelegate

    func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
        
    }

    func locationManager(manager: CLLocationManager, didFailWithError error: NSError) {
        
    }

    // MARK: Navigation

    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {

import UIKit
import CoreLocation

class PartiesTableViewController: UITableViewController, PartyTableViewControllerDelegate {
    var parties = PartiesManager.sharedInstance.parties

    @IBOutlet weak var infoButton: UIButton!
