1 Replies - 1983 Views - Last Post: 14 May 2012 - 09:26 AM

#1 soulslicer   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 28-April 12

My View Controller refuses to load..

Posted 04 May 2012 - 08:59 AM

Okay, so I basically went about to create a new Tab Bar Application. It already has a few view's set up, and it would load up.

However, I went to overwrite this, and load up my view and view controller. Basically, my view controller is of subclass UITableView as such
@interface ItemsViewController : UITableViewController
    NSMutableArray *movieList;

As you can see, it basically has a purpose of storing the movie List as an example. I have already set up the .xib file and linked all of them together. And that is not the problem.

The problem is, I can't get this view to load. It simply refuses and just loads Mainwindow.xib. This is the chunk of code that is in my AppDelegate.m

#import "itemsViewController.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    self.window=[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen]bounds]];
    ItemsViewController *itemsViewController=[[ItemsViewController alloc]init];
    [[self window]setRootViewController:itemsViewController];
    self.window.rootViewController = self.tabBarController;
    [self.window makeKeyAndVisible];
    return YES;

Can I know why it doesn't load my view controller?

Is This A Good Question/Topic? 0
  • +

Replies To: My View Controller refuses to load..

#2 AlbuquerqueApache   User is offline

  • D.I.C Addict

Reputation: 50
  • View blog
  • Posts: 523
  • Joined: 21-February 10

Re: My View Controller refuses to load..

Posted 14 May 2012 - 09:26 AM

try using:


itemsViewController=[[ItemsViewController alloc]init];

instead of

ItemsViewController *itemsViewController=[[ItemsViewController alloc]init];

I think you are overwriting your view.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1