Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

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()
Comment

PREVIOUS NEXT
Code Example
Swift :: how to change the font of buttons programmatically swift 
Swift :: Detect if device is ipad or iphone swift 
Swift :: how to get index path cell collection view from ui longpress gesture swift 
Swift :: play sound in swift 5 
Swift :: how to replace certain characters in string swift 
Swift :: swift set view z order front 
Swift :: swift pop to specific view controller 
Swift :: how to flip or toggle boolean value in swift 
Swift :: get hours difference between two dates swift 
Swift :: swift + time delay call main thread 
Swift :: detect end of scroll in UICollectionView ios swift 
Swift :: swift struct field default value 
Swift :: swift programming language wikipedia 
Swift :: swiftui vstack alignment 
Swift :: generate random bool swift 
Swift :: replace character in swift 
Swift :: swift 5 only the day number from date 
Swift :: Thread 1: breakpoint 1.1 
Swift :: ios swift create new background thread 
Swift :: how to change the color of back button navbar xcodee 
Swift :: swiftui create search bar 
Swift :: swift create custom button programmatically 
Swift :: swift multiline string 
Swift :: button click programmatically swift 
Swift :: swift check if array values are equal 
Swift :: view will appear 
Swift :: how to loop in swift 
Swift :: Swift Omit Argument Labels 
Swift :: Swift Print Variables and Literals 
Swift :: ios tableview hide empty cells 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =