I've been adding MapView into my ViewController. Code as below:
MapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
MKCoordinateRegion region;
region.center.latitude = [[myStore.Location objectAtIndex:0] doubleValue];
region.center.longitude = [[myStore.Location objectAtIndex:1] doubleValue];
MKCoordinateSpan span;
span.latitudeDelta = .0015;
span.longitudeDelta = .0015;
region.span = span;
[MapView setRegion:region animated:YES];
myStore.Location
is an array with coordinates. XCode just crashes the app and return the error at [MapView setRegion:region animated:YES];
which i assume that it cannot init the mapview, can anyone help?