【发布时间】:2014-07-28 03:49:54
【问题描述】:
我用我的自定义单元格创建了一个 .xib,我在我的故事板中的一个 tableviewcontroller 上使用它。
在情节提要中,我将当前 tableview 与另一个使用 push segue 的 tableview 链接起来。 (当用户单击其中一个单元格时,他有一个新视图)。
问题是,我不明白,如何将这个 segue 与我的 CUSTOM 单元“链接”?
我正在加载我的自定义单元格:
static NSString *simpleTableIdentifier = @"cellCustom";
cellCustomView *cell = (cellCustomView *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"cellCustom" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
当我尝试实现该方法时:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
NSLog(@"test");
}
我什么都没有,因为对我来说,我错过了一些与我的自定义单元格有关的东西,以及我的故事板的 segue,但我不明白它是如何工作的:/
谢谢,
【问题讨论】:
标签: ios uitableview