Контроллер
bar, Мой проект называется «DebtDevV1», который переключается между представлениями «AddDebtor» и «Debtor».Я построил его на основе «приложения с вкладками».
Когда я нажимаю "DebtorViewController", он останавливается на кодировке ниже в main.m Сообщение об ошибке:
Программа получила сигнал "EXC_BAD_ACCESS"
Когдая поместил свой курсор на DebtDevV1AppDelegate, он показывает "Out of Scope"
.
Ниже main.m:
#import "DebtDevV1AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([DebtDevV1AppDelegate class]));
}
}
Ниже 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;
}
Кто-нибудь сталкивался или имеет представление об ошибке выше?Спасибо!