I am currently executing a method in CurrentViewController and I want to move to my FirstViewController (this the actual name of the ViewController I want to move to) when I reach the end of the method that is currently executing
CurrentViewController.m
-(void)methodExecutingOnCurrentViewController
{
//some code..
// what method do I call in order to load and move to my FirstViewController at this point?
// do I first initialize an instance of the ViewController I want to move to?
UIViewController *firstViewController = [[FirstViewController alloc] init];
// but now how do I actually move to this instance I've just created?
// I couldn't find the appropriate method in the class reference documentation
}
Take a look at
- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animatedDoc.There are many other ways you could accomplish what you are looking for, are you using a navigation controller? Then
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animatedis what you want. You could also just add that controller’s view as a subview to your current viewController.