I entered the following things, but there are some errors shown, which is expected expression in the line after case 0, and use of undeclared identifiers "bundle". Could anyone tell me what the problem is and how to solve it?
Thank you very much.
-(IBAction) segmentedControlIndexChanged{
switch (self.segmentedControl.selectedSegmentIndex) {
case 0:
NSBundle *bundle = [[NSBundle alloc ]init];
NSString *path = [bundle pathForResource:@"HK" ofType:@"plist"];
placeArray = [[NSArray alloc] initWithContentsOfFile:path];
break;
case 1:
NSLog(@"case 1");
break;
case 2:
NSLog(@"case 2");
break;
case 3:
NSLog(@"case 3");
break;
case 4:
NSLog(@"case 4");
break;
default:
break;
}
}