Last active
October 12, 2018 11:21
-
-
Save rawandahmad698/9ac0b7a411b7e88ff44068938a0b250a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import WatchKit | |
import Foundation | |
import NotificationCenter | |
class SwipeController: WKInterfaceController { | |
//@IBOutlet weak var myTimer: WKInterfaceTimer! | |
var timer = TimerController() | |
override func awake(withContext context: Any?) { | |
super.awake(withContext: context) | |
// Configure interface objects here. | |
} | |
override func willActivate() { | |
// This method is called when watch view controller is about to | |
super.willActivate() | |
} | |
override func didDeactivate() { | |
// This method is called when watch view controller is no | |
super.didDeactivate() | |
} | |
@IBAction func PauseButton() { | |
// Post notification: | |
let userInfo = ["foo": 1, "bar": "baz"] as [String: Any] // you could also transfer data | |
NotificationCenter.default.post(name: .stopTimer, object: nil, userInfo: userInfo) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment