I want to create an iOS calculator just using a UITextField. For example; someone can type “6 - 3 x 2” into a UITextField, then click “Finish” or “Go”, etc. Then it will calculate the response and display it in the UIAlertView.
So, firstly, I believe that the text of UITextField should be divided into different sections, so '6' '-' '3' '*' '2' will be shared lines from UITextField text input. How would I like to separate the text as above?
How can I use this information to calculate the response and display?
source
share