Our student team is currently working on a iphone app and we are stuck on a section of our program where the user can customise how long the timers in our app run for by inputting the value on the flipside view using a UItextfield. We cant figure out how to update these values in the main view controller from the flipside view controller any help would be greatly appreciated we have looked through a lot of examples and nothing seems to work.
//Inside the FlipsideViewController where the user changes the values in a UITextField
- (IBAction)update:(id)sender {
MainViewController *viewController = [[MainViewController alloc]
InitWithNibName:@"MainViewController" bundle:nil];
viewController.ward1Time = [ward1.text intValue];
viewController.ward2Time = [ward2.text intValue];
viewController.ward3Time = [ward3.text intValue];
viewController.ward4Time = [ward4.text intValue];
}
//Inside the MainViewController where we want to take the input the user put in in the FlipsideViewController
- (IBAction)newGreenWard:(id)sender {
[myWardObject setCurrentTime:ward1Time];
}