Iphone 转到下一个视图在模拟器中工作正常,但在设备中不正常

Iphone 转到下一个视图在模拟器中工作正常,但在设备中不正常,iphone,objective-c,Iphone,Objective C,可能重复: 我的代码在模拟器中运行良好,在设备中运行时崩溃。以下是我的代码: QuizMasterAppDelegate *appDalegate=[[UIApplication sharedApplication]delegate]; appDalegate->table=2; [appDalegate->idStoreArray removeAllObjects]; QuestionView *qmvc=[[QuestionView alloc]ini

可能重复:

我的代码在模拟器中运行良好,在设备中运行时崩溃。以下是我的代码:

QuizMasterAppDelegate *appDalegate=[[UIApplication sharedApplication]delegate];
    appDalegate->table=2;
    [appDalegate->idStoreArray removeAllObjects];

    QuestionView *qmvc=[[QuestionView alloc]init];
    [self.navigationController pushViewController:qmvc animated:YES];
    [qmvc release]; 

我需要点击按钮进入问题视图。我如何才能做到这一点?

QuestionView真的是一个视图控制器类吗?如果是,您应该考虑将其重命名为QuestionViewController以避免混淆。如果否,则您使用错误的类调用pushViewController。@user712881:请尝试忽略[qmvc release];我这样做了,但仍然崩溃了……发布完整的澄清方法。您是否使用interface builder绑定了button的iAction?谢谢,我清除了,我发现我获取的数据库中没有数据sqlite3_stmt*语句;int rowid;rowid=[self-getRowId];//[NSString stringWithFormat:@“%d”,rowid]];}我正在ap代表中阅读类似的表格,请确实需要帮助