Swift 4.0 Quick Reference Cheat Sheet
Introduction I've gone through Swift twice now, but the syntax still slips away, which means I haven't been practicing enough. To help myself get back into the Swift mindset quickly during practice sessions, I put together this Swift Quick Reference Cheat Sheet based on 's Swift 2.0 Cheat Sheet and Quick Reference. This won't cover detailed usage — there are plenty of resources for that already. Update: A few changes for Swift 4.0 are included. Let's run through them one by one. Class Implementation Methods Creating and Using an Instance (Object) Enumerations Variable Declarations Forced Unwrapping Implicitly Unwrapped Optionals Variable Types - Int 1, 2, 500, 10000 - Float and Double 1.5, 3.14, 578.234 - Bool true, false - String "ibloodline", "TonyHan", "playground" - ClassName UIView, UIButton, etc Control Flow String Examples Array Examples Dictionary Examples