Q:

Run an nstimer to show an ad ,but only show up on certain view controller

This works out great, but I need it to show up in a certain class name "food" and no other class.Any tips will be appreciated.
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 {

  //    [Shared instance];

  [NSTimer scheduledTimerWithTimeInterval:20 target:self selector:@selector(ad) userInfo:nil repeats:YES];
   }

      -(void)ad{
[ALInterstitialAd showOver:self.window];  
      }

A:

Well, if you need to show it in a certain class, the do it in that class. You can use viewDidLoad, viewDidAppear and viewWillAppear to instantiate the NSTimer.

