1

In my AppDelegate.h I have @property (nonatomic, strong) IBOutlet UIWindow *window and @property (nonatomic, strong) IBOutlet UITabBarController *tabBarController.

In the implementation I @synthesize *window = _window, *tabBarController = _tabBarController;.

In my target settings, my MainWindow.xib file is specified.

In my MainWindow.xib file, I have three objects: AppDelegate, Window, and Tab Bar Controller. I connect Window to AppDelegate, Tab Bar Controller to Window.rootViewController, and Tab Bar Controller to AppDelegate.

Back in AppDelegate.h, the outlet circles show as connected.

Finally, in my AppDelegate.m file:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [self.window makeKeyAndVisible];

    NSLog(@"%@",self.window);

    return YES;
}

The contents of this log are always (null).

On application launch, the window and tab bar controller appear and receive user interaction.

What is going wrong?

tacos_tacos_tacos
  • 10,277
  • 11
  • 73
  • 126

1 Answers1

0

The problem was that the File's Owner class was set to the ApplicationDelegate class rather than UIApplication. Setting this to the correct class, then setting the delegate as a delegate of UIApplication, totally resolved the issue

tacos_tacos_tacos
  • 10,277
  • 11
  • 73
  • 126