mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 21:30:57 +00:00
28 lines
751 B
Swift
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)
|
|
}
|
|
|
|
} |