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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:23:34+00:00 2026-05-24T14:23:34+00:00

How do I prevent a UIVIewController from loading the xib? I downloaded an XCode

  • 0

How do I prevent a UIVIewController from loading the xib?

I downloaded an XCode (iPhone) project online, and I want to stop the xib file from loading. The view did load method doesn’t have any code in it which deals with xib. How do I force the UIViewController to be loaded from it’s viewDidLoad method instead of the xib?

  • 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-24T14:23:35+00:00Added an answer on May 24, 2026 at 2:23 pm

    Overwrite loadview but DO NOT call [super loadview]. Example:

    -(void)loadView{
        self.view = [UIView new];
        [self.view setBackgroundColor:[UIColor redColor]];
    }
    

    From the Documentation

    loadView

    Creates the view that the controller manages.

    You should never call this method
    directly. The view controller calls this method when the view property
    is requested but is currently nil. If you create your views manually,
    you must override this method and use it to create your views. If you
    use Interface Builder to create your views and initialize the view
    controller—that is, you initialize the view using the
    initWithNibName:bundle: method, set the nibName and nibBundle
    properties directly, or create both your views and view controller in
    Interface Builder—then you must not override this method.

    The default implementation of this method looks for valid nib
    information and uses that information to load the associated nib file.
    If no nib information is specified, the default implementation creates
    a plain UIView object and makes it the main view.

    If you override this method in order to create your views manually,
    you should do so and assign the root view of your hierarchy to the
    view property. (The views you create should be unique instances and
    should not be shared with any other view controller object.) Your
    custom implementation of this method should not call super.

    If you want to perform any additional initialization of your views, do
    so in the viewDidLoad method. In iOS 3.0 and later, you should also
    override the viewDidUnload method to release any references to the
    view or its contents.

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

Sidebar

Related Questions

I want to use a modal view ( UIViewController ) as a normal view,
To prevent impatient users from clicking on a link to a webstart application too
How do I prevent vim from replacing spaces with tabs when autoindent is on?
I want to prevent XSS attacks in my web application. I found that HTML
Is it possible to prevent an asp.net Hyperlink control from linking, i.e. so that
Does TCP/IP prevent multiple copies of the same packet from reaching the destination? Or
How do I prevent my users from accessing directly pages meant for ajax calls
How can I prevent a user from resizing GridViewColumns withing a ListView control?
Say I have 2 subclasses from UIViewController , class A and class B .
I have a simple project to present a modal view controller and transfer back

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.