[英]connection from FlipSideView to tab2
I've created a Tab Bar application (2 tabs) then merged a Utility Application to it.我创建了一个选项卡栏应用程序(2 个选项卡),然后将一个实用程序应用程序合并到它。 So now i have an App with two tabs and a Flip animation.
所以现在我有一个带有两个选项卡和一个 Flip animation 的应用程序。
When the App loads, Tab1 has the info button and on ButtonPressInfo the view flips giving me a FlipSideView with no tabs.当应用程序加载时,Tab1 有信息按钮,而在 ButtonPressInfo 上,视图翻转给我一个没有选项卡的 FlipSideView。 What im stuck on is, i wish to press the "Done" button on FlipSideView but return to the second tab.
我坚持的是,我希望按下 FlipSideView 上的“完成”按钮,但返回到第二个选项卡。
Ive tried several examples but I always get the same result, that is when you press the "Done" button it always returns to first tab.我尝试了几个示例,但我总是得到相同的结果,即当您按下“完成”按钮时,它总是返回到第一个选项卡。
testing123AppDelegate = (Testing123AppDelegate *)[[UIApplication sharedApplication] delegate];
NSArray *vcs = [testing123AppDelegate.tabBarController viewControllers];
[[vcs objectAtIndex:1] viewWillDisappear:TRUE];
[self.delegate flipsideViewControllerDidFinish:self];
thank you.谢谢你。
In your delegate's implementation of flipsideViewControllerDidFinish:
, add a line like this:在您的委托的
flipsideViewControllerDidFinish:
实现中,添加如下一行:
myTabBarController.selectedIndex = 1;
You might also have a look at the selectedViewController
property on UITabBarController.您还可以查看 UITabBarController 上的
selectedViewController
属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.