I was using a class, MapMultiController, which extends UIViewController, and is instantiated from inside my ListViewController, which also extends UIViewController, like so:
@interface MapMultiController : UIViewController <UINavigationControllerDelegate, UINavigationBarDelegate> {
MKMapView *mapView;
UISegmentedControl *barStyleSegControl;
bool wasUpdated;
}
and then this:
MapMultiController *controller = [[MapMultiController alloc] initWithNibName:@"MapMultiController" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:YES];
[controller release];
This all worked before, but then I commented out the allocation and all that from my ListViewController, and did some other things, and now when I’m trying to put it back in, it says “Unexpected interface name ‘MapMultiController'”, and of course everything after that doesn’t work.
But everything looks correct to me! What’s wrong?
What probably happened is that in the course of your editing, you added some code before that @interface and now the compiler isn’t expecting it where it’s finding it. It’s not that your code is wrong, but that it’s in the wrong place.