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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:45:30+00:00 2026-05-26T02:45:30+00:00

I have been reading stackOverflow answers for this question for hours. Please help me.

  • 0

I have been reading stackOverflow answers for this question for hours. Please help me.

I am displaying a view using addSubview. All of my UIView objects are loaded via xib files. The hierarchy is MainWindow.xib -> View1.xib -> View2.xib. Each has a controller, which loads the xibs via initWithNibName: bundle:. Each View in the hierarchy has the Autoresize Subviews property checked in IB. Each one has their Autosizing options checked as well. (a.k.a. Little red arrows.)

View2 is added as a subview to View1, using addSubview, when a button on View1 is clicked. This works fine on the iPhone.

I am now making my app work w/ the iPad. All my other views work fine and resize correctly. But View2 does not. Is this because it doesn’t get added to View1 until after it calls the resize functions? If so, how do I trigger the autoresize functionality? What am I missing?

I am sorry if this is not detailed enough. I’d be happy to respond to debugging questions as well. After two days of searching, I still simply feel a little lost.

  • 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-26T02:45:31+00:00Added an answer on May 26, 2026 at 2:45 am

    Where is the code that adds View2 to View1? You probably want to do something like

    -(void)actionButtonPressed:(id)sender withEvent:(UIEvent*)e {
      self.vc2 = [[[ViewController2 alloc] initWithNibName:...] autorelease];
      vc2.view.frame = self.view.bounds;
      [self.view addSubview:vc2.view];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading StackOverflow for a while and now I have a question
I have been reading about collision detection in games on stackoverflow and other sites.
I have been reading up on this, and it seems that if you use
i have been reading this interesting article which is increasing my every growing confusion
I have been reading through lots of Q&A everywhere and these stackoverflow posts seem
I need help remembering what book I read this from, It might have been
I have been reading about this but I have to do some thing. I
This is my first time posting on Stackoverflow, but I've been reading through many
This question has probably been the most covered question in all of DotNetNuke's lifetime
I have been reading a LOT of google posts and StackOverflow questions about how

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.