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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:06:26+00:00 2026-05-24T16:06:26+00:00

I have the following question: I got some code that gets called when an

  • 0

I have the following question:

I got some code that gets called when an user logs in. The code has to call another view controller and has to show another view. To show to new view, i got the following code:

[scrollView removeFromSuperview];

Form1 *formcontroller1 = [[Form1 alloc] initWithNibName:@"Form1" bundle:[NSBundle     mainBundle]];

[self.view setAutoresizesSubviews:YES];

[self.view addSubview:formcontroller1.view];

[scrollView release];

The problem is, when the other view is loaded and i rotate the device, the view of the new nib is not resizing correctly.

EDIT:

I wasn’t dismissing the current viewcontroller so some properties remained. What i did is this:

[scrollView removeFromSuperview];

[self dismissModalViewControllerAnimated:YES];

Form1 *formcontroller = [[Form1 alloc] init];

[self presentModalViewController:formcontroller animated:YES];

[scrollView release];
  • 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-24T16:06:27+00:00Added an answer on May 24, 2026 at 4:06 pm

    You should check the autoresizing properties of your nib view in Interface Builder…

    It should look like in the picture:

    enter image description here

    The middle arrows are dimmed, but still active. This is where autoresizing is set. You could try and set that property programmatically by assigning in your controller viewDidLoad method:

    self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    

    You should also ensure that both your view and its superviewhave the "autoresize subviews" button checked (in the first pane of the inspector in IB)

    OLD ANSWER:

    How is Form1 – shouldAutorotateToInterfaceOrientation: defined?

    By default, this method returns YES for the UIInterfaceOrientationPortrait orientation only. If your view controller supports additional orientations, override this method and return YES for all orientations it supports.

    Your implementation of this method should simply return YES or NO based on the value in the interfaceOrientation parameter. Do not attempt to get the value of the interfaceOrientation property or check the orientation value reported by the UIDevice class. Your view controller is either capable of supporting a given orientation or it is not.

    E.g.:

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {   
       return YES;
    }
    

    to support all orientations.

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

Sidebar

Related Questions

Following on from this question I now have code that can attach to a
Following the directions at this question , I have some code running to extract
Dear g++ hackers, I have the following question. When some data of an object
My question is the following. I have xml that is versioned by a namespace.
I got into another philosophical question regarding Java. It's about the following scenario: You
I've got some Workflow Foundation 4 ActivityDesigners that I'd like to have interact with
I currently have the following: class Question < ActiveRecord::Base belongs_to :product belongs_to :user belongs_to
I'm writing a small webapp in Grails and I have the following question regarding
I have a question about using os.execvp in Python. I have the following bit
My question is related to the command pattern, where we have the following abstraction

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.