+(DetailViewController *) instance{
return (DetailViewController *)[[UIApplication sharedApplication]delegate];
}
-(void)tapped:(UITapGestureRecognizer *)recognizer {
[[DetailViewController instance]showViewInFullScreen:self withModel:self.messageModel];
}
细节视图控制器.m
-(void)showViewInFullScreen:(UIViewExtention*)viewToShow withModel:(MessageModel*)model{
[viewController showViewInFullScreen:viewToShow withModel:model];
}
当我到达无法调用 DetailViewController 类中的 showViewInFullScreen 的点击方法时,应用程序正在以以下消息终止。
NSInvalidArgumentException',原因:
'-[AppDelegate showViewInFullScreen:withModel:]: 无法识别的选择器发送到实例
谢谢。