swift - Terminating app due to uncaught exception 'NSUnknownKeyException' -
i'm trying built simple calculator , got exception. has clue?
code:
class viewcontroller: uiviewcontroller { @iboutlet weak var display: uilabel! var userisinthemiddleoftyping = false @ibaction func touchdigit(sender: uibutton) { let digit = sender.currenttitle! if userisinthemiddleoftyping { let textcurrentlyindisplay = display.text! display.text = textcurrentlyindisplay + digit } else { display.text = digit } userisinthemiddleoftyping = true } }
go viewcontroller scene on left -> right click on "view controller" -> check if outlets links each others (if 1 have warning symbol, delete it) -> rebuild projects
Comments
Post a Comment