You're missing the closing brace (}
) on your viewDidLoad
function. Corrected, it should look like this (see the line with the THIS!!!
comment):
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.mapView.delegate = self;
} // <-- THIS!!!
//H+ adding to have scale adjusted
- (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
{
MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(userLocation.coordinate, 800, 800);
[self.mapView setRegion:[self.mapView regionThatFits:region] animated:YES];
}
As a result of the missing brace, the compiler thinks that your mapView:didUpdateUserLocation
function definition is an expression within the viewDidLoad
function, not a function definition. I'm guessing that's probably not what you intended.