Here is the link to RESideMenu, what I'm using in my project
简单地说,当我将我的UITableView设置为根视图控制器并启动它时,它工作得很好。我所有的定制UITableViewCells都在那里,看起来很棒。问题是,每当我尝试从RESideMenu启动UITableView时。当我这样做时,我得到这个错误:
2013-07-06 11:49:07.844 halocustoms[4438:c07] *** Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:],
/SourceCache/UIKit_Sim/UIKit-2380.17/UITableView.m:4460 2013-07-06 11:49:07.845 projectcf32[4438:c07]
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier CustomCell -
must register a nib or a class for the identifier or connect a prototype cell in a storyboard'我已经在我的故事板上检查了我的重用标识符大约一百次,它必须工作,因为当应用程序启动时,一切都很好。这只是在从RESideMenu中选择UITableViewController时出现的。
请注意,这是RESideMenu显示视图控制器的方式:
RESideMenuItem *homeItem = [[RESideMenuItem alloc] initWithTitle:@"Quick Games" action:^(RESideMenu *menu, RESideMenuItem *item) {
[menu hide];
MyTableView *viewController = [[MyTableView alloc] init];
viewController.title = item.title;
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
[menu setRootViewController:navigationController];
}];非常感谢!
发布于 2013-07-07 00:20:44
MyTableView *viewController = [[MyTableView alloc] init];应该是:
MyTableView *viewController = (MyTableView *)[self.storyboard instantiateViewControllerWithIdentifier: @"yourIdentifier"];https://stackoverflow.com/questions/17504625
复制相似问题