Iphone – Calling a class from another view

iphoneview

I am doing a game in iphone, suppose to change menu view to the game on touch single player.
when the view change only the interface is shown but everything is not moving. i am suspecting that my codes only manage to call the view but not the game class. Is there anything i can call with other codes that anyone can help?

-(IBAction) displayView;{
secondViewController = [[SecondViewController alloc] initWithNibName:@"SecondView" bundle:nil];
[self.view addSubview:secondViewController.view];

    NSLog(@"PLAY");

}

This is the code that i currently using which only call the interface whereby secondViewController is the game class.

Best Answer

If you want to know if your code is being called, the easiest way to check is place a breakpoint there and see if it gets hit when you "Build & Debug".