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

  • Home
  • SEARCH
  • 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 4610772
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:10:42+00:00 2026-05-22T01:10:42+00:00

I have a Navigation based application, in which I open a subview for the

  • 0

I have a Navigation based application, in which I open a subview for the user to login. Once the user has logged in I’m hiding the view, from inside the subview using

[self.view removeFromSuperview];

However I want to also refresh the data in the RootViewController. From what I understand I need to do the refresh in the viewWillAppear of the RootViewController. How do I call this from inside the subview?

My guess is that its something like this

[rootViewController viewWillAppear];

But obviously rootViewController is not available in the subview.

  • 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-05-22T01:10:43+00:00Added an answer on May 22, 2026 at 1:10 am

    viewWillAppear is a method that is called by the controller lifecycle. You should not call it this explicitly, you should override it in your class to perform specific actions regarding you view appearance.

    What you should have done, now I am guessing here how your app is based on what you asked, Is to load you login using a modal presentaion, instead of just opening a subview for it.

    You could do it using something like this in you controller

    LoginController *ctrl = [[LoginController alloc] init];
    [self presentModalViewController:ctrl animated: YES];
    [ctrl release];
    

    The good thing about doing it is that, after you dismiss you login controller and the rootViewController is shown again, it will cause your controller viewWillAppear method to be called again (this time you can refresh your view as desired), and your app will be more like the good practices described in Apple’s View Controller Programming Guide for iOS

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

Sidebar

Related Questions

I have a navigation based application which also needs to have a view always
I have a navigation based application which I'm trying to add a unique UIToolbar
I have a navigation-based application in which I would like just one of the
Hey. I have a Navigation-controller-based application with a number of Viewcontrollers in it which
I have a login.jsp page which contains a login form. Once logged in the
I have a navigation view with a cell that has something as simple as
I have a navigation-based application with 2 UIViewControllers (controller-2 is pushed onto controller-1 when
I have this problem, I've got a navigation-based application, and on the one of
I have a page which work like a navigation and a iframe in this
I'm currently trying to create a navigation based application, pushing views to change the

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.