I am trying to retrieve information from a NSDictionary using init. I am receiving the error "Must call a designated initializer of the superclass 'UIViewController" on the super.init() line
Here is my code:
init(dictionary: NSDictionary) {
let title = dictionary["title"] as? String
let poster = dictionary["poster_path"] as! String
let baseUrl = "http://image.tmdb.org/t/p/w500"
let imageUrl = URL(string: baseUrl + poster)
detailsTitle.text = title
detailsImage.setImageWith(imageUrl!)
super.init()
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
I have tried the following:
super.init(coder: )
super.int(coder: aDecoder)
super.init(dictionary: NSDictionary)
super.init(coder: NSCoder)
super.init(coder: aDecoder: NSCoder)
super.init(coder: dictionary: NSDictionary)