{"id":125644,"date":"2022-06-10T15:00:02","date_gmt":"2022-06-10T15:00:02","guid":{"rendered":"https:\/\/developer.apple.com\/news\/?id=2293tuu9"},"modified":"2022-06-10T15:00:02","modified_gmt":"2022-06-10T15:00:02","slug":"challenge-menu-bar-extras-with-swiftui","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2022\/06\/10\/challenge-menu-bar-extras-with-swiftui\/","title":{"rendered":"Challenge: Menu bar extras with SwiftUI"},"content":{"rendered":"<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/06\/challenge-menu-bar-extras-with-swiftui.jpg\" data-hires=\"false\" alt><\/div>\n<p>And now, a brief message from your friend, the Mac menu bar:<\/p>\n<p><em>Hi! \ud83d\udc4b\ud83c\udffb I\u2019m the menu bar! I always love making <code>File \u2192 New Friends<\/code>. We might have first met in the early 1980s, but I\u2019ve only gotten more powerful and helpful (<code>Format \u2192 Font \u2192 Humble Brag<\/code>).<\/em><\/p>\n<p><em>I\u2019ve always had opinions. During the 90s, I was the one who told you you were exceptional every night (<code>Special \u2192 Sleep<\/code>). I have constant viewpoints about what time it is. And I don\u2019t mean to <code>Window \u2192 Minimize<\/code> my contributions, but even Siri wants to hang out with me.<\/em><\/p>\n<p><em>I have enjoyed capturing your full attention for some years. But now I\u2019ve decided to share the Spotlight. Menu bar extras have arrived in SwiftUI! <\/em><\/p>\n<p><em>So here&#8217;s your challenge: Build me a menu bar extra in SwiftUI that I\u2019d wear with pride. I\u2019d drop down with joy if you\u2019d make a little utility for me, and I&#8217;d be a click above ecstatic if you gave me the honor of hosting a small portion of your app.<\/em><\/p>\n<h3>Begin the challenge<\/h3>\n<p>To help you build a menu bar extra and complete the Mac menu bar&#8217;s challenge, we&#8217;ve compiled a few resources to help you get started:<\/p>\n<section class=\"grid activity\">\n<section class=\"row\">\n<section class=\"column large-4 small-4 no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/wwdc22\/10061\" class=\"activity-image-link\"> <img decoding=\"async\" class=\"actiity-image medium-scale\" width=\"250\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/06\/challenge-menu-bar-extras-with-swiftui-1.jpg\" data-hires=\"false\" alt> <\/a> <\/section>\n<section class=\"column large-8 small-8 padding-left-small padding-top-small padding-bottom-small no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/wwdc22\/10061\"> <\/p>\n<h4 class=\"no-margin-bottom activity-title\">Bring multiple windows to your SwiftUI app <\/h4>\n<p class=\"activity-description\">Discover the latest SwiftUI APIs to help you present windows within your app\u2019s scenes. We\u2019ll explore how scene types like MenuBarExtra can help you easily build more kinds of apps using SwiftUI. We\u2019ll also show you how to use modifiers that customize the presentation and behavior of your app&#8230;<\/p>\n<p> <\/a> <\/section>\n<\/section>\n<\/section>\n<p><a href=\"https:\/\/developer.apple.com\/documentation\/SwiftUI\/MenuBarExtra\" class=\"icon icon-after icon-chevronright\">MenuBarExtra<\/a><\/p>\n<p><a href=\"https:\/\/developer.apple.com\/design\/human-interface-guidelines\/components\/system-experiences\/the-menu-bar#menu-bar-extras\" class=\"icon icon-after icon-chevronright\">Explore the Human Interface Guidelines for menu bar extras<\/a><\/p>\n<p>We welcome you to visit the SwiftUI Study Hall to collaborate on this challenge! Ask questions, connect with other developers, and share your creations.<\/p>\n<p>And to close out this challenge, one more note from the menu bar:<\/p>\n<p><em>Make sure you File \u2192 Share with me what you did on Twitter with the hashtag #WWDC22Challenges. We hope you\u2019ve had a great Edit \u2192 Select All \u2192 WWDC22!<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>And now, a brief message from your friend, the Mac menu bar: Hi! \ud83d\udc4b\ud83c\udffb I\u2019m the menu bar! I always love making File \u2192 New Friends. We might have first met in the early 1980s, but I\u2019ve only gotten more powerful and helpful (Format \u2192 Font \u2192 Humble Brag). I\u2019ve always had opinions. During the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":125645,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-125644","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apple-developer-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/125644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=125644"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/125644\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/125645"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=125644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=125644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=125644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}