I am unable to add init method to the following UIViewController class. I need to write some code in the init method. Do i have to write init(coder) method? Even when I add
I think you have to add
required init(coder aDecoder: NSCoder) {
print("init coder")
super.init(coder: aDecoder)
}
or
convenience init() {
self.init()
}
You have to write init too. Don't remove it
var tap: UITapGestureRecognizer?
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
super.init(nibName: nil, bundle: nil)
}
Hope it helps