问题描述
我有tabBarController,有6个视图。作为默认的tabBarController加载第一个视图,我需要在我的应用程序启动时加载视图#6,所以在我的tabBarController中我添加到 viewWillAppear
[self.tabBarController setSelectedIndex:6];
,好的。在我看来#3 a有两个我在故事板中创建的模态视图。当我点击一个按钮时,我加载我的模态视图,当关闭它时 [self dismissModalViewControllerAnimated:YES]
; (我在视图#3中)我看到了#6视图,但是我需要回来查看#3,所以如果我理解当我调用我的modalView时它会卸载我的tabBarController,当我关闭它时再次使用view#加载tabBarController# 6,但我需要看到我的视图#6我在哪里调用我的modalView,我该如何修复它?
I have tabBarController with 6 views. As default tabBarController load first view, I need to load view #6 at my application start, so in my tabBarController I add to viewWillAppear
[self.tabBarController setSelectedIndex:6];
, ok. In my view #3 a have 2 modal views witch I create in storyboard. When I tap a button I load my modal view, and when a close it [self dismissModalViewControllerAnimated:YES]
; (I was in view #3) I see view #6, but I need to come back to view #3, so if I understand right when I call my modalView it unload my tabBarController and when I close it load tabBarController again with view #6, but i need to see my view #6 where i call my modalView, how can I fix it?
PS我希望你理解我的英语
P.S. I hope you understand my English
推荐答案
我在故事板中更改tabBarController中的项目顺序,更改代码中的视图数量和所有内容作品。谢谢大家。
I change order of items in my tabBarController in storyboard, change numbers of views in code and everything works. Thanks to all.
这篇关于tabBarController在调用modalView之后unLoad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!