From 6deb44a0aec1c74e5e4f45b5665145799e176a98 Mon Sep 17 00:00:00 2001 From: Wojciech Nagrodzki <278594+wnagrodzki@users.noreply.github.com> Date: Sat, 4 Aug 2018 19:54:36 +0200 Subject: [PATCH] Added "Type vs instance methods" section --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 832a2a6..35c7eb1 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -# iOSProgrammingGuidelines \ No newline at end of file +# iOSProgrammingGuidelines + +## Swift + +### Type vs instance methods + +If a method is independent of instance state it should be declared as type method, preferably by using `static` keyword (or `class` in case when the method is designed to be overridden in a subclass). +> This is to avoid methods giving a false impression that they are dependent on the instance state while in fact they are not.