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

  • SEARCH
  • Home
  • 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 9008013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:50:32+00:00 2026-06-16T01:50:32+00:00

Having only used storyords to subclass a navigation controller before I cant find any

  • 0

Having only used storyords to subclass a navigation controller before I cant find any tutorial on how to do this for xibs.

How do I add a naviagtion controller to a certain xib so I can subclass it? Then I can override the rotation for my view. The part im stuck on is how does the view controller know about the navigation controller? In storyboards I would manually hook it up to my view controller. I just cant work it out with xibs?

Ive added a navigation controller next to my views xib…now I need some advice from here.

Also I’ve created iPad views from my original iPhone xibs. When I drag the nav controller from IB its still in the iPhone screen size?

  • 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-16T01:50:33+00:00Added an answer on June 16, 2026 at 1:50 am

    You don’t need to set a UINavigationController in a xib file the same way you would with storyboards, as a xib only represents one screen. The normal thing to would be alloc/init a UINavigationController, and a UIViewController, and set the view controller as the root of the navigation controller before you display it. This can be done in the App Delegate if you want you whole app wrapped in a navigation controller form the start.

    In the app delegate in a non-storyboard app you would want something like this

    self.navigation = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]];
    
    [self.window makeKeyAndVisible];
    
    self.window.rootViewController = self.navigation;
    

    Where self.navigation is a UINavigationController property or iVar belonging to the App Delegate. If you want to set up the view controller properly in the xib, select the root view in the xib and open the attributes inspector (RHS, the one that looks like a small shield) and choose ‘Navigation Bar’ in the ‘Top Bar’ drop down menu. This will display a navigation controller top bar in xib so you can position the other views accordingly.

    EDIT

    That’s not entirely correct, you can create the navigation controller in a xib file, but I’ve always considered it more hassle than it worth, as there is very few visual elements to it, and they can be set in code very easily.

    More info in this tutorial here

    http://www.iosdevnotes.com/2011/03/uinavigationcontroller-tutorial/

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

Sidebar

Related Questions

AKA - What's this obsession with pointers? Having only really used modern, object oriented
Is an outer join only used for analysis by the developer? I'm having trouble
Having until now only used PHP's gd image library to resize, crop and greyscale
I have used Spring before but I am no expert and only used it
So I'm a newbie to Rails who's only used SQLite3 before, and I'm struggling
How can I calculate the date having only the week number and day of
I want many values to be simultaneously inserted in my table having only 2
I want to have the look of UITableViewCellStyleValue1 but instead of just only having
Im having problems with displaying ONLY some elements ONLY on print page. For example
im having a gridview in only page and on clicking a button column field

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.