Hey
I’m creating a calculator as an iphone app.
I have a UITextfield where the user enters his input
EX: 3+4-48*23+43
and i have a UILabel that will display the result after pressing on “calculate button”.
CODE:
float result;
NSString *textFieldValue= self.myTextField.text;
// i need a line of code to calculate the values in the string and convert it to floatValue
result=[textFieldValue floatValue];
[self.myLabel.text stringWithFormat:@"%f",result];
In case you are looking for ready made open source resources start here: http://apptree.net/parser.htm