Skip to content

Instantly share code, notes, and snippets.

@julianjames
Last active August 29, 2015 14:20
Show Gist options
  • Save julianjames/991113ac21dc385f04c4 to your computer and use it in GitHub Desktop.
Save julianjames/991113ac21dc385f04c4 to your computer and use it in GitHub Desktop.
//
// NotificationController.swift
// Hackaball WatchKit Extension
//
// Created by Julian James on 29/04/2015.
// Copyright (c) 2015 Made by Many. All rights reserved.
//
import WatchKit
import Foundation
class NotificationController: WKUserNotificationInterfaceController {
override init() {
// Initialize variables here.
super.init()
// Configure interface objects here.
}
override func willActivate() {
// This method is called when watch view controller is about to be visible to user
super.willActivate()
self.updateUserActivity("???.?????????.Hackaball.notification", userInfo: ["Reason" : "Notification"], webpageURL: nil)
}
override func didDeactivate() {
// This method is called when watch view controller is no longer visible
super.didDeactivate()
}
/*
override func didReceiveLocalNotification(localNotification: UILocalNotification, withCompletion completionHandler: ((WKUserNotificationInterfaceType) -> Void)) {
// This method is called when a local notification needs to be presented.
// Implement it if you use a dynamic notification interface.
// Populate your dynamic notification interface as quickly as possible.
//
// After populating your dynamic notification interface call the completion block.
completionHandler(.Custom)
}
*/
/*
override func didReceiveRemoteNotification(remoteNotification: [NSObject : AnyObject], withCompletion completionHandler: ((WKUserNotificationInterfaceType) -> Void)) {
// This method is called when a remote notification needs to be presented.
// Implement it if you use a dynamic notification interface.
// Populate your dynamic notification interface as quickly as possible.
//
// After populating your dynamic notification interface call the completion block.
completionHandler(.Custom)
}
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment