{"id":128578,"date":"2021-06-08T12:55:30","date_gmt":"2021-06-08T12:55:30","guid":{"rendered":"https:\/\/developer.apple.com\/news\/?id=5qbbn6ut"},"modified":"2021-06-08T12:55:30","modified_gmt":"2021-06-08T12:55:30","slug":"challenge-throwback-with-swiftui","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2021\/06\/08\/challenge-throwback-with-swiftui\/","title":{"rendered":"Challenge: Throwback with SwiftUI"},"content":{"rendered":"<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/10\/challenge-throwback-with-swiftui.jpg\" data-hires=\"false\" alt=\"Pencil drawing a MacOS window\"><\/div>\n<p>Whether you\u2019ve been coding for 40 years, you\u2019re new to the SwiftUI scene, or you\u2019re a designer \u2014 everyone loves a good throwback. Give in to the nostalgia and imagine what your app might look like if designed for the Mac or iPhone interfaces of yesteryear. Are you a fan of the refreshing feel of 2000s-era Aqua? Perhaps you prefer the iconic grayscale of System 6. Or maybe you\u2019ve been hoping for a return to the early days of iPhoneOS skeumorphism. Now\u2019s your chance: Travel back in time with us and design a SwiftUI view that embraces that retro styling.<\/p>\n<h3>Begin the challenge<\/h3>\n<p>Before you travel through time, it\u2019s important to choose your digital companion: are you designing a view for an existing app, or bringing an entirely new view idea along for the ride? Once you\u2019ve decided, it\u2019s time to fire up Xcode. Use your favorite random number generator to choose a year between 1984 and 2013 \u2014 or if you like, open up a Swift Playground to take you back in time:<\/p>\n<pre class=\"code-source\"><code><span class=\"syntax-keyword\">let<\/span> myCoolRetroYear <span class=\"syntax-operator\">=<\/span> <span class=\"syntax-type\">Int<\/span>.random(in: <span class=\"syntax-number\">1984<\/span><span class=\"syntax-operator\">..&lt;<\/span><span class=\"syntax-number\">2013<\/span>)\n<span class=\"syntax-built_in\">print<\/span>(<span class=\"syntax-string\">\"Reimagine your app's interface like it's from the year <span class=\"syntax-subst\">\\(myCoolRetroYear)<\/span>!\"<\/span>)<\/code><\/pre>\n<p>Once you\u2019ve settled on a year, begin imagining your interface with the Apple Design Languages prominent during that time! For designers and those newer to the world of code, explore how much UI you can create with the help of Xcode Previews. And when it\u2019s time to start adding code, see how simple and fun SwiftUI makes it. For seasoned code warriors, further your SwiftUI knowledge and explore the new features of SwiftUI that will take your recreated artifact to the next level. <\/p>\n<p>Want to share your work-in-progress or collaborate with other developers? You can show off your finished design in the Developer Forums.<\/p>\n<p><a href=\"https:\/\/developer.apple.com\/forums\/\" class=\"icon icon-after icon-chevronright\">Visit the Apple Developer Forums<\/a><\/p>\n<h3>Resources<\/h3>\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\/wwdc20\/10119\" class=\"activity-image-link\"> <img decoding=\"async\" class=\"actiity-image medium-scale\" width=\"250\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/10\/challenge-throwback-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\/wwdc20\/10119\"> <\/p>\n<h4 class=\"no-margin-bottom activity-title\">Introduction to SwiftUI<\/h4>\n<p class=\"activity-description\">Explore the world of declarative-style programming: Discover how to build a fully-functioning SwiftUI app from scratch as we explain the benefits of writing declarative code and how SwiftUI and Xcode can combine forces to help you build great apps, faster.<\/p>\n<p> <\/a> <\/section>\n<\/section>\n<\/section>\n<p><a href=\"https:\/\/developer.apple.com\/wwdc21\/challenges\/terms\/WWDC21_Challenge_Terms_Conditions.pdf\" class=\"icon icon-after icon-chevronright\">Read the WWDC21 Challenges Terms and Conditions<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whether you\u2019ve been coding for 40 years, you\u2019re new to the SwiftUI scene, or you\u2019re a designer \u2014 everyone loves a good throwback. Give in to the nostalgia and imagine what your app might look like if designed for the Mac or iPhone interfaces of yesteryear. Are you a fan of the refreshing feel of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":128579,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-128578","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\/128578","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=128578"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/128578\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/128579"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=128578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=128578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=128578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}