I’m so lost on this. I’ve tried Google, ChatGPT, DeepSeek, the documentation. I’ve spent about 7 hours on this specific bug. Not sure what to do next. Does anyone have an idea?
Ambiguous use of ‘toolbar(content:)’?
@GarrDeMo I would suggest you start with commenting out parts of your code to figure out what works and incrementally uncomment your code to figure out the line that triggers the warning.
the only thing helped me:
extension View { func myToolbar<Content: ToolbarContent>(@ToolbarContentBuilder content: () -> Content) -> some View { self.toolbar(content: content) } }
still haven't figured out why it didn't work in first place
Ok, I resolved mine, maybe will be helpful to someone else.
It seems like it was overall complexity of the main View: I had a generic component with 4 viewbuilders and 4 other arguments passed via constructor.
I made an intermediary wrapper component with only one viewbuilder in its constructor which made my code cleaner and the issue is gone now.