繁体   English   中英

第二个视图控制器未显示

[英]Second view controller not showing

我有两个视图控制器,主要链接到导航控制器。 我通过将主控制器链接到Storybaord上的第二个控制器来创建segue。 我将标识符称为“关联”,并将其作为推送序列。 我以编程方式创建了带有附属于附件视图的按钮的表格视图单元(这是有意的)。 该按钮调用performSegueWithIdentifier,但未显示第二个视图控制器。 除了我那不熟练的技术语言(对不起,我刚上IOS一周了),我知道我在做什么错吗?

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
//...
[myButton addTarget:self action:@selector(buttonizeButtonTap:) forControlEvents:UIControlEventTouchUpInside];
cell.accessoryView = myButton;

return cell;
}

-(void)buttonizeButtonTap:(id)sender{
    [self performSegueWithIdentifier:@"Associate" sender:sender];
}

好的,意识到我做错了。 我已经将空的performSegueWithIdentifier方法重写。 在我走路之前跑步的危险。 感谢你的帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM