在Objective-C中,爲了從另一個storyboard中移動另一個viewcontroller,我們將使用以下編碼來實現我們想要的。從swift中的不同storyboard移動另一個ViewController
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Customer" bundle:nil];
HomeSummaryViewController *creaccVC = [storyboard instantiateViewControllerWithIdentifier:@"HomeSummaryViewController"];
[self.navigationController pushViewController:creaccVC animated:YES];
在swift版本中,請幫助我像Objective-C一樣如何做?
'_ ??'不能轉換爲'虛空' – ppshein
代碼對我來說工作得很好。你在使用Xcode 7和Swift 2嗎?或者也許你的代碼中有其他地方出現錯誤。 – Adam
我正在使用XCode 6.4 – ppshein