Question : swift notifications mac
Answered by : elegant-eagle-pdqhha84c147
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()
Source : | Last Update : Sat, 13 Jun 20