Created
July 19, 2019 02:06
-
-
Save KevinGutowski/2d48cbd3c44c38fa836df335f6eb7c08 to your computer and use it in GitHub Desktop.
Create a notification within a sketch plugin
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
let notification = NSUserNotification.alloc().init() | |
let randomNumber = Math.random() | |
notification.setIdentifier("com.kevin.testNotification" + randomNumber) | |
notification.setTitle("Hi there") | |
notification.setSubtitle("What about this?") | |
notification.setInformativeText("Your symbol") | |
notification.setSoundName = NSUserNotificationDefaultSoundName | |
let notificationCenter = NSUserNotificationCenter.defaultUserNotificationCenter() | |
notificationCenter.deliverNotification(notification) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment