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];
}
}
привет,
я используюнавигационный контроллер + приложение контроллера панели вкладок.который может перейти от PageB (EditLocation) обратно к PageA (FirstViewCOntroller), на странице B есть пользовательский UIAlert, когда пользовательская вкладка Ok, он вернется к PageA, где метка (местоположение) будет обновлена с адресом, полученным из объекта местоположения.
однако произошла ошибка и произошел сбой моей программы.
Вот проблема, показанная в консоли:
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'
, пожалуйста, помогите мне решить эту проблему!заранее спасибо!Я все еще новичок в цели C, так что я не могу выбирать слова и язык.