至腳本所以我找到了如何從廈門國際銀行轉變的例子,故事情節轉型與數據
NSString * storyboardName = @"CheckoutStoryboard";
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle: nil];
UIViewController * vc = [storyboard instantiateViewControllerWithIdentifier:@"Checkout"];
[self presentViewController:vc animated:YES completion:nil];
這個偉大的工程,然後從那裏,如果我需要轉移的故事板的場景,我可以使用之間的數據這個代碼在第一個場景中用這個來傳輸數據。
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.destinationViewController respondsToSelector:@selector(setMyData:)]) {
[segue.destinationViewController performSelector:@selector(setMyData:)withObject:myObject];
}
}
,這在第二
@property (nonatomic, strong) NSString *myData;
但我無法弄清楚如何從我的XIB過渡到我的數據的故事板。基本上,我的故事板上有很多XIB上需要的變量,然後纔會傳遞出去。我知道如何做每一步,除了將數據從XIB傳遞到故事板。有任何想法嗎?
XIB是你的ViewController嗎? – Burhan