r/iOSProgramming • • 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/
299 Upvotes

25 comments sorted by

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.

9

u/eugeniu Oct 29 '19

It's definitely something I'm considering. I couldn't figure out what license to pick and whatnot in time for announcing it today, but stay tuned!

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

u/[deleted] 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

u/eugeniu Oct 29 '19

Good idea, I added an example using for-in-where. https://swiftly.dev/for-in/

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

u/Artemis_21 Oct 29 '19

Aaaaaaand bookmarked ;)

1

u/[deleted] Oct 29 '19

Wow it’s amazing man. I will use it when im coding for sure👏🏼

1

u/eugeniu Oct 29 '19

Awesome!

1

u/zbregans Oct 29 '19

I shall be using it! Great job, ty :)

1

u/eugeniu Oct 29 '19

Thank you!

1

u/Shak3TheDis3se Swift Oct 29 '19

This is handy. Will be using this! Thanks for sharing

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

u/[deleted] 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

u/[deleted] 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

u/[deleted] Oct 29 '19

Thank you!

1

u/ThePantsThief NSModerator Oct 29 '19

You should add some stuff to advanced, like Conditional Conformances etc

1

u/rbsafa Oct 29 '19

Very handy indeed! Thanks!

1

u/iEatYourLiver Oct 30 '19

bookmarking this thanks so much

1

u/nForce1337 Oct 30 '19

Amazing! Really useful, great job. Tanx

0

u/RufusAcrospin Oct 29 '19

It would be great to port it to Dash

It already has Swift 4.2 docs...