+(DetailViewController *) instance{
return (DetailViewController *)[[UIApplication sharedApplication]delegate];
}
-(void)tapped:(UITapGestureRecognizer *)recognizer {
[[DetailViewController instance]showViewInFullScreen:self withModel:self.messageModel];
}
DetailViewController.m
-(void)showViewInFullScreen:(UIViewExtention*)viewToShow withModel:(MessageModel*)model{
[viewController showViewInFullScreen:viewToShow withModel:model];
}
DetailViewController クラスにある showViewInFullScreen を呼び出すことができないタップされたメソッドに到達すると、アプリは次のメッセージで終了します。
NSInvalidArgumentException'、理由:
'-[AppDelegate showViewInFullScreen:withModel:]: 認識されないセレクターがインスタンスに送信されました
ありがとう。