objective c - Storing and retrieving a value and updating it -
I'm making an iPhone app with the objective-c. I have a math problem, I need help So I need to keep it simple. Any sample code will be appreciated.
This is the problem I want to display
The person A (UItext input) earns $ xa day (UITE input) and the total remains $ Y (Uilabel). Person B (UItext input) earns $ xa day (UIText input) and keeps total $ y. Individual C (UItext input) earns $ xa days (UIText input) and total $ y Grand Total = $ z I do not understand how to store the total, retrieve it, then update the total value
One approach is to create an array of objects of the person, which are names, earnings and savings properties. Then use the collection operator to calculate the "grand total"
NSNumber * grandototal = [People value ForKeyPath: @ "@ sum.Savings"]; [Grandtotal label settext: [grand coat string value]];
Comments
Post a Comment