bar controller, My project name is "DebtDevV1", which switch between view "AddDebtor" and "Debtor". I built it based on the "tabbed based application".
When i press "DebtorViewController", it stopped at below coding in main.m Error message:
Program received signal "EXC_BAD_ACCESS"
When i put my cursor on DebtDevV1AppDelegate, it shows "Out of Scope"
.
Below is the main.m:
#import "DebtDevV1AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([DebtDevV1AppDelegate class]));
}
}
Below is the DebtDevV1AppDelegate.m
#import "DebtDevV1AppDelegate.h"
#import "AddDebtorViewController.h"
#import "DebtorViewController.h"
@implementation DebtDevV1AppDelegate
@synthesize window = _window;
@synthesize tabBarController = _tabBarController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
UIViewController *viewController1 = [[[AddDebtorViewController alloc] initWithNibName:@"AddDebtorViewController" bundle:nil] autorelease];
UIViewController *viewController2 = [[[DebtorViewController alloc] initWithNibName:
@"DebtorViewController" bundle:nil] autorelease];
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
return YES;
}
Does anyone come across or have idea on above error? Thanks!