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