ios - uitextfield is not convertible to uint8 -
im trying button output numbers onto textfield keep getting error
this code, amountoutput 1 error
@ibaction func output(sender: anyobject) { yieldoutput.text = string (format:"%.2f", yield[1] ) amountoutput.text = double (typeamount * (yieldoutput / 100)) + unit }
yieldoutput
in code isn't number, it's text field. means use value in it, need transform number or use variable holds value. in case, yield[1]
variable use set value yieldoutput
. do:
amountoutput.text = double (typeamount * (yield[1] / 100)) + unit
Comments
Post a Comment