0

我正在使用 2 个视图控制器,我只是想在第二个和第一个视图控制器之间做一个放松的 segue。我执行 segue 的代码不会引发任何错误,但也不会做任何事情。

-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//get which one it is and send it back to the other viewcontroller!!!!

NSArray *tempComboArray = [[userCombosReadIn objectAtIndex:indexPath.row] componentsSeparatedByString:@","];
tempSelectName = [tempComboArray objectAtIndex:0];

for (int i = 0; i < [userCombosReadIn count]; i++) {
    NSArray *tempCompareArray = [[userCombosReadIn objectAtIndex:i] componentsSeparatedByString:@","];
    if ([tempSelectName isEqualToString:[tempCompareArray objectAtIndex:0]]) {
        self.selectedComboString = [userCombosReadIn objectAtIndex:i];
        break;
    }
}

[self performSegueWithIdentifier:@"returnToBuildScreen" sender:self];
}

是我用来调用 unwind segue 的代码。我通过控制从橙色视图控制器图标拖动到退出图标来制作展开转场,然后在项目大纲中命名展开转场。大纲调用“展开 segue 到场景退出占位符”。我不知道那是错误的还是重要的等等。segue 标识符是 returnToBuildScreen,动作是 returnToBuildScreen:。

在 viewController 的 .h 文件中,我有一个我认为可以处理展开转场的方法,但我认为这可能是问题所在

-(IBAction)returnToBuildScreen:(UIStoryboardSegue *)segue;

.h 文件中方法声明旁边的圆圈没有填充,这通常意味着它没有连接到 IB 中的任何东西......我在 .m 文件中有一个用于调试目的的基本 nslog 函数的实现.

就像我说的,它运行无错误,但什么也不做

提前致谢

4

0 回答 0