Is there a way to open a new screen after the NStimer is on 0?
e.x:
-(void) randomMainVoid {
if (mainInt <= 0)
{
[randomMain invalidate];
//after counting a code to open a new file (new .h/.m/.xib file)
} else {
//something
}
}
If you’re using the standard view controller/nib model, it’s pretty easy to load a new screen. How you present it, however, will really depend on your application. But, as an example, if you wanted to present a new modal screen after the timer finished, and you had a view controller class named
AfterTimerViewControllerwith an associated nib file, you would present it as such:For more information on these methods, see the UIViewController documentation and the View Controller Programming Guide for iOS.
edit: I added sample code for a number of different common transitions. The best thing to do is to read the guides about View Controllers and their interactions so that you can use the pattern that best fits the design of your application. In general, tho, the sample code above shows how to react to events, create a view controller programmatically and present it.