Untitled
unknown
swift
4 years ago
1.1 kB
11
Indexable
Button {
let content = UNMutableNotificationContent()
content.title = TextConstants.notificationTitle
content.subtitle = TextConstants.notificationSubtitle
// Notification içeriği henüz belli olmadığından bunu yazdırdım.
content.sound = UNNotificationSound.default
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: Double(selectedTimeDuration)!*60, repeats: true)
let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)
UNUserNotificationCenter.current().add(request)
self.mode.wrappedValue.dismiss()
} label: {
buttonContent(buttonTitle: TextConstants.confirmButtonTitle)
.modifier(TextModifier(font: Font.custom("Poppins-Regular", size: 16).weight(.regular), foregroundColor: .black))
}Editor is loading...