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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:32:09+00:00 2026-06-04T05:32:09+00:00

Using Xcode 4.3.2, starting a brand new Single View App, in ViewController’s – (void)viewDidLoad

  • 0

Using Xcode 4.3.2, starting a brand new Single View App, in ViewController’s

- (void)viewDidLoad
{
    // ...

    UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
    NSLog(@"How many subviews %i", window.subviews.count);
}

The count is actually 0… if I print out the number in a tap event handler, then I do see 1, which is the main view of the app. So I wonder how come in viewDidLoad, [subviews count] is 0 and is there an init or begin method like viewDidLoad where it would print 1 already (no need to print it in the tap event handler).

  • 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-04T05:32:12+00:00Added an answer on June 4, 2026 at 5:32 am

    Try to NSLog the count of subviews in – (void)viewDidAppear:(BOOL)animated

    viewDidLoad
    Called after the controller’s view is loaded into memory.
    viewDidAppear:
    Notifies the view controller that its view was added to a view hierarchy.

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

Sidebar

Related Questions

Using the basic starting app from XCode for a navigation based application, I'm trying
starting a new project and want to try using the storyboard feature of xcode
I've recently began using C++ with XCode and I'm starting to miss the integrated
Currently using Xcode 4.2 and I have two view controllers (1 and 2). I
I'm using xcode and I was wondering if there was a way to view
Just starting out with an iPhone application using xcode 4.2. I understand that it
I'm using XCode 4.2, and I'm struggling with how to create a Single or
I am just starting in my iOS development using xCode 4.2 and discovered storyboards.
I'm starting a new xCode project. I'm porting in some code from my last
I'm somewhat familiar with Cocoa, Objective-C and iPhone Development using Xcode. I'm starting to

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.