簡體   English   中英

XCode鏈接到情節提要

[英]XCode Linking to a storyboard

我有一個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教程,但發現它令人困惑,我認為這不是我想要的。 任何幫助,將不勝感激。

LHPurchaseOrder *vc= [[UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"LHPurchaseOrder"];

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM