Using pushViewController in a separate class


#1

Hi,
I use this method to push to a new viewcontroller:
Optie01ViewController * optie01 = [[optie01ViewController alloc]
initWithNibName:@“Optie01ViewController” bundle:nil];
[self.navigationController pushViewController:optie01 animated:NO];

the Optie01ViewController is a separate viewcontroller with its own nib file.
It works, but now I want to use this in a method in a class I want to write. That can push the viewcontrollers.
I cannot just copy paste it i a method in the new class because the self would be pointing to the wrong NavController.

I have this animation that happens when you click a button and I want to use the pushview in the
completion:^(BOOL finished){ }
And the animation happens in so many views that it seems smart to use a separate class file for it (I actually already am using the anim that way, but without the push view bit).

I just can figure out how to have the self.navigationController push the correct view.

Any ideas where I should start looking?

Thanks.