It seems that Xcode Version 15.0 beta 2 (15A5161b) fixes the problem for me. both for my demo app, which has no modules, as well as my production app which had files in different modules. I had to clean, clear derived data, etc. but it was successful!
Post
Replies
Boosts
Views
Activity
I just checked on Xcode 14.3.1 (14E300c), and the error persists, though if I set the deployment target to 16.4, it works. In my case, other 16 versions failed, but it was tedious to clean, close, build, etc, so I'm slightly less confident, but after working on 16.4, it would definitely fail on 16.0. So ¯_(ツ)_/¯
M1 Pro laptop.
I have filed FB12223685
Interestingly, I've been toying around with exactly this kind in UIKit. Things are still a mess. I think it should be completely doable in SwiftUI, in either case it's most likely a matter of defining a set of custom methods on your nesting view's behavior correctly. I am not there yet with my UIKit implementation. But if you squint and are generous, you can see how it kind of works. I've attached a gif.
I've been surprised I couldn't find some existing work on this. I'm sure someone's done it. Searching for it led me to this post of yours.