如何使用向下钻取表视图重置 tabcontoller
我有一个选项卡栏,其中一个选项卡包含向下钻取表。
用户完成使用钻取表后,我遇到问题。
如果它们更改为另一个选项卡,然后更改回原始选项卡,原始选项卡仍位于我离开的位置(在显示详细视图的向下钻取的底部)。
我想要的是移动到旧选项卡重置的替代选项卡。
我尝试向 -(void)viewDidDisappear
和 -(void)viewDidUnload
添加各种内容,但没有成功。
我需要做什么?
干杯
I have a tabbar with one of the tabs containing a drilldown table.
I am having problems once the user has finished using the drilldown table.
If they change to another tab, then change back to the original tab, the original tab is still where I left it (at the bottom of the drill down showing the detail view).
What I want is on moving to an alternative tab the old tab resets.
I have tried adding all sorts of stuff to -(void)viewDidDisappear
and -(void)viewDidUnload
with no success.
What do I need to do?
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解您的问题,每当您浏览选项卡时,您都希望每个选项卡上都有第一个视图。您不希望在您离开的地方显示旧视图。
这是仅在您的 appdelegate 文件中使用的代码:
As I understood your question, you want the first view on every tab, whenever you move through tabs. You don't want the old view to be displayed there which you had left.
Here is the code just use that in your appdelegate file: