Skip to content

Instantly share code, notes, and snippets.

@lmiller1990
Created October 8, 2019 13:14
Show Gist options
  • Save lmiller1990/73db52a2006d1abc0496e66f09870707 to your computer and use it in GitHub Desktop.
Save lmiller1990/73db52a2006d1abc0496e66f09870707 to your computer and use it in GitHub Desktop.
import SwiftUI
import Foundation
struct ContentView: View {
func setNotification() -> Void {
let manager = LocalNotificationManager()
manager.addNotification(title: "This is a test reminder")
manager.schedule()
}
var body: some View {
VStack {
Text("Notification Demo")
Button(action: { self.setNotification() }) {
Text("Set Notification!")
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment