Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7947999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:35:42+00:00 2026-06-04T01:35:42+00:00

I have a ViewController that shows a UIMapKit piece. All of the MapKit pieces

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:35:44+00:00Added an answer on June 4, 2026 at 1:35 am

    Yes! You shouldn’t call this directly. Remember, you should be making a call to the superclass’s viewDidLoad which could have unintended consequences. How about switching it around…

    - (void) viewDidLoad
    {
       [super viewDidLoad];
       [self updateMapUI];
    }
    
    -(void) updateMapUI
    {
      NSLog(@"here is my update in updateMapUI");
      //[self initWithCoordinate:self.coordinate locations:self.locations];
      //[self loadView];
    
      // Update your Map here
    
    }
    

    … and please tell me you’re not calling [self initWithCoordinate:self.coordinate locations:self.locations] from within viewDidLoad!!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a view controller with a single UITableView that shows a string
I want to have a ViewController that has a table view on the top
I have an iPad app where I have a view controller that is the
I have one view controller,in that i have 1 UIButton ,when i click on
I have an iPhone app that displays a modal view controller. The modal view
I have a viewController that pops a modal view with a UIWebView. If I
I have a ViewController that includes its own .nib file, I am wanting to
I have a ViewController that has its own NIB. I would like to embed
I have a viewController that autorotates just fine, The problem is that is I
i have more viewcontroller that start from rootviewcontroller. So for example i start with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.