|
I just finished the video and I'm having the same problem with .onChange(update) just dismissing the screen after tapping and trying to enter a time. I was able to solve this by removing the onChange(update) from both $remindMe and the $reminderTime as shown below. Of course you would need to do the initial workaround that was posted earlier for EditProjectView concerning the onChange(update) problem some of us were having. I haven't moved from 12.4 yet so maybe some of you have better luck with another version of xcode regarding this. Anyway, I hope this helps anyone who might be having this issue. Section(header: Text("Project reminders")) { Toggle( "Show Reminders", isOn: $remindMe.animation()) .alert(isPresented: $showingNotificationsError) { Alert(title: Text("Ughh"), message: Text( "Make sure notifications are enabled"), primaryButton: .default(Text( "Check Settings"), action: showAppSettings), secondaryButton: .cancel()) }
|
|
|
|
Perfect in Xcode 12.5 beta. I had the same issue with 12.4 as you did @James (on simulator - never checked on real device). Rotating the simulator in 12.4 to landscape then back to portrait, and it worked fine too, but only once then the but reappears, so you would have to rotate again. |
|
Thanks @NigelGee and @Andeanie for the reples. I downloaded 12.4 and the latest Beta version and still the same problem. I rewatched the original EditProjectView Video, skipped the simulator and tested on my iphone 12 to make sure of no errors. It still dismisses the screen even in landscape mode. So again, thanks to @NigelGee's workaround: /* The problem seem to be with update(). I found a work-a-round for time being is to remove .onChange(update) from both TextFields remove update() from .onTapGesture in colorButton add dataController.save() to func update() change .onDisappear to .onDisappear(perform: update) */ It works perfectly and the notification reminders work as well.. So Thank you @NigelGee, I think you should have a dedicated "AWARD" on the AwardsView for this solution. |
|
|
|
@James, when you post code, please put three backticks This: Section(header: Text("Project reminders")) { Toggle( "Show Reminders", isOn: $remindMe.animation()) .alert(isPresented: $showingNotificationsError) { Alert(title: Text("Ughh"), message: Text( "Make sure notifications are enabled"), primaryButton: .default(Text( "Check Settings"), action: showAppSettings), secondaryButton: .cancel()) }
vs this:
|
|
|
|
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.