79198628

Date: 2024-11-18 03:45:37
Score: 1.5
Natty:
Report link

You could subcribe to UIApplicationSignificantTimeChangeNotification

struct ContentView: View {
    var body: some View {
        ...
        .onReceive(NotificationCenter.default
            .publisher(for: UIApplication.significantTimeChangeNotification)) { (output) in
            // Update variables at midnight here
        }
    }
}
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: duckSern1108