Problem: Menu bar extras with SwiftUI – Uncover


And now, a quick message out of your buddy, the Mac menu bar:

Hello! 👋🏻 I’m the menu bar! I at all times love making File → New Buddies. We would have first met within the early Nineteen Eighties, however I’ve solely gotten extra highly effective and useful (Format → Font → Humble Brag).

I’ve at all times had opinions. In the course of the 90s, I used to be the one who informed you you have been distinctive each evening (Particular → Sleep). I’ve fixed viewpoints about what time it’s. And I don’t imply to Window → Decrease my contributions, however even Siri desires to hang around with me.

I’ve loved capturing your full consideration for some years. However now I’ve determined to share the Highlight. Menu bar extras have arrived in SwiftUI!

So this is your problem: Construct me a menu bar additional in SwiftUI that I’d put on with delight. I’d drop down with pleasure in case you’d make a bit of utility for me, and I would be a click on above ecstatic in case you gave me the dignity of internet hosting a small portion of your app.

Start the problem

That can assist you construct a menu bar additional and full the Mac menu bar’s problem, we have compiled a couple of assets that can assist you get began:

Deliver a number of home windows to your SwiftUI app

Uncover the newest SwiftUI APIs that can assist you current home windows inside your app’s scenes. We’ll discover how scene sorts like MenuBarExtra might help you simply construct extra sorts of apps utilizing SwiftUI. We’ll additionally present you the way to use modifiers that customise the presentation and conduct of your app…


Discover the Human Interface Tips for menu bar extras

We welcome you to go to the SwiftUI Examine Corridor to collaborate on this problem! Ask questions, join with different builders, and share your creations.

And to shut out this problem, yet one more word from the menu bar:

Ensure you File → Share with me what you probably did on Twitter with the hashtag #WWDC22Challenges. We hope you’ve had an awesome Edit → Choose All → WWDC22!



Leave a Comment