Well I've dabbled a little more since posting, everything succeeds but still crashes on load.. Here's the code I have so far
AppDelegate.h
Code:
#import <UIKit/UIKit.h>
@interface AppDelegate : NSObject <UIApplicationDelegate>
{
UIWindow *window;
UINavigationController *navigationController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
@end
AppDelegate.m
Code:
#import "AppDelegate.h"
@implementation AppDelegate
@synthesize window;
@synthesize navigationController;
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
// Override point for customization after application launch
// Configure and show the window
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
}
- (void)applicationWillTerminate:(UIApplication *)application
{
// Save data if appropriate
}
- (void)dealloc {
[navigationController release];
[window release];
[super dealloc];
}
@end
TabViewController.h
Code:
#import <UIKit/UIKit.h>
@interface TabViewController : UIViewController <UITabBarDelegate>
{
IBOutlet UITabBar *tabBar;
IBOutlet UITabBarItem *featuresTabBarItem;
UIViewController *selectedViewController;
}
@property (nonatomic, retain) IBOutlet UITabBar *tabBar;
@property (nonatomic, retain) IBOutlet UITabBarItem *featuresTabBarItem;
@property (nonatomic, retain) UIViewController *selectedViewController;
@end
TabViewController.m
Code:
#import "TabViewController.h"
#import "FeaturesTabViewController.h"
@implementation TabViewController
@synthesize selectedViewController;
@synthesize tabBar;
@synthesize featuresTabBarItem;
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
// Custom initialization
FeaturesTabViewController *featuresTabViewController = [[FeaturesTabViewController alloc] initWithNibName:@"FeaturesTabView" bundle:nil];
[self.view addSubview:FeaturesTabViewController.view];
self.selectedViewController = featuresTabViewController;
[featuresTabViewController release];
}
return self;
}
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
tabBar.selectedItem = featuresTabBarItem;
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc
{
[tabBar release];
[featuresTabBarItem release];
[selectedViewController release];
[super dealloc];
}
@end
I would appreciate any insight! thx