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 8295895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:46:07+00:00 2026-06-08T14:46:07+00:00

I need to load some data into a view every time it is shown.

  • 0

I need to load some data into a view every time it is shown. The data changes, each time time view is shown, so I figure I can load the data in the method viewDidAppear. Unfortunately, I’ve found that viewDidAppear is not called each time the view is displayed.

The code that displays the view from any other view is….

[self clearView];
[self.view insertSubview:fifthViewController.view atIndex:4];

So I figured I could change it to the following to run viewDidAppear…

[[self.view insertSubview:fifthViewController.view atIndex: 4 viewDidAppear:YES];

Unfortunaely, this causes an error “bad receiver type ‘void’

What do I need to do to insert the subview and also call viewDidAppear?

  • 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-08T14:46:08+00:00Added an answer on June 8, 2026 at 2:46 pm

    Thank you for the assistance with this question.
    I have settled on the addition of a viewDidAppear in the method that inserts the subview.

    Below is the code that is working for me at this time.

    In the .m file of the highest level view controller, the following code sets up the viewDidAppear call and then inserts the fifth subview.

    -(IBAction) loadFifthView:(id)sender
    {
    
    [fifthViewController viewDidAppear:YES];  // sets up viewDidAppear
    
    
    [self clearView];
    [self.view insertSubview:fifthViewController.view atIndex:4];
    
    
    }
    

    With the above code snippet in place, the following code snippet, located in the .m file of the fifth view controller reports that it is working.

    - (void)viewDidAppear:(BOOL)animated
    {
    
    NSLog(@" xxxxxxxxxxxxxxxx  inside viewDidAppear ");
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to load data into my treestore. My ajax request give me XML
I am trying to load some data from a text file into mysql. I
I need to load some resource from my DLL (i need to load them
Two Delphi programs need to load foo.dll, which contains some code that injects a
I need to call some jQuery .load() function from flash. i Use this: import
I need some guidance around which approach to use to load binary files from
I need to load a Model in a component to save the Data of
I need to Load RVM into a shell session as a function , so
I need to load a lot of data fetched from a mysql db in
I need to send some other data, ideally wrapped in a JSON object, down

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.