Post

Replies

Boosts

Views

Activity

Reply to Ambiguous use of ‘toolbar(content:)’?
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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’25
Reply to Ambiguous use of ‘toolbar(content:)’?
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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to Ambiguous use of ‘toolbar(content:)’?
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
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to swift-frontend memory usage
In my case replacing .cornerRadius(<value>) with .clipShape(RoundedRectangle(cornerRadius: <value>) helped 🤷🏻‍♂️ Xcode 13.1 on BigSur
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21