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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:49:38+00:00 2026-05-26T00:49:38+00:00

I currently am having a issue with my main XIB. I am using iOS

  • 0

I currently am having a issue with my main XIB.

I am using iOS 5 Beta 7 so it shouldn’t be a problem with that. Anyway, this is how I am doing it in the app delegate to show the main view:

.h

UIWindow *window;
Game3ViewController *viewController;

@property (nonatomic, retain) UIWindow *window;
@property (nonatomic, retain) Game3ViewController *viewController;

.m

@synthesize window = _window;
@synthesize viewController = _viewController;

In the applicationDidFinishLaunching method:

//self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    // Override point for customization after application launch.
    self.viewController = [[[Game3ViewController alloc] initWithNibName:@"Game3ViewController" bundle:nil] autorelease];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;

Then the dealloc:

- (void)dealloc {
    [_window release];
    [_viewController release];
    [super dealloc];
}

The problem is that I am not sure if I am now supposed to do something in the MainWindow.XIB, am I? I thought this code would do everything for me but all I see when I load the app is a white window. Am I supposed to connect my Main View in the MainWindow.xib?

Anyway, if you look at Xcode’s default templates for a Single View Application in Xcode Beta 7, you will see that there isn’t even a MainWindow.xib, so that is why I am confused.
How would I go upon fixing this?

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-05-26T00:49:39+00:00Added an answer on May 26, 2026 at 12:49 am

    When creating a Single View Application it will create 2 .xib. One is MainWindow.xib and the other is ViewController.xib.
    By default you shouldn’t have to touch your App delegate because both nibs are linked already.

    However, if you want to start from scratch by selecting the Window-based Template you will have to create your own View Controller later. And then to add the view controller to the window you need to do everything you have done with this in your applicationDidFinishLaunching method:

    // Override point for customization after application launch.
    self.viewController = [[[Game3ViewController alloc] initWithNibName:@"Game3ViewController" bundle:nil] autorelease];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;
    

    By this I mean that you need to eliminate the first line where you are allocating your window. MainWindow.xib already does it for you.

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

Sidebar

Related Questions

I'm currently using this jQuery validate plugin and having an issue in IE where
Hopefully someone can shed a little light on an issue that I'm currently having
I'm having an issue with a query that currently uses LEFT JOIN weblog_data AS
I'm creating an app using a UITabBarController as the main form of navigation, having
I'm currently having an issue with using custom ListView adapters with the Holo.Light theme.
I'm currently having an issue with linked list and pointers in C. The problem
Hey I'm having a big issue with my android App. I'm currently updating it
I am currently having an issue with BackgroundWorker running on Windows Server 2003. I
I'm currently having an issue wrapping my brain around the notion of converting my
Hi All I am currently having an issue calling a WCF service from a

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.