Heres my code, I followed the tutorial directly but i still get variable undeclared errors...heres my code:
Code:
//
// RSSReaderAppDelegate.m
// RSSReader
//
// Created by Josh Mac on 5/10/09.
// Copyright __MyCompanyName__ 2009. All rights reserved.
//
#import "RSSReaderAppDelegate.h"
@implementation RSSReaderAppDelegate
@synthesize window;
-(void)applicationDidFinishLaunching:(UIApplication *)application {
tabBarController = [[UITabBarController alloc] initWithNibName:nil bundle:nil];
// Create instances of the MainViewController for the 4 TabBar buttons
MainViewController *viewController1 = [[[MainViewController alloc] initWithNibName:nil bundle:nil] autorelease];
viewController1.tabBarItem.title = @"Browse All";
MainViewController *viewController2 = [[[MainViewController alloc] initWithNibName:nil bundle:nil] autorelease];
viewController2.tabBarItem.title = @"Most Recent";
MainViewController *viewController3 = [[[MainViewController alloc] initWithNibName:nil bundle:nil] autorelease];
viewController3.tabBarItem.title = @"Favorites";
MainViewController *viewController4 = [[[MainViewController alloc] initWithNibName:nil bundle:nil] autorelease];
viewController4.tabBarItem.title = @"Settings";
tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, viewController3, viewController4, nil];
// Add the tab bar controller's current view as a subview of the window
[window addSubview:tabBarController.view];
// Override point for customization after application launch
[window makeKeyAndVisible];
}
- (void)dealloc {
[window release];
[super dealloc];
}
@end