//MPH and KMH @IBOutlet weak var SpeedLbl: UILabel! //Outlets for buttons on the slide up settings menu @IBOutlet weak var kilometers: UIButton! @IBOutlet weak var milesPerHour: UIButton! func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { let location: CLLocation = locations.last! if milesPerHour.isSelected == true { SpeedLbl.text = String(format: "%.1f", location.speed) + " mph" } else if kilometers.isSelected == true { SpeedLbl.text = String(format: "%.1f", location.speed * 1.61) + " kph" } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)