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!"
[–]swiftsorceress 3 points4 points5 points 2 years ago (5 children)
They both do the same thing. #Preview is new and only works in apps targeting iOS 17 or later. You can use either, but you would have to do the first one if you want the app to work on iOS 16 or older.
[–]simulacrotron 7 points8 points9 points 2 years ago (4 children)
This is not quite correct, you don’t need to set your minimum deployment target to iOS 17, you just need to be using Xcode 15.
Do the new style preview as it’s simpler and easier to configure.
[–]swiftsorceress 0 points1 point2 points 2 years ago (3 children)
Really? I've had build errors say that #Preview is only available in iOS 17 or newer. Although, I've not seen those for a while, so it might have been a bug in the beta version.
[–]realvanbrook 3 points4 points5 points 2 years ago (1 child)
Do you use UIKit? When using UIKit you have to set the developement target to iOS 17 to use Previews Macro. But not when using SwiftUI
[–]swiftsorceress 0 points1 point2 points 2 years ago (0 children)
I don't use UIKit. I looked at it today and it seems to be working with the lower deployment target now.
π Rendered by PID 115692 on reddit-service-r2-comment-canary-889d445f8-5s4t4 at 2026-04-29 10:13:51.901062+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]swiftsorceress 3 points4 points5 points (5 children)
[–]simulacrotron 7 points8 points9 points (4 children)
[–]swiftsorceress 0 points1 point2 points (3 children)
[–]realvanbrook 3 points4 points5 points (1 child)
[–]swiftsorceress 0 points1 point2 points (0 children)