Untitled

Anonymous
swift
03/04/2022 9:54 AM
1.5 KB
19
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...