Objective c presentModelViewController不工作

Objective c presentModelViewController不工作,objective-c,ios4,Objective C,Ios4,我的appdelegate类中有navigationController& 在其中传递viewController(RootViewController)。 在RootViewController中,我正在使用自定义UItableViewCell。 在UITableViewCell类中,我有一个UIButton。 单击按钮,我想导航到其他页面(sampleViewController) 所以我正在使用的按钮点击 -(void)btnClick { [self.viewController pre


我的appdelegate类中有navigationController
& 在其中传递viewController(RootViewController)。
在RootViewController中,我正在使用自定义UItableViewCell。
在UITableViewCell类中,我有一个UIButton。
单击按钮,我想导航到其他页面(sampleViewController)
所以我正在使用的按钮点击

-(void)btnClick
{
[self.viewController presentModelViewController:sampleViewController animated:YES];

}
但这不会导航到sampleViewController。
我在哪里犯了错误?

请帮助/建议我为以上内容提供friens。

可能只是一个简单的打字错误-正确的方法名称是presentModalViewController:animated:(模态,而不是模型)

您是否连接了按钮的onTouchUp事件?正在调用按钮吗?

此代码看起来正常。将断点和/或日志消息放在该方法中,以检查它是否确实被调用。我尝试了日志/断点,但没有得到任何线索。是否确实会出现[self.viewController presentModelViewController:sampleViewController animated:YES];点击按钮。不,西蒙,这不是问题所在。问题是,当我打印NSLog(@“%@”,sampleViewController.view)时,它给出的是null。