0
我遇到了问题,我需要快速解决它!Thread1信号SIGABRT
2014年7月4日11:04:00.649 GetItDone [44901:60B] - [AppDelegate中getTaskListRecords]:无法识别的选择发送到实例0x8e36670 2014年7月4日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
一切工作,并吹嘘其失败后,我增加了一个选择器故事板。
看来您正在向AppDelegate实例发送getTaskListRecords消息,但它在CoreDataFunctions中实现。 – proxi