ios - How to Load a MKMapView in Another View Controller -


as title states, trying load mkmapview in separate view controller , perform push segue (from firstviewcontroller mapviewcontroller) when done. here code initializing mapviewcontroller:

//initiate map view controller uistoryboard *storyboard = [uistoryboard storyboardwithname:@"main_iphone" bundle:[nsbundle mainbundle]];  mapviewcontroller *viewcontroller = [storyboard instantiateviewcontrollerwithidentifier:@"mapviewcontroller"]; viewcontroller.mapdelegate = self;  //force -viewdidload called [viewcontroller view]; 

this works fine, , -viewdidload called. set mkmapview , set delegate self. firstviewcontroller triggers segue second view controller when delegate method called mapviewcontroller:

//push map view controller if(self.navigationcontroller){     [self.navigationcontroller pushviewcontroller:mapcontroller animated:yes]; } 

the problem when wait until mkmapview's delegate method -mapviewwillstartloadingmap call callback push segue never initiated. have tried force mkmapview load via [mapview setneedsdisplay], produces no results.

how can force mkmapview load in different view controller?


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -