线程1信号SIGABRT

时间:2014-07-04 17:11:37

标签: objective-c core-data

我遇到了问题,我需要快速解决它!

2014-07-04 11:04:00.649 GetItDone [44901:60b] - [AppDelegate getTaskListRecords]:无法识别的选择器发送到实例0x8e36670 2014-07-04 11:04:00.657 GetItDone [44901:60b] * 由于未捕获的异常终止应用程序' NSInvalidArgumentException',原因:' - [AppDelegate getTaskListRecords] :无法识别的选择器发送到实例0x8e36670'

这是我的代码!

TaskListViewController.m

- (void)viewWillAppear:(BOOL)animated{

coreDataFunctions = [UIApplication sharedApplication].delegate;

self.tasks = [coreDataFunctions getTaskListRecords];

[super viewWillAppear:animated];
[self.tableView reloadData];
}

CoreDataFunctions.h

@interface CoreDataFunctions : NSObject <UIApplicationDelegate>

@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;

- (void) saveContext;
- (NSString *) applicationDocumentsDirectory;

- (NSMutableArray *) getTaskListRecords;

@end

在我为故事板添加了一个选择器之后,一切正常,并且失败了。

1 个答案:

答案 0 :(得分:0)

您可能有一个在实体中没有相应值的插座(例如新的选择器)。这是“无法识别的选择器”