Files
sailing-analytics/ios/SAPTracker/CourseViewController.swift
T

28 lines
751 B
Swift

//
// HeadingViewController.swift
// SAPTracker
//
// Created by computing on 09/12/14.
// Copyright (c) 2014 com.sap.sailing. All rights reserved.
//
import Foundation
class CourseViewController: UIViewController {
@IBOutlet weak var courseLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
NSNotificationCenter.defaultCenter().addObserver(self, selector:"newLocation:", name:LocationManager.NotificationType.newLocation, object: nil)
}
deinit {
NSNotificationCenter.defaultCenter().removeObserver(self)
}
func newLocation(notification: NSNotification) {
courseLabel.text = String(format: "%.0f °", notification.userInfo!["course"] as! Double)
}
}