MapViewController *mapView = [self.storyboard instantiateViewControllerWithIdentifier:@"MapView"];

(“MapView” is the identifier i set for that scene/view in storyboard)

and i just tested the old way and it works for me:

mapViewController *mapView = [[mapViewController alloc] initWithNibName:@"mapViewController" bundle:[NSBundle mainBundle]];

i can call methods in MapViewController directly, aka

[mapView testMethod];

Advertisements