I have a ViewController that shows a UIMapKit piece. All of the MapKit pieces are handled in viewDidLoad. I also have a Settings View Controller that can change the radius of the loaded Map.
For the modal view I have set up a delegate to be called on the LocationsMapViewController. I am currently doing this by:
-(void) updateMapUI
{
NSLog(@"here is my update in updateMapUI");
//[self initWithCoordinate:self.coordinate locations:self.locations];
//[self loadView];
[self viewDidLoad];
}
But this seems kinda inelegant. Is there a better, more elegant way to do this? Or is this ok? My first time implementing something like this and just want some feedback.
thx
Yes! You shouldn’t call this directly. Remember, you should be making a call to the superclass’s
viewDidLoadwhich could have unintended consequences. How about switching it around…… and please tell me you’re not calling
[self initWithCoordinate:self.coordinate locations:self.locations]from withinviewDidLoad!!!