mirror of
https://github.com/wnagrodzki/iOSProgrammingGuidelines.git
synced 2025-05-03 17:41:33 +02:00
Added "Type vs instance methods" section
This commit is contained in:
parent
f8c1c6f7e7
commit
6deb44a0ae
1 changed files with 8 additions and 1 deletions
|
@ -1 +1,8 @@
|
|||
# iOSProgrammingGuidelines
|
||||
# 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.
|
||||
|
|
Loading…
Add table
Reference in a new issue