Couldn't Cast Value of Type UIButton: Swift -
i getting error of cannot cast value of type uibutton in console. thing not uibutton, label
would 1 know why?
looks viewwithtag(2) not label. check if adding button programmatically inside cell , setting tag value 2.
also try avoid forced unwrapped if possible prevent crash
guard let questionlabel = cell.viewwithtag(2) as? uilabel else {return} questionlabel.text = "yourvalue 
Comments
Post a Comment