I have a class derived from UIView, but I always initialized it, showing that the error says: "The property" self.title "is not initialized when super.init was called in swift"
Here is my code
class A: UIView
{
var title : String
var recordUrl : String
var content : String
required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") }
init(frame : CGRect ,title : String, recordUrl : String , content : String)
{
super.init(frame: frame)
self.title = title
self.recordUrl = recordUrl
self.content = content
}
}
source
share