Thanks for the response. I already have a check for that:
GeometryReader { geometry in
let adWidth = geometry.size.width == 0 ? geometry.size.height : geometry.size.width
NavigationStack {
if adWidth > 0 {
AdView(adWidth: adWidth)
}
So it's not crashing because of that. I'll put an error message in the main thread.
Post
Replies
Boosts
Views
Activity
I can't try it now, but I believe that I did initially do it that way, but got an error. I wouldn't have checked for nil if I hadn't.
By the way, this was to get around the bug in SwiftUI/SwiftData where you can move an item in a list, but it isn't tracked. That's a serious bug, but given that text to speech has been broken for a very long time, I don't expect this one to be fixed soon.
If that helps get it fixed, great! But in the end, the whole system needs to work together. Swift, SwiftUI, Xcode... all are hurt when one fails, and they're failing often.
NavigationStack will take over an entire grid row or HStack, because Apple has yet to fix it. So this is still a problem.
Because NavigationLink will take over the whole row! Apple STILL hasn't fixed this in Nov '24
Still a problem in November, 2024 and still the solution.
I don't see Xcode or Swift listed there.
This is clearly a bug in SwiftData. There is no point in having onMove if the move is only temporary. Either SwiftData needs to track the order, or onMove needs to be removed.