NSConcreteMapTable backdropView:willChangeToGraphicsQuality:...错误 [英] NSConcreteMapTable backdropView:willChangeToGraphicsQuality: ...error

查看:140
本文介绍了NSConcreteMapTable backdropView:willChangeToGraphicsQuality:...错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个iPad应用程序来帮助我管理我在国外的费用。

I'm developing an iPad app to help me to manage my expenses when I'm abroad.

我有一个拆分视图,包含经典的主视图和详细视图。在主人中有费用清单,在详细视图中,猜猜是什么?每项费用的细节!
当我点击细节中的按钮时,使用带有表单的模态segue加载新视图。用户插入一个数字,如果该数字大于某个值,则主数据和详细信息中标签的颜色将发生变化。
当我保存这个数字时,我会关闭模态视图并向主服务器发送NSMessage,以便使用新标签颜色重新加载表并重新加载之前选择的详细信息视图。
一切都可以使用iOS模拟器,但当我在iPad(iPad 2)上运行应用程序时,一切都冻结了,我收到了这条消息:

I have a split view with the classical master and detail views. In the master there is the list of the expenses and in the detail view, guess what? The details of every expense! When I tap on a button in the detail a new view is loaded using a modal segue with a Form Sheet. The user insert a number and if that number is bigger than a certain value the colors of the labels in the master and in the detail will change. When I save this number I dismiss the modal view and send a NSMessage to the master in order to reload the table with the new label colors and reload the detail view selected previously. Everything work using the iOS Simulator, but when I run the app on my iPad (iPad 2), everything freeze and I got this message:


2013-11-09 21:52:04.763 IOUinTravel [562:60b] - [NSConcreteMapTable
backdropView:willChangeToGraphicsQuality:]:无法识别的选择器发送
到实例0x18b8fb00 2013-11-09 21 :52:04.767 IOUinTravel [562:60b]
*由于未捕获的异常'NSInvalidArgumentException'终止应用程序,原因:' - [NSConcreteMapTable
backdropView:willChangeToGraphicsQuality:]:无法识别的选择器已发送
键实例0x18b8fb00'
*表首先掷调用堆栈:(0x2df5bf4b 0x387386af 0x2df5f8e7 0x2df5e1cb 0x2dead4d8 0x30c88b43 0x306cd7b5 0x306cd6e5 0x306cd7d5
0x306cd6e5 0x306da5c3 0x306da417 0x30785f67 0x30785d83 0x3077de85
0x3077d30d 0x3077d07d 0x3077d015 0x306ceda3 0x30355c6b 0x3035147b
0x3035130d 0x30350d1f 0x30350b2f 0x306c70c3 0x2df271cd 0x2df24b71
0x2df24 eb3 0x2de8fc27 0x2de8fa0b 0x32b70283 0x30733049 0x9a3d5
0x38c40ab7)libc ++ abi.dylib:以
类型的未捕获异常终止NSException(lldb)

2013-11-09 21:52:04.763 IOUinTravel[562:60b] -[NSConcreteMapTable backdropView:willChangeToGraphicsQuality:]: unrecognized selector sent to instance 0x18b8fb00 2013-11-09 21:52:04.767 IOUinTravel[562:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteMapTable backdropView:willChangeToGraphicsQuality:]: unrecognized selector sent to instance 0x18b8fb00' * First throw call stack: (0x2df5bf4b 0x387386af 0x2df5f8e7 0x2df5e1cb 0x2dead4d8 0x30c88b43 0x306cd7b5 0x306cd6e5 0x306cd7d5 0x306cd6e5 0x306da5c3 0x306da417 0x30785f67 0x30785d83 0x3077de85 0x3077d30d 0x3077d07d 0x3077d015 0x306ceda3 0x30355c6b 0x3035147b 0x3035130d 0x30350d1f 0x30350b2f 0x306c70c3 0x2df271cd 0x2df24b71 0x2df24eb3 0x2de8fc27 0x2de8fa0b 0x32b70283 0x30733049 0x9a3d5 0x38c40ab7) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

我真的不知道为什么以及如何解决它。

I really do not know why and how to solve it.

我使用的方法是:

在表单表模式视图中:

- (IBAction)saveNumber:(id)sender {
    // Do some stuff here
    [self dismissViewControllerAnimated:YES completion:^{ [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadAfterExpenseCheck" object:self];}]; 
}

在主视图中:

- (void)reloadAfterExpenseCheck:(NSNotification *)notification
{
    if ([[notification name] isEqualToString:@"reloadAfterExpenseCheck"]) {
        NSLog(@"Messaggio ricevuto!");
        NSLog(@"%@", self.indexPathToUpdate);
        [self.tableView reloadData];
        [self.tableView selectRowAtIndexPath:self.indexPathToUpdate animated:NO  scrollPosition:UITableViewScrollPositionNone];
        [self performSegueWithIdentifier:@"detailExpense" sender:self];
    }
}

当我触发它时,segue @detailExpense有效在主表中选择一个单元格,所以我不知道问题在哪里...在iOS sim中它可以工作!

The segue @"detailExpense" works when I trigger it selecting a cell in the master table, so I do not know where is the problem... in the iOS sim it works!

感谢您的回答。

推荐答案

我已经解决了这个问题,我不知道这是最好的方法,但它现在有效。

I've solved this problem, I do not know it it is the best way but it works now.

我开始认为可能会发生一些异步任务。我的Mac Mini cpu足够快,可以完成第一项任务,加载视图并用我的数据填充它,iPad cpu可能太慢,所以视图没有加载...至少这是我的猜测。
我简单地添加了一个NSTimer,用于在短时间内激活用于加载详细视图的方法。用户没有注意到延迟,但它给了iPad时间。

I started to think that maybe there could be some asynchronous task going on. My Mac Mini cpu was fast enough to complete the first task, load the view and fill it with my data, the iPad cpu maybe was too slow so the view wasn't loaded... at least that is my guess. I've simple added a NSTimer that fires the method used to load the detail view after a short time. The user do not notice the delay but it gives time to the iPad.

这就是代码:

- (void)reloadAfterExpenseCheck:(NSNotification *)notification {
   if ([[notification name] isEqualToString:@"reloadAfterExpenseCheck"]) {

       [self.tableView reloadData];
       [self.tableView selectRowAtIndexPath:self.indexPathToUpdate animated:NO        scrollPosition:UITableViewScrollPositionNone];
       //[self performSegueWithIdentifier:@"detailExpense" sender:self];
       [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(loadIt) userInfo:nil repeats:NO];
   }
}

-(void)loadIt
{
   [self performSegueWithIdentifier:@"detailExpense" sender:self];
}

这篇关于NSConcreteMapTable backdropView:willChangeToGraphicsQuality:...错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆