Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-07-2009, 11:11 PM   #2 (permalink)
lildragon
New Member
 
Join Date: Jun 2009
Posts: 24
Default

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
lildragon is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,736
Threads: 89,190
Posts: 380,532
Top Poster: BrianSlick (7,128)
Welcome to our newest member, wrapsol
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:25 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.