Answers for "ios notifications swift"

3

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()
Posted by: Guest on June-06-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language