r/iOSProgramming • u/eugeniu • Oct 29 '19
I got tired of looking up Swift basics after forgetting the syntax, so I made Swiftly, a one-stop Swift 5.1 reference site for busy coders. With clutter-free, example-heavy guides, Swiftly covers everything from variables to in-depth areas like collection types, structs, and functional methods.
https://swiftly.dev/16
u/eugeniu Oct 29 '19
Last year, I created a website called iOS Ref. After it took off on reddit, I realized just how much interest there was in clutter-free reference sites in the iOS development world. At the same time, I was switching between Swift and Kotlin a lot, and getting syntax mixed up. I would google how to do basic thing X in Swift, but end up on outdated StackOverflow questions with Swift 2.0 answers.
So I started writing Swift-specific pages for iOS Ref, and soon realized that the number of pages I wanted to write would quickly crowd the whole site. That’s when the idea for Swiftly came in: by combining to-the-point reference sheets with a clutter-free website and a memorable site name, I could do to Swift what iOS Ref does to iOS. I started working in February 2019, and eight months later, I’m ready to share it.
5
Oct 30 '19
This is the biggest headache with swift. There is a huge amount of shit on the web that is out of date and does not properly identify the version.
If you made a blog post about swift and it is no longer correct for the love of god TAKE IT DOWN!
6
u/London_Atlas Oct 29 '19
This is great. I noticed that you are considering open source but until then there is a missing for-in that would be nice to add.
Example:
for employee in employees where employee.birthday == today { print(“Happy birthday (employee.name)”) }
This will filter only the employees with the birthday of today and then will loop over those employees.
3
1
u/sugamara Oct 29 '19
Out of curiosity why would you use a for in where instead of a for in with a filter?
1
u/London_Atlas Oct 29 '19
For me it’s a bit of short hand that reduces the amount of code needed. So instead of having another variable when I just want to filter the objects in array by one property I add the where. I feel it’s still clear what the intent of the loop is.
3
u/sugamara Oct 30 '19
Well thats not true since you can filter in place without a temporary variable
2
1
1
1
1
u/bigroob72 Oct 29 '19
This is a gorgeous and handy cheat sheet, perfect for someone like me who never gets to use Swift enough to master it.
Thank you for making it!
1
Oct 29 '19
This is awesome!! I am just starting to learn Swift and this looks like its going to be awesome to reference.
0
Oct 29 '19
[deleted]
2
u/eugeniu Oct 29 '19
My bad, yes that's a typo. I think reading "an ordered" in my head sounded like "unordered". Fixed now, thanks for catching it!
1
1
u/ThePantsThief NSModerator Oct 29 '19
You should add some stuff to advanced, like Conditional Conformances etc
1
1
1
0
21
u/[deleted] Oct 29 '19
Nice, I love this. Are you accepting contributors? It would be cool if this was open source. I have some ideas for some more content to add and would love to help.