后退按钮从其返回的位置返回到另一个UITableViewController [英] back button goes back to a different UITableViewController from where it came from

查看:68
本文介绍了后退按钮从其返回的位置返回到另一个UITableViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我有UITableViewController A和UITableViewControllerB.A和B都加载UIViewC.在C的后退按钮上,如何确保它总是返回到B,而不是返回它的来源?

Say I have UITableViewController A, and UITableViewController B. Both A and B loads UIView C. At the back button in C, how do I make sure it always goes back to B, rather than where it came from?

这是一个具体的例子:A = iPhone Skype中的联系人"窗口.B =聊天窗口,每一行都是与其他人的聊天记录C =聊天窗口显示与同一个人的对话.

Here is a concrete example: A=Contacts window in iphone skype. B=Chats window, each row is a chat history with a different person C = Chat window displays a conversation with the same person .

C可以从A或B加载,但是我希望聊天"窗口(C)上的后退按钮只能返回到聊天"(B)窗口.

C can be loaded from A or B, but I want the backbutton on the Chat window ( C ) goes back to Chats (B) window only.

干杯.

推荐答案

我从

I got the answer from google group and followed his suggestion, it works:

来自Sukima:我相信(尽管我没有真正的主意)这些应用程序(例如skype和Beejive)正在做的是当视图A想要视图C时,它将向您的UITabBar发送消息,使其移至聊天"选项卡,然后推入详细视图C.这实际上更好因为这样,用户可以通过标签栏更改高亮显示的事实来查看视图是否已更改.来自:我进一步阅读了stackoverflow线程.现在我知道您的要求了.

From Sukima: I believe (although I have no real idea) that what these applications like skype and Beejive are doing is when view A wants view C it will message your UITabBar to move to the chats tab then push in the detail view C. This is actually better because then the user will see that the view has changed via the fact that the tabbar has changed highlights. from: I further read the stackoverflow thread. I understand now what your asking.

这篇关于后退按钮从其返回的位置返回到另一个UITableViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆