<分区>
我有一个派生自 UIView 的类,但我初始化它时总是显示错误“Property 'self.title' not initialized at super.init call in swift”
这是我的代码
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
}
}