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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -