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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:43:10+00:00 2026-05-26T04:43:10+00:00

I am developing an application in which on my button click I have to

  • 0

I am developing an application in which on my button click I have to show one class controller view as a sub view.
I have added my view Controller as sub view and it works fine.

TempViewControlleriPad *tempScreen=[[TempViewControlleriPad alloc]initWithNibName:@"TempViewControlleriPad" bundle:nil];
[self.view addSubview:tempScreen.view];
[tempScreen viewWillAppear:NO];

Now when I rotate my device orientation then my sub view did not respond to that orientation means that my sub view did not rotate.

TempViewControlleriPad orientation method:-


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    if(interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){
             [[NSBundle mainBundle] loadNibNamed:@"TempViewControlleriPad" owner:self options:nil];
    }
    else if(interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft){
         [[NSBundle mainBundle] loadNibNamed:@"TempViewControlleriPadLandscape" owner:self options:nil];
    }

    return YES;

}

Please suggest me what should I do to solve this orientation problem.

Thanks in advance.

  • 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-26T04:43:11+00:00Added an answer on May 26, 2026 at 4:43 am

    Is the controller of the subview a UIViewController?
    You’re not supposed to embed a view controller in another one. From the Apple docs:

    You should not use multiple custom view controllers to manage
    different portions of the same view hierarchy. Similarly, you should
    not use a single custom view controller object to manage multiple
    screens worth of content.
    http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/AboutViewControllers/AboutViewControllers.html#//apple_ref/doc/uid/TP40007457-CH112-SW12

    You could set the autoresize mask on the subviews.

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

Sidebar

Related Questions

I am developing a application in which if i click a button it woul
I am developing a soundboard application which extends ListActivity. I have a play button
I am developing an iPhone Application in which i have provide Pin Annotation button
I'm developing an application which currently have hundreds of objects created. Is it possible
I am developing an iphone application in which i have to send a mail
I am developing an application in which I do multithreading. One of my worker
I am developing an android application in which i have to implement custom rating
i am developing an application in which i have a logout option at all
I am developing an android application in which I have passed a string from
I'm developing an application which will support multiple screens. I have created three layouts

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.