ios - How to resolve this error? - Class 'ViewController' has no initializers -
i have created uilabel
programmatically in swift gives me following error :
class 'viewcontroller' has no initializers
code :
class viewcontroller: uiviewcontroller { let lbl_lastname: uilabel! override func viewdidload() { super.viewdidload() lbl_lastname.frame = cgrectmake(10, 230, 300, 21) self.view.addsubview(lbl_lastname) } }
change let lbl_lastname: uilabel!
var lbl_lastname: uilabel!
Comments
Post a Comment