Samuli
0
Q:

swift notifications mac

func showNotification() -> Void {
    var notification = NSUserNotification()
    notification.title = "Test from Swift"
    notification.informativeText = "The body of this Swift notification"
    notification.soundName = NSUserNotificationDefaultSoundName
    NSUserNotificationCenter.default.deliver(notification)
}

self.showNotification()
3

New to Communities?

Join the community