Hey,
I'm relatively new at programming and am able to do something as trivial as returning a sum of two variables etc in C, but I'm trying to discover how I would do this using Objective-C.
I am programming this for the iPhone.
What I want to do is have two labels where once a single button is pressed, the two values from two textfields are transferred to two labels. I can do this with ease. The trouble I'm having comes from having another button calculate the sum of the values in the two labels. How would I go about doing this? I don't have any example code but if you would like I can add some later. I'm just looking for a rough idea of how to grab the strings and calculate the sum. I may be overlooking something but I can't ever get it to work.
Any help would be appreciated
Thanks!
I'm relatively new at programming and am able to do something as trivial as returning a sum of two variables etc in C, but I'm trying to discover how I would do this using Objective-C.
I am programming this for the iPhone.
What I want to do is have two labels where once a single button is pressed, the two values from two textfields are transferred to two labels. I can do this with ease. The trouble I'm having comes from having another button calculate the sum of the values in the two labels. How would I go about doing this? I don't have any example code but if you would like I can add some later. I'm just looking for a rough idea of how to grab the strings and calculate the sum. I may be overlooking something but I can't ever get it to work.
Any help would be appreciated
Thanks!