【问题标题】:XCode Linking to a storyboardXCode 链接到故事板
【发布时间】:2015-04-29 15:10:47
【问题描述】:

我有一个 XIB 文件,我希望它是这样的:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

 switch (indexPath.row)
        {

            case 0:
                LHPurchaseOrder *purchaseOrderController = [[LHPurchaseOrder alloc]initWithNibName:@"LHPurchaseOrder" bundle:nil];
                purchaseOrderController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
                [self presentViewController:purchaseOrderController animated:YES completion:nil];
                break;
        }


}

现在我需要使用拆分视图控制器(显然您只能在情节提要中使用)所以我为这个视图创建了情节提要。现在我需要知道如何将它从我的表格视图链接到故事板而不是我的 XIB 文件。这可能吗?我查看了 Storyboard Segue 教程,但我发现它令人困惑,我认为这不是我想要的。任何帮助,将不胜感激。

【问题讨论】:

  • 添加答案,有什么反馈吗?

标签: ios objective-c xcode


【解决方案1】:
LHPurchaseOrder *vc= [[UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"LHPurchaseOrder"];

[self.navigationController pushViewController:vc animated:YES];

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-06-16
    • 2023-03-28
    • 2012-09-24
    • 1970-01-01
    • 1970-01-01
    • 2012-06-15
    • 1970-01-01
    相关资源
    最近更新 更多