Is it possible to determine which ViewController is visible programatically?

Discussion in 'iOS Programming' started by Jeremy1026, Feb 1, 2009.

  1. Jeremy1026 macrumors 68020

    Jeremy1026

    Joined:
    Nov 3, 2007
    #1
    I am trying to stop an animation loop once the view controller is changed, is there a way to programatically check which view controller is currently the super? I used the tab bar template for this project.
     
  2. neil.b macrumors member

    neil.b

    Joined:
    Nov 20, 2008
    #2
    Code:
    if (self.yourViewController.view.superview)
    {
         //yourViewController is superview
    }
    
     

Share This Page