how do I implement this?back button goes back to a different UITableViewController from where it came from

3 views
Skip to first unread message

Michael Z

unread,
Jan 23, 2010, 5:02:35 PM1/23/10
to iPhone Application Development Auditors

Hi Guys:
I did not get a satisfactory answer from stackoverflow, trying it out
here:

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?

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 can be loaded from A or B, but I want the backbutton on the Chat
window ( C ) goes back to Chats (B) window only.

From:
http://stackoverflow.com/questions/2113387/back-button-goes-back-to-a-different-uitableviewcontroller-from-where-it-came-fro


Cheers.

Sukima

unread,
Jan 24, 2010, 1:44:35 AM1/24/10
to iPhone Application Development Auditors
You can do this by poping the views from the navigation stack and
pushing on the correct view. Do change the behavior like your talking
about you have to pop and push manually.

THIS IS NOT GOOD PRACTICE and will likely prevent your app from being
accepted by apple. It violates the Human Interface Guidelines which
Apple holds to very strictly (with good reason) Personally I would be
very upset and confused if my "back" button didn't actually go "back"

I would highly sugest you either use a UITabBarController setup for
this (this is exactly how Beejive handles this) or use a button on a
UIToolBar to handle this.

> From:http://stackoverflow.com/questions/2113387/back-button-goes-back-to-a...
>
> Cheers.

Sukima

unread,
Jan 24, 2010, 1:53:44 AM1/24/10
to iPhone Application Development Auditors
I further read the stackoverflow thread. I understand now what your
asking.

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.

On Jan 23, 5:02 pm, Michael Z <zhangqiuy...@gmail.com> wrote:

> From:http://stackoverflow.com/questions/2113387/back-button-goes-back-to-a...
>
> Cheers.

Michael Z

unread,
Jan 24, 2010, 2:41:42 PM1/24/10
to iPhone Application Development Auditors
Hi Sukima:
Thanks so much, for understanding what I was asking. I had a hard time
explaining myself,you understand my question correctly.
I believe you could be right, and I hope someone else can confirm this
is the solution.

Sukima

unread,
Jan 26, 2010, 8:28:19 AM1/26/10
to iPhone Application Development Auditors
I just looked at Beejive and it does just that. When I go back it has
in fact switched to the chat tab.
Reply all
Reply to author
Forward
0 new messages