How do I reset the state of a view inside a tabbar?
Posted
by ABeanSits
on Stack Overflow
See other posts from Stack Overflow
or by ABeanSits
Published on 2010-05-20T18:27:32Z
Indexed on
2010/05/20
18:30 UTC
Read the original article
Hit count: 189
Hello CocoaTouch-Experts!
This is a fairly straightforward question though my Googling session gave me nothing.
How do I reset the state of a view hierarchy located in a tabbar programmatically? The behavior I want to replicate is when the user tapps on a tab twice. This causes the view located under that tab to return to it's initial state.
The tab is "owned" by a UINavigationController
and when the user reaches a certain point in the view hierarchy there is a button which I want to connect this behavior to.
All my attempts have failed except calling on a method in AppDelegate which kills the view and adds it back to the UITabBarController
again. But this does not feel like the right way to go.
Thanks in advance.
Best regards
//Abeansits
© Stack Overflow or respective owner