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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:52:50+00:00 2026-05-31T07:52:50+00:00

I have two UIViewControllers which I sometimes need to show at the same time.

  • 0

I have two UIViewControllers which I sometimes need to show at the same time. Imagine ViewController A only has one button and is otherwise transparent. Once I touch the button I would like ViewController B (which is green) to fade in and do other custom animations, but ViewController A (and the button) needs to be still shown on top of B. Once the fade/animation etc. are over, only ViewController B (green) is visible.

My questions:

1) What is the best setup? UINavigationController with hidden NavBar doesn’t make much sense. TabBarController with hidden TabBar strikes me as equally odd as I don’t need the TabBar.
2) I’m a bit confused about views and windows. The window is init’ed in my AppDelegate and then I would add a RootViewController:

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[ViewController alloc] init];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];

If I want to have two ViewController’s views on top of each other as described above, would I need to add the view of ViewController B (the green one) to ViewController A (the one with the button)? Do I need to swap the rootViewControllers?

Ideally, I don’t want to take care of all the ViewDidAppear’s of VC A and B, so I guess UINavigationController/TabBar would not be a bad idea after all, if I could customise the transitions between Controllers.


Edit:

I really need two different VCs as I would do more complex things than just display a button, like having a scrollview in VC A and another scrollview in VC B. I don’t want to have two scrollviews (or tableViews etc.) in one VC as this gets messy.

  • 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-31T07:52:51+00:00Added an answer on May 31, 2026 at 7:52 am

    The best way is to have only one view controller. View A will just sit on top of B until you fade it out.

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

Sidebar

Related Questions

I have an app which has a UINavigationController, which has a couple of UIViewControllers.
I'd like to have a UIViewController which has an Add and a Trash button
I have a dilemma, I have two UIPickerViews which show when two distinct views
I have two text fields in which numbers are inputed as strings. I need
I have created two viewController classes such that one is superclass of another.i have
I have a uiviewcontroller with two properties: trackName and playerObject. PlayerObject also has a
I have two arrays of System.Data.DataRow objects which I want to compare. The rows
I have two identical tables and need to copy rows from table to another.
I have two classes, and want to include a static instance of one class
I have two threads, one needs to poll a bunch of separate static resources

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.