I have a TabView, and one of my tabs contains a mapView. When I load the tab with the mapView for some reason regionDidChangeAnimated is called twice. I've put break points in every other function and disabled them all from running, so it's literally just pulling up a blank map. Nonetheless, regionDidChangeAnimated is being called twice. Any ideas why that might be?
Here's the code:
SecondViewController.h:
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
@interface SecondViewController : UIViewController<MKMapViewDelegate>
{IBOutlet MKMapView *mapView;}
@end
SecondViewController.m
#import "SecondViewController.h"
@implementation SecondViewController
- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated
{
//[self showTowers];
NSLog(@"regionDidChangeAnimated");
}
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
return self;
}
- (void)dealloc {
[super dealloc];
}