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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:19:14+00:00 2026-05-23T09:19:14+00:00

Ok, I recognize that I have a complete mess in my mind. Really, the

  • 0

Ok, I recognize that I have a complete mess in my mind.

Really, the objective is very simple. I have a little subview inside one of my views (I’ve added it in Interface Builder). I’m trying to insert inside a little subview that automatically resizes herself to occupy the exact space of his parent view.

Controller *c = [[Controller alloc] initWithNibName:nil bundle:nil];
self.navigationController = [[UINavigationController alloc] initWithRootViewController:c];
[self.containerView addSubview:self.navigationController.view];
[c release]; 

Controller class contains an UIImageView pretty big. But I’ve set the properties of the view and the image to ‘scale to fill’ and size itself properly. However, the image automatically exceeds the area of the view showing bigger and occupying all the window.

Ideas? Thanks a lot!

Additional:

After applying meggar’s method I have an strange behaviour. The container view is in position 277,176 with a dimensions of 214w,204h. The inserted view is appearing with the same dimensions but translated 100px (aprox.) to the right.

What kind of effect can be causing it?

  • 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-23T09:19:15+00:00Added an answer on May 23, 2026 at 9:19 am

    setting the view’s frame equal to its superview’s frame should do the trick, something like:

    UIView* parentView = self.navigationController.view.superview;
    CGRect myFrame = CGRectMake(0,0,parentView.frame.size.width,parentView.frame.size.height); 
    
    [self.navigationController.view setFrame:parentView.myFrame ];
    
    [self.containerView addSubview:self.navigationController.view];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking to have windows recognize that certain folders are associated to my application
I have to ask this, because: The only thing I recognize is, that if
I have 2 forms. The first one is an async post that populates the
I have long recognized that any set of whitespace in an HTML file will
I have looked over the Repository pattern and I recognized some ideas that I
What should be the best way to recognize that a number is connected to
I asked a similar question yesterday, but recognize that i need to rephase it
In college I've had numerous design and UML oriented courses, and I recognize that
I was trying to create an IFormatProvider implementation that would recognize custom format strings
1) How can the processor recognize the device requesting the interrupt? 2) Given that

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.