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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:26:41+00:00 2026-06-17T21:26:41+00:00

I have been following a solution on this question in order to display a

  • 0

I have been following a solution on this question in order to display a view with a transparent background. The issue that I’m having is once the modal view controller has been displayed, the underlying view doesn’t get rotated anymore.

For example if A is my view controller, then B is my modal view. The issue is as follows. I currently have my device in portrait and have A displayed. I then present B modally. I then rotate my device and B rotates with it, however A stays as it was.

Please could someone advise on how to handle this rotation so that the underlying view (A) gets rotated too?

  • 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-17T21:26:42+00:00Added an answer on June 17, 2026 at 9:26 pm

    ModalViewController is used to interrupt the current workflow and displaying a new set of views. So when you present modally, here in this case you are presenting B, the current active Viewcontroller is B and not A.

    A ViewController is traditional controller objects in the Model-View-Controller (MVC) design pattern. They also take care of user interface, gesture recognitions,event management(of buttons for example) and the alignment of views in present in them.

    When you presented B, the current viewcontroller changed from A to B and hence when you try to rotate(if the orientation support is provided) the view of B is effected as its the viewcontroller active and it responds to the rotation. Normally we go unnoticed these because the view is opaque. Here in your case the view is transparent and we notice that A has not responded to rotation.

    I tried the above example in iOS6 (from the one you mentioned)

    ViewController2 *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"VC2"];
    vc.view.backgroundColor = [UIColor clearColor];
    self.modalPresentationStyle = UIModalPresentationCurrentContext;
    [self presentViewController:vc animated:YES completion:nil];
    

    here A remained in portrait mode

    When i did this adding the second viewcontroller’s view as a subview, A changed to landscape

    ViewController2 *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"VC2"];
    vc.view.backgroundColor = [UIColor clearColor];
    self.view addSubview:vc.view];
    

    this happend because in the second trial the active viewcontroller was A and not B as B’s view was a subview added to A. Go through Apples’s Document on

    • About ViewController
    • About windows and views
    • Presenting ViewControllers
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been following the answer of this question: How to update existing object
I ask this question as a followup of this question . A solution that
Yes, I know. This question have been already replied in Where to store the
This is kind of a noobish question, but it's one that I've never been
I know this kind of question has been asked before, but the general solution
I've been following the advice in this question. How to add a WiX custom
I was answering this question , to which my solution was the following (I
I know this question has been asked before, however I'm facing a particular issue
I have been following the usage of JavaScript for the past few years, and
I have been following the following post on using multiple ItemTemplates in a ListView

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.