2015-04-23 49 views
0

我有一個XIB文件,我想它就像這樣:的XCode鏈接到故事板

- (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教程,但是我發現它令人困惑,我認爲它不是我正在尋找的東西。任何幫助,將不勝感激。

+0

添加回復,反饋? – OMGHaveFun

回答

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

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