swift - I have always "Expected expression after operator" Error -
i new swift , try @ moment program first "hello world app". there error " expected expression after operator". don't have clue whats mistake. here code.
@ibaction func pressmetouched(sender: anyobject) { var namestring = nametextfield.text ! let greetingstring = string(format: "hallo %@", namestring) hellolabel.text = greetingstring }
i hope can me:) in advice.
var namestring = nametextfield.text !
here problem. there shouldn't space between variable's name , !
operator.
this line should this: var namestring = nametextfield.text!
Comments
Post a Comment