我在containerview中有viewA和viewB。如何將變量傳遞給另一個視圖iOS
我通過委託將var從viewA傳遞到containerviewcontroller。我需要將它從我的containerviewcontroller傳遞給tableviewcontroller。我嘗試了兩種方式,一種是我能夠通過它的方式,但我無法訪問容器視圖中的viewA。我可以用第二種方法打開viewA,但是Var不會通過。
請幫忙。
我的故事板流程如下。
containerview - > tabbarviewcontroller - > navigationviewcontroller - > tableviewcontroller
(void)openSavedProjectAt:(NSNumber *)index
{
//delegate from another class
// works, and index value gets passed, but menu button doesn't work after, cuz didn't push with container?
/*
IncomeViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"incomeList"];
[incomeNav pushViewController:vc animated:YES];
vc.projectIndexToOpen = index;
*/
// the value doesn't get passed, but everything else works
/*
IncomeViewController *vc = [[IncomeViewController alloc]init];
vc.projectIndexToOpen = index;
*/
[self menuButtonPushed]; // close side menu
}
它不是重複的 - 他知道如何通過,認爲他有問題,這是他的問題,而不是一般情況下,他爲什麼在他的具體情況中遇到問題。 – Gruntcakes