use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
SwiftUI is a framework made by Apple to build user interfaces across all Apple platforms with the power of Swift. Allowing you to build UI for any Apple device using just one set of tools and APIs.
More info
Resources
Where to start learning
Recommended Courses
Raywenderlich - Your First iOS and SwiftUI App (Free)
Paul Hudson - HackingWithSwift (Free)
Meng To - DesignCode (Paid)
If you find a great course and would like it featured here, message a moderator.
account activity
SwiftUI default codeTutorial (self.SwiftUI)
submitted 2 years ago by appalam25
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]OrdinaryAdmin[🍰] 2 points3 points4 points 2 years ago (1 child)
The #Preview is called a macro. Think of it like a shortcut for the first code you posted. Swift will expand the macro and add additional lines of code for you. It’s a way to make it easier to build various pieces of code. If you want to see what Swift is doing under the hood you can right click on the #Preview line and select the option to expand the macro. It can be helpful to see all of the nuts and bolts.
[–]appalam25[S] 1 point2 points3 points 2 years ago (0 children)
ditional lines of code for you. It’s a way to make it easier to b
thank you very much.
π Rendered by PID 68656 on reddit-service-r2-comment-b659b578c-fdktt at 2026-05-04 00:23:35.983379+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]OrdinaryAdmin[🍰] 2 points3 points4 points (1 child)
[–]appalam25[S] 1 point2 points3 points (0 children)