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

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -