项目因此错误而崩溃。
2011-08-08 19:34:27.539 MCIT[12233:207] -[TrailersViewController initWithFrame:]: unrecognized selector sent to instance 0x58396e0
2011-08-08 19:34:27.542 MCIT[12233:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TrailersViewController initWithFrame:]: unrecognized selector sent to instance 0x58396e0'
在委托的这个方法中
-(void)switchToTrailerOne
{
CGSize screenSize = [UIScreen mainScreen].bounds.size;
CGRect screenBounds = CGRectMake(0, 0, screenSize.width, screenSize.height);
TrailersViewController *trailersController = [[TrailersViewController alloc] initWithFrame:screenBounds];
[self.navController pushViewController:trailersController animated:NO];
[trailersController goToFirstTrailer];
}
欢迎提出问题,但如果您想查看代码,有问题的视图控制器文件在这里。
http://mytheral.com/TrailersViewControllerH.html
http://mytheral.com/TrailersViewControllerM.html