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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:44:17+00:00 2026-06-02T02:44:17+00:00

I have my rootviewcontroller. in that I load view A. View A containts a

  • 0

I have my rootviewcontroller. in that I load view A.
View A containts a button to load view B. however, I don’t want to add view B as a subview of view A. which happens if I do this:

- (IBAction)loadViewB:(id)sender {

    if (self.viewB == nil) {
        self.viewB = [[NUMViewController alloc] initWithNibName:@"NUMviewController" bundle:Nil];
    } 

    [self.view addSubview:viewB.view];

}

I want to load viewB as a subview of my rootview. so I can animate out viewA before animating in viewB.

but I’m not sure how I must approach this. I’m guessing I need a method in my rootViewController to handle the adding and removing of the subview. I would need to be able to call that method from within my viewA subview.

any ideas? thanks!

  • 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-02T02:44:19+00:00Added an answer on June 2, 2026 at 2:44 am

    try [self.view.superview addSubview:viewB.view]
    But I don’t think this is the best approach as it comes to MVC.
    What can you do is add viewA to self.view and viewB to self.view also.

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

Sidebar

Related Questions

I have this button on the leftside of my UISplitViewController (RootViewController) that has a
Lets say that I have 4 view controllers (call them FirstView,SecondView,ThirdView,FourthView) which are created
I Have a view with a button. I want to press the button and
Ok I have an application that uses tab controller. However before I want the
I have a view controller that I want to be released (and then possibly
I know that if i have rootViewController that start with tabBar i can create
i have more viewcontroller that start from rootviewcontroller. So for example i start with
I was just wondering while programming. I have got a rootViewController which creates an
I have two view controllers name RootViewController and SecondViewController. In the FirstViewController I have
This is a basic question about navigation controller, however, I don't seem to get

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.