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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:53:48+00:00 2026-06-10T05:53:48+00:00

Since I hava a parent view controller and a child one, parent view controller

  • 0

Since I hava a parent view controller and a child one,
parent view controller is something like a container controller that apple doc said,
then do

[parentVC addChildViewController:childVC];
childVC.view.frame = SOMEFRAME;

but now childVC has not been seen in the screen;
must I add code below?

[parentVC.view addSubview:childVC.view];//is a must? any code can replace?  

—
At my sight,container is container,when I had added a childVC in,it’s view should add itself,or some method can do that?.

UIWindow has a property of “rootViewController”,when set it,the new view will be added automatically,I think this is what I want.

I need some advices.thanks.

  • 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-10T05:53:50+00:00Added an answer on June 10, 2026 at 5:53 am

    It’s a simple matter of control. Often you want to have a child view controller, but it’s view is a subview of one of your subviews, not simply a subview of the “top level” view property of the container view controller.

    Essentially, the framework chooses to let you decide, and does not enforce that a contained view controller’s view must be a first-generation decedent of it’s parent view controller. It’s completely up to you; the hierarchy of ViewControllers and Views do not need to have perfect generational parity.

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

Sidebar

Related Questions

I hava a JSON Object in my javascript code that is like : {0
Since REST is stateless, each request that comes in has no knowledge of the
I dad left Java since so long as a result now it happens that
Since I'm using Java 1.4.2, this means that I cannot use Java's implementation of
Since I am not getting anywhere with my previous question , I would like
I hava a remote validator setup like so remote: { type: POST, url: /some/url,
Since jars like servlet.jar are usually not downloaded on their own, but rather come
since i'm poor with javascript I would like someone to convert this small function
Since Rails is not multithreaded (yet), it seems like a threaded web framework would
Since the only operations required for a container to be used in a stack

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.