这是我的代码
#import "MasterViewController.h"
#import "DiseaseResultsViewController.h"
@interface MasterViewController ()
@end
@implementation MasterViewController
@synthesize symptomTextField;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"searchFunctionSegue"])
{
if ([self.symptomTextField.text length])
{
DiseaseResultsViewController *resultsViewController = [segue destinationViewController];
resultsViewController.symptomSearchString = self.symptomTextField.text;
}
}
}
@end
我在“if ([self.symptomTextField.text length]) 行上收到“Objective-C 方法的预期选择器”错误
以及“DiseaseResultsViewController *resultsViewController = [segue destinationViewController]”行下方的“预期方法主体”和“缺少@end”错误
而且我已经检查了我所有导入的文件的@end 是否正确。
有任何想法吗?