Talking it out on the NetNewsWire Slack group, I found out that depending on what ToolbarItemPlacement case you choose, SwiftUI will figure out the appropriate View type — and apparently .bottomBar defaults to Button. Stuffing it into a HStack fixed the issue!
All this time I’ve figured that you just can’t use SwiftUI PreviewProviders if your view takes a Binding — but I’m glad to find out I’m wrong! You can pass a Binding.constant value into your PreviewProvider.
I know how to do version control, I swear.
Moving Commits with Git Cherry-Pick: https://angelostavrow.com/post/moving-commits-git-cherry-pick/
The Promise vs Reality of SwiftUI Multiplatform: https://write.as/angelo/the-promise-vs-reality-of-swiftui-multiplatform?pk_campaign=rss-feed
...it was, in fact, uneventful.
Learning With Open Source Projects: https://angelostavrow.com/post/learning-with-open-source-projects/
SwiftUI Previews: How to fix 'Cannot convert value of type SomeType to expected argument type EnvironmentObject' errors: https://angelostavrow.com/post/fix-environmentobject-errors-in-swiftui-previews/
Dramatic Fluff: https://www.flickr.com/photos/astavrow/50171143638/
We're working on an open source WriteFreely app for Mac, iPhone, and iPad!
Read more about our latest project on the forum: https://discuss.write.as/t/writefreely-swiftui-multiplatform-app-mac-iphone-ipad/1664
Web / Swift developer. The boring half of
MakeBeforeBreak. Your biggest fan. He/him.
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!