Skip to content

Instantly share code, notes, and snippets.

@dantaeusb
Created September 28, 2018 08:00
Show Gist options
  • Save dantaeusb/356688ff8416599f0289fa3825e1d87b to your computer and use it in GitHub Desktop.
Save dantaeusb/356688ff8416599f0289fa3825e1d87b to your computer and use it in GitHub Desktop.
//
// InterfaceController.swift
// Time Travel World Clock WatchKit Extension
//
// Created by Дмитрий Бурлаков on 28/09/2018.
// Copyright © 2018 dantaeusb. All rights reserved.
//
import WatchKit
import Foundation
class InterfaceController: WKInterfaceController {
@IBOutlet weak var clockTable: WKInterfaceTable!
override func awake(withContext context: Any?) {
super.awake(withContext: context)
clockTable.setNumberOfRows(2, withRowType: "ClockRow")
for i in 1...2 {
let row = clockTable.rowController(at: i)
let timezone = TimeZone(abbreviation: "MSK")
row.initialize(timezone)
}
// Configure interface objects here.
}
override func willActivate() {
// This method is called when watch view controller is about to be visible to user
super.willActivate()
}
override func didDeactivate() {
// This method is called when watch view controller is no longer visible
super.didDeactivate()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment