你好stackoverflow的家伙!
我有一个问题,我不知道如何解决它......
我有一个带有 UINavigationController 的 StoryBoard,它有一个 UIViewController 作为 RootViewController。在这个 RootViewController 中,我有 2 个 UIButton。
第一个 UIButtoninstantiateViewControllerWithIdentifier
一个 UICollectionViewController 它工作得很好。
第二个UIButtoninstantiateViewControllerWithIdentifier
是一个 UIViewController,它有 2 个 UITableView。这是我实例化 UIViewController 时的问题,我的 2 UITableView 加载良好,但是当我触摸它(滚动)时出现此错误:
-[__NSCFType scrollViewDidScroll:]: unrecognized selector sent to instance 0x752ff90
2012-11-21 10:22:49.300 Month[19992:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType scrollViewDidScroll:]: unrecognized selector sent to instance 0x752ff90'
但是当我把它做成 RootViewController 时,一切都如我所愿......所以只有当 RootViewController 实例化我的 UIViewController 时,我才会崩溃。
这就是我按下 UIButton 时实例化 UIViewController 的方式:
DayViewController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"calendarDay"];
希望你能帮助我提供这些信息。
问候,