我是 iOS 编程的新手,我正在尝试让表格视图与我的应用程序一起运行,但我找不到任何关于应用程序为何不断中止的可靠信息。这是委托文件中的代码,谁能告诉我我做错了什么导致错误?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
listTopics = [NSMutableArray arrayWithCapacity:8];
Topics *topic = [[Topics alloc]init];
topic.topic = @"Movies";
[listTopics addObject:topic];
topic = [[Topics alloc]init];
topic.topic = @"Games";
[listTopics addObject:topic];
topic = [[Topics alloc]init];
topic.topic = @"TV";
[listTopics addObject:topic];
topic = [[Topics alloc]init];
topic.topic = @"Cars";
[listTopics addObject:topic];
topic = [[Topics alloc]init];
topic.topic = @"Actors";
[listTopics addObject:topic];
topic = [[Topics alloc]init];
topic.topic = @"Sports";
[listTopics addObject:topic];
topic = [[Topics alloc]init];
topic.topic = @"Brands";
[listTopics addObject:topic];
topic = [[Topics alloc]init];
topic.topic = @"Music";
[listTopics addObject:topic];
topic = [[Topics alloc]init];
UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
TopicsViewController *topicsViewController = [[navigationController viewControllers]objectAtIndex:0];
topicsViewController.listTopics = listTopics;
return YES;
}