Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nashyo

macrumors 6502
Original poster
Oct 1, 2010
299
0
Bristol
I'm trying to set up a custom segue, but I am getting a strange error message.

I have two scenes connected in storyboard with 'custom' connection. I have subclassed UIStoryboard segue and I have input the class name and segue identifier into storyboard.

The first scene is a tableview and it's delegate calls performseguewithidentifier.

UIStoryboardSegue Subclass
Code:
-(void)perform
{
    __block UIViewController *sourceViewController = (UIViewController*) [self sourceViewController];
    __block UIViewController *destinationViewController = (UIViewController*) [self destinationViewController];
    
    [UIView transitionWithView:sourceViewController.navigationController.view
                      duration:.5
                       options:UIViewAnimationOptionTransitionFlipFromBottom
                    animations:^{
                        [sourceViewController.navigationController presentModalViewController:destinationViewController animated:NO];
                    }
                    completion:^(BOOL finished) {
                        NSLog(@"Transition Completed");
                    }];
}

Error
"Application tried to present modally an active controller"

What does this mean? And why hasn't it worked?

Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.