When I write a new method signature in Swift, I follow the pattern:
func methodName(varName1: VarType1, varName2: VarType2, ...) {
Looking at some of the required protocol initializers, I have found a mystery third word in the signature. For example:
required init?(coder aDecoder: NSCoder) {
I understand that aDecoder
is the param name and NSCoder
is the type. But what on Earth is coder
? For the love of all that's good, why does Swift have to make simple things so confusing?