Performing Different custom segues

I have multiple view controllers and I want to perform a different custom segue when i transition to certain view controllers.

I've made the code correctly for the different custom segues and set the corresponding segues to that class.

My problem is, when i transition from ViewControllerA to ViewControllerB I want it to perform CustomSegueA & it does. When I transition from ViewControllerB to ViewControllerC I want it to perform CustomSegueB but it performs CustomSegueA instead. In fact, each subsequent transition will perform CustomSegueA. If I change the transition from ViewControllerA to ViewControllerB to CustomSegueB then each subsequent transition will use CustomSegueB.

Any suggestions?


Problem was in the custom segue code...for the animation I had

    - (void) perform {

UIViewController *sourceVC = (UIViewController *) self.sourceViewController;
UIViewController *destinationVC = (UIViewController *) self.destinationViewController;

[UIView transitionWithView:sourceVC.view duration:5.0
                    [sourceVC.navigationController pushViewController:destinationVC animated:NO];


in the

    [UIView transitionWithView:sourceVC.view duration:5.0

i changed it to

    [UIView transitionWithView:sourceVC.navigationController.view duration:5.0

Don't know why that was the difference and only reason i was able to figure it out was by looking at some old projects i had when it worked

Need Your Help

can't write right to left language in text block

c# windows-phone

I can't write right to left language in a text block in windows-phone c#.

Translating an instruction sequence into a diagram

loops assembly optimization diagram

Hello you guys I did a diagram of the instruction sequence and how it would be decoded into operations. I also showed how the data dependencies between them would create a critical path of operati...