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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:40:54+00:00 2026-06-18T09:40:54+00:00

I have a question regarding window and viewcontroller in iOS. I just have a

  • 0

I have a question regarding window and viewcontroller in iOS. I just have a look at the app delegate of iOS project that I am working on today and found that it is required to have…

UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;

in my app.

Here are the questions:

  1. Does this means that navigationController is the root view controller of my app? NavigationController is a subclass of UIViewController, but its task is only for providing navigation function at the navigation bar, correct?

  2. What is self.window? I think I understand the concept of ‘view’ and ‘viewController’ but I do not quite understand what a ‘window’ is… An iPhone has one screen, but MacPro could have 2 monitors; Are these windows in terms of iOS and OS X?

  • 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-18T09:40:55+00:00Added an answer on June 18, 2026 at 9:40 am
    1. Possibly. self.window.rootViewController will return the root view controller of the window, I presume, in this case, from the storyboard. The fact that this line casts the object returned to a navigation controller doesn’t make it one — it will be whatever it is in the storyboard (the controller with that left arrow that’s not connected to anything else). Assuming that the cast is correct, this allows you to write things like navigationController.topViewController and not have the compiler complain about it. As for the navigation controller’s function, it does provide the function for the navigation bar, but it also shows the view of its content controllers, with its topViewController’s view being the one that you will see at start up.

    2. A window in iOS, is a UIWindow, which is a subclass of UIView, so it’s not the same as a window in OS X. Look at the Overview section of the UIWindow Class Reference for a discussion of what it does.

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

Sidebar

Related Questions

I have a question regarding cross-origin policies. I have a web app that gets
I have a basic question regarding iOS development. I have created view file ViewController.xib.
I have a question regarding window id in xul. I have something like in
I have a question regarding a window style hexadecimal. According to http://support.microsoft.com/kb/111011/en-us , 0x16CF0000
I have question regarding disabling browser caching. I have already found few solutions, and
I have a simple question regarding PHPMyAdmin, and that is, I want to know
So I have an interesting design question regarding an app I'm developing for the
I am new to WPF and have a question regarding dispatcher and Delegate.Invoke .
I have a question that will be found very often. The problem is that
The question that I have is regarding converting the process of reading lines from

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.