this is a follow up from my question yesterday my .h is
@property (weak, nonatomic) IBOutlet UITextField *initialBudget;
@property (weak, nonatomic) IBOutlet UITextField *expenses;
@property (weak, nonatomic) IBOutlet UITextField *timeSpent;
@property (weak, nonatomic) IBOutlet UITextField *incomePerHour;
my .m is:
- (IBAction)calculateResults:(id)sender {
double budget = [initialBudget.text doubleValue ];
double expense = [expenses.text doubleValue];
double time = [timeSpent.text doubleValue];
double hourlyIncome = (budget - expense)/time;
incomePerHour.text = [NSString stringWithFormat:@"%.2f", hourlyIncome];
}
Ive tried using different methods to keep the text saved in the ViewController, when I close the app the text disappears. Anyone have an idea? Ive only been studying Objective-C since the beginning of the summer so my apologies for the potential newbie questions.