Could someone please help me with loading maps using animation? I am trying to load a MapView. I want it to zoom to my place once the view loads. I am trying this:
- (void)viewDidAppear {
[super viewDidAppear:TRUE];
MKCoordinateRegion region;
CLLocationCoordinate2D location=secondMap.userLocation.coordinate;
MKCoordinateSpan span;
location.latitude=40.443242;
location.longitude=-79.94305;
region.span=span;
region.center=location;
[secondMap setRegion:region animated:TRUE];}
This code does not seem to work. When I tried, viewDidLoad, the location was already there, which I think is expected.
Thanks.