FirstViewController.h
#import "EditLocation.h"
FirstViewController.m
@synthesize currentLocationLabel;
- (IBAction) updateCurrentLocationLabel:(NSString *) location {
NSLog(@"CLICK");
currentLocationLabel.text = [NSString stringWithFormat:@"%@", location];
}
EditLocation.h
#import "FirstViewController.h"
EditLocation.m
- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0)
{
[self.navigationController updateCurrentLocationLabel: location];
[self.navigationController popViewControllerAnimated:YES];
}
}
hi there,
im using a navigation controller + tab bar controller application. which is able to move from PageB(EditLocation) back to PageA(FirstViewCOntroller), there is a UIAlert at PageB when user tab Ok, it will go back to PageA where the label(location) will be updated with the address gotten from location object.
however there is an error and cause my program to crash.
here is the problem shown in the console :
2011-08-03 01:33:23.276 Tab Bar Application[5087:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UINavigationController updateCurrentLocationLabel:]: unrecognized selector sent to instance 0x5a37b70'
please help me solve this problem! thanks in advance! im still a newbie in objective C, so bare with my choice of words and language used.