Is there a way to do that in SwiftUI?
(I apologize for spamming, I thought my comments didn't get through because I got "Your post couldn’t be saved. Please try again in a few minutes.")
Hi Richard,
Thank you for the response — that makes sense. I hadn’t yet experimented with fetchLimit / fetchOffset, but your answer confirms that pagination (or otherwise constraining the query result set) is the correct approach here, even when using LazyVStack.
I appreciate the clarification and will experiment with limiting the dataset size to improve performance.
Thanks again for taking the time to look into this.
Hi, thank you for your response.
The issue with waiting for the second viewDidLayout is that it may fail when no restoration resize occurs, such as when the saved window size already matches the default. In that case, setup should run on the first layout pass.
Using a delay can also cause flickering and feels more like a workaround than a reliable macOS-native solution. I’m hoping for a more deterministic lifecycle pattern.
Is there a way to do that in SwiftUI?
(I apologize for spamming, I thought my comments didn't get through because I got "Your post couldn’t be saved. Please try again in a few minutes.")
Hi Richard,
Thank you for the response — that makes sense. I hadn’t yet experimented with fetchLimit / fetchOffset, but your answer confirms that pagination (or otherwise constraining the query result set) is the correct approach here, even when using LazyVStack.
I appreciate the clarification and will experiment with limiting the dataset size to improve performance.
Thanks again for taking the time to look into this.
Hi, thank you for your response.
The issue with waiting for the second viewDidLayout is that it may fail when no restoration resize occurs, such as when the saved window size already matches the default. In that case, setup should run on the first layout pass.
Using a delay can also cause flickering and feels more like a workaround than a reliable macOS-native solution. I’m hoping for a more deterministic lifecycle pattern.