DEV Community

Cover image for Two weeks since I started studying Swift and that what I learned
Rossano D'Angelo
Rossano D'Angelo

Posted on • Updated on

Two weeks since I started studying Swift and that what I learned

It's been an intense two weeks and I did my best to dedicate at least one hour a day to the study of Swift.

Once I assimilated the basics of the language, I started learning more interesting things like functions, closures, struct and classes.

Having studied Java back at the University, I found very familiar how functions and classes are made in Swift except for a couple of things like mutating functions and lazy methods. I actually don't know if Java supports something like these. If it does, I never used them before.

I also found interesting the differences between struct and class. Basically, a struct is a constant so it's not so useful to be used to manipulate objects. I'd use the class instead, which brings all the advantages of the class inheritance, methods overriding, mutability and restricted access to the private attributes.

As usual, I keep pushing all my work on GitHub

Swift Playground

I am posting my progresses and my thoughts on DEV

  • Variables
  • Strings and integers
  • Multi-line strings
  • Doubles and Booleans
  • String interpolation
  • Constants
  • Type annotations
  • Arrays
  • Sets
  • Tuples
  • Dictionaries
  • Creating empty collections
  • Enumerations
  • Arithmetic operations
  • Operator overloading
  • Compound assignment operators
  • Comparison operators
  • Conditions
  • Ternary operator
  • Switch statement
  • Loops - for, while, repeat, break, continue
  • Functions
  • Closures
  • struct
  • Computed properties
  • Property observers
  • Methods
  • Mutating methods
  • self
  • Lazy properties with lazy
  • static
  • private
  • Classes
  • Differences between class and struct
  • Class inheritance
  • Overriding methods
  • Mutability - class vs struct
  • Protocols
  • Handling nil values
  • Optionals values with ?
  • Project1 - Getting started with XCode and building a simple app to display some images
  • Project1 - Adding title to UITableViewController and to UIViewController
  • Project1 - Challenge
    • UITableViewController items font bigger
    • Sort images by name
    • Replace image name with Picture X of Y in the UITableViewController
  • Project2
    • Built flags quiz
    • Challenge
  • Project3
    • UIBarButtonItem
    • UIActivityViewController
    • TODO…

I've got some catching up to do to stay on track with the 100 days challenge 😄 🚀

Discussion (0)