Day 1: Difference between keywords static & class in Swift?

Max
Jan 22, 2018

--

Photo by Brett Jordan on Unsplash

static and class keywords can be used in front of method and properties in Swift.

Both of them associate a method to a class, rather than an instance of a class.

class methods can be overridden by the subclasses, but static methods cannot be overridden by the subclasses.

That’s one question, see you tomorrow. If you ❤️ this article please give it a clap👏 and support my work. Also, smash that Follow icon 🟢 to get posts delivered to you on your couch. We are in this together 😇. Cheers!

Psst!👋, want to continue? Go to next article in the series.

--

--

Max
Max

Written by Max

Senior iOS Engineer | Swift | ObjectiveC | SwiftUI | Combine |

No responses yet