Hello! I'm developing a simple tab bar application for school. It has 3 tabs. One of them plays music in streaming and I would like to stop the music playing when the user changes the tab. Is this possible? and How? Thank you in advance!
views:
372answers:
2
                +3 
                A: 
                
                
              Implement the UITabViewController delegate method:
– tabBarController:didSelectViewController:
And you should be able to do what you want. There's also
– tabBarController:shouldSelectViewController:
if you want to know before the tab changes.
                  Carl Norum
                   2010-03-23 17:13:50
                
              Do you mean `UITabBarController`?
                  Andrew
                   2010-08-13 20:08:50
                
                +2 
                A: 
                
                
              As Carl says, this is possible. However, if I were to develop such application (and actually, I am), I would use the viewWillDisappear method of my UIViewController (and I am). That way you keep the logic separated between your implementations.
                  Björn
                   2010-03-23 17:18:21