ios - Pass self as argument within init method in Swift 1.2 -
the following class has ' let ' property declared implicitly unwrapped variable. worked xcode 6.2: class subview: uiview { let pandgesturerecognizer: uipangesturerecognizer! required init(coder adecoder: nscoder) { super.init(coder: adecoder) self.pandgesturerecognizer = uipangesturerecognizer(target: self, action: "panaction:") } func panaction(gesture: uipangesturerecognizer) { // ... } } after updating xcode 6.3 (with swift 1.2), following compilation errors occur: property 'self.pangesturerecognizer' not initialized @ super.init call immutable value 'self.pangesturerecognizer' may initialized once moving following line before super.init call: self.pandgesturerecognizer = uipangesturerecognizer(target: self, action: "panaction:") gives following error: 'self' used before super.init call the property ' pangesturerecognizer ' requires no mutation, therefore h...