
WatchKitのシミュレータにタイマーを表示するAppleWatchアプリのサンプルコードを描いてみます。
import WatchKit
import Foundation
class InterfaceController: WKInterfaceController {
@IBOutlet weak var timer: WKInterfaceTimer!
override init() {
super.init()
let components = NSDateComponents()
components.day = 10
components.month = 12
components.year = 2015
timer.setDate(NSCalendar.currentCalendar().dateFromComponents(components)!)
timer.start()
}
}